Remove with Text

Remove GetEngineeringSpcReview
Better error message
EnforceCodeStyleInBuild
NginxFileSystem
Remove Reactors and Working Directory
AppSettings
Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
This commit is contained in:
2024-04-15 13:13:55 -07:00
parent 7e16ee7f98
commit 5c9f0d1aff
974 changed files with 205399 additions and 1385 deletions

View File

@ -3,7 +3,7 @@ using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.DataModels;
public record InfinityQS1090FullLoad([property: JsonPropertyName("f_sgrp")] int SubGroupId,
[property: JsonPropertyName("date_time")] DateTime SubGroupIdFormated,
[property: JsonPropertyName("date_time")] DateTime SubGroupIdFormatted,
[property: JsonPropertyName("pr_name")] string Reactor,
[property: JsonPropertyName("pd_name")] string Part,
[property: JsonPropertyName("iq_value")] float Value,

View File

@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.DataModels;
public record InfinityQSDescriptorV4([property: JsonPropertyName("sd_sgrp")] int? SubGroupId,
[property: JsonPropertyName("sd_tsno")] int? SiteNumber,
[property: JsonPropertyName("dd_dsgp")] int? VariableNumber,
[property: JsonPropertyName("gd_name")] string? Variable,
[property: JsonPropertyName("dd_name")] string? Value);
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(InfinityQSDescriptorV4))]
public partial class InfinityQSDescriptorV4SourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(Result<InfinityQSDescriptorV4[]>))]
public partial class ResultInfinityQSDescriptorV4SourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.DataModels;
public record InfinityQSEventV4([property: JsonPropertyName("ev_evnt")] int EventId,
[property: JsonPropertyName("ev_sgtm")] int SubGroupDateTimeId,
[property: JsonPropertyName("ev_utc7")] string SubGroupDateTime,
[property: JsonPropertyName("pr_name")] string Process,
[property: JsonPropertyName("pd_name")] string Part,
[property: JsonPropertyName("td_test")] int VariableNumber,
[property: JsonPropertyName("td_name")] string Variable,
[property: JsonPropertyName("ev_name")] string Name);
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(InfinityQSEventV4))]
public partial class InfinityQSEventV4SourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(Result<InfinityQSEventV4[]>))]
public partial class ResultInfinityQSEventV4SourceGenerationContext : JsonSerializerContext
{
}

View File

@ -5,7 +5,7 @@ namespace OI.Metrology.Shared.DataModels;
public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
[property: JsonPropertyName("sl_uoos")] int? UperOOS,
[property: JsonPropertyName("sl_uoos")] int? UpperOOS,
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
[property: JsonPropertyName("se_tsno")] int SiteNumber,
@ -19,7 +19,7 @@ public record InfinityQSV3([property: JsonPropertyName("iq_sum")] int SumOOS,
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
[property: JsonPropertyName("sl_scal")] int? Scale,
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
[property: JsonPropertyName("sl_usl")] double? UperSpecLimit);
[property: JsonPropertyName("sl_usl")] double? UpperSpecLimit);
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(InfinityQSV3))]

View File

@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.DataModels;
public record InfinityQSV4([property: JsonPropertyName("iq_sum")] int SumOOS,
[property: JsonPropertyName("sl_aflag")] int? AlarmFlag,
[property: JsonPropertyName("sl_loos")] int? LowerOOS,
[property: JsonPropertyName("sl_uoos")] int? UpperOOS,
[property: JsonPropertyName("se_sgrp")] int SubGroupId,
[property: JsonPropertyName("se_sgtm")] int SubGroupDateTime,
[property: JsonPropertyName("se_tsno")] int SiteNumber,
[property: JsonPropertyName("td_test")] int VariableNumber,
[property: JsonPropertyName("pr_name")] string? Process,
[property: JsonPropertyName("jd_name")] string? Job,
[property: JsonPropertyName("pl_name")] string? Lot,
[property: JsonPropertyName("pd_name")] string? Part,
[property: JsonPropertyName("td_name")] string? Variable,
[property: JsonPropertyName("se_val")] double? Value,
[property: JsonPropertyName("sl_eflag")] int? EnableFlag,
[property: JsonPropertyName("sl_scal")] int? Scale,
[property: JsonPropertyName("sl_sls")] double? LowerSpecLimit,
[property: JsonPropertyName("sl_usl")] double? UpperSpecLimit);
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(InfinityQSV4))]
public partial class InfinityQSV4SourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)]
[JsonSerializable(typeof(Result<InfinityQSV4[]>))]
public partial class ResultInfinityQSV4SourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,8 @@
namespace OI.Metrology.Shared.DataModels;
public record WaferCounter(DateTime DateTime,
string DateTimeFormatted,
string EquipmentId,
string Text,
int Total,
string SlotMap);

15
Shared/Models/Cleans.cs Normal file
View File

@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record Cleans(
[property: JsonPropertyName("cleanRecipe")] string CleanRecipe,
[property: JsonPropertyName("cleanSigReq")] bool CleanSigReq
// [property: JsonPropertyName("cleanTools")] object[] cleanTools
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Cleans))]
public partial class CleansSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -12,8 +12,8 @@ public class DataResponse
{
HeaderID = -1;
Success = false;
Errors = new List<string>();
Warnings = new List<string>();
Errors = new();
Warnings = new();
}
}

View File

@ -1,9 +0,0 @@
namespace OI.Metrology.Shared.Models;
public interface IWorkingDirectory
{
static string GetWorkingDirectory(string? executingAssemblyName, string subDirectoryName) =>
WorkingDirectory.GetWorkingDirectory(executingAssemblyName, subDirectoryName);
}

View File

@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record Inspection(
[property: JsonPropertyName("microscope")] bool Microscope,
[property: JsonPropertyName("brightlight")] bool Brightlight,
[property: JsonPropertyName("inspSigReq")] bool InspSigReq,
[property: JsonPropertyName("inspInterval")] int? InspInterval
// [property: JsonPropertyName("frontSide")] FrontSide FrontSide,
// [property: JsonPropertyName("backSide")] BackSide BackSide
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Inspection))]
public partial class InspectionSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record NginxFileSystem(
[property: JsonPropertyName("name")] string Name,
[property: JsonPropertyName("type")] string Type,
[property: JsonPropertyName("mtime")] string MTime,
[property: JsonPropertyName("size")] float Size);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(NginxFileSystem))]
public partial class NginxFileSystemSourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(NginxFileSystem[]))]
public partial class NginxFileSystemCollectionSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,29 @@
using OI.Metrology.Shared.Models.Stateless;
using System.Globalization;
namespace OI.Metrology.Shared.Models;
public record NginxFileSystemSortable(DateTime DateTime,
Uri Uri,
string Name,
float Size,
string Type)
{
public static List<NginxFileSystemSortable> Convert(IFileShareRepository fileShareRepository, Uri waferSizeUri, NginxFileSystem[]? collection)
{
List<NginxFileSystemSortable> results = new();
NginxFileSystemSortable nginxFileSystemSortable;
string nginxFormat = "ddd, dd MMM yyyy HH:mm:ss zzz";
foreach (NginxFileSystem nginxFileSystem in collection ?? Array.Empty<NginxFileSystem>())
{
if (DateTime.TryParseExact(nginxFileSystem.MTime.Replace("GMT", "+00:00"), nginxFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTime))
nginxFileSystemSortable = new(dateTime, fileShareRepository.Append(waferSizeUri, nginxFileSystem.Name), nginxFileSystem.Name, nginxFileSystem.Size, nginxFileSystem.Type);
else
nginxFileSystemSortable = new(DateTime.MinValue, fileShareRepository.Append(waferSizeUri, nginxFileSystem.Name), nginxFileSystem.Name, nginxFileSystem.Size, nginxFileSystem.Type);
results.Add(nginxFileSystemSortable);
}
return results;
}
}

26
Shared/Models/ProdSpec.cs Normal file
View File

@ -0,0 +1,26 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record ProdSpec(
// [property: JsonPropertyName("keyId")] int KeyId,
// [property: JsonPropertyName("specType")] string SpecType,
// [property: JsonPropertyName("status")] string Status,
// [property: JsonPropertyName("minutesPerWafer")] double MinutesPerWafer,
// [property: JsonPropertyName("proveInTime")] int ProveInTime,
// [property: JsonPropertyName("layerType")] string LayerType,
// [property: JsonPropertyName("reactorType")] string ReactorType,
// [property: JsonPropertyName("susceptorType")] string SusceptorType,
// [property: JsonPropertyName("tubePressureType")] string TubePressureType,
// [property: JsonPropertyName("recipeLayers")] RecipeLayer[] RecipeLayers,
// [property: JsonPropertyName("prodVers")] ProdVer[] ProdVers,
// [property: JsonPropertyName("epiPart")] EpiPart EpiPart,
// [property: JsonPropertyName("custEpiParts")] CustEpiPart[] CustEpiParts,
[property: JsonPropertyName("prsStages")] PrsStage[] PrsStages
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(ProdSpec))]
public partial class ProdSpecSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record ProdSpecRoot(
[property: JsonPropertyName("prodSpec")] ProdSpec ProdSpec
// [property: JsonPropertyName("_links")] Links Links,
// [property: JsonPropertyName("_class")] string Class
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(ProdSpecRoot))]
public partial class ProdSpecRootSourceGenerationContext : JsonSerializerContext
{
}

19
Shared/Models/PrsStage.cs Normal file
View File

@ -0,0 +1,19 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record PrsStage(
[property: JsonPropertyName("keyId")] string KeyId,
[property: JsonPropertyName("psn")] int Psn,
[property: JsonPropertyName("stage")] string Stage,
[property: JsonPropertyName("cleans")] Cleans Cleans,
[property: JsonPropertyName("inspection")] Inspection Inspection,
[property: JsonPropertyName("surfscan")] Surfscan Surfscan,
[property: JsonPropertyName("qaMetTests")] QaMetTest[] QaMetTests
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(PrsStage))]
public partial class PrsStageSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,27 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record QaMetTest(
[property: JsonPropertyName("test")] string Test,
[property: JsonPropertyName("property")] string Property,
[property: JsonPropertyName("propertyDesc")] string PropertyDesc,
[property: JsonPropertyName("toolClass")] string ToolClass,
[property: JsonPropertyName("recipe")] string Recipe,
[property: JsonPropertyName("recipePattern")] string RecipePattern,
[property: JsonPropertyName("min")] double Min,
[property: JsonPropertyName("max")] double Max,
// [property: JsonPropertyName("phaseMin")] object PhaseMin,
// [property: JsonPropertyName("slots")] object Slots,
[property: JsonPropertyName("wfrQty")] int WfrQty,
[property: JsonPropertyName("reactSched")] bool ReactSched,
[property: JsonPropertyName("interval")] int Interval,
[property: JsonPropertyName("start")] int Start,
[property: JsonPropertyName("sequence")] string Sequence
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(QaMetTest))]
public partial class QaMetTestSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -39,5 +39,4 @@ public partial class ReactorSourceGenerationContext : JsonSerializerContext
[JsonSerializable(typeof(Reactor[]))]
public partial class ReactorCollectionSourceGenerationContext : JsonSerializerContext
{
}
}

View File

@ -0,0 +1,13 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record RunDataSheet(
[property: JsonPropertyName("PSN")] string PSN
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(RunDataSheet))]
public partial class RunDataSheetSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record RunDataSheetRoot(
[property: JsonPropertyName("rds")] RunDataSheet RunDataSheet,
[property: JsonPropertyName("prodSpec")] ProdSpec ProdSpec
// [property: JsonPropertyName("_links")] Links Links,
// [property: JsonPropertyName("_class")] string Class
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(RunDataSheetRoot))]
public partial class RunDataSheetRootSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,18 @@
namespace OI.Metrology.Shared.Models.Stateless;
public interface IFileShareController<T>
{
enum Action : int
{
Index = 0,
MarkAsPinned = 1
}
static string GetRouteName() => nameof(IFileShareController<T>)[1..^10];
T CopyFile(string from, string to);
T MoveFile(string from, string to);
T FileWrite(string path, string contents);
}

View File

@ -0,0 +1,16 @@
namespace OI.Metrology.Shared.Models.Stateless;
public interface IFileShareRepository
{
void CopyFile(string from, string to);
void MoveFile(string from, string to);
Uri Append(Uri uri, params string[] paths);
void FileWrite(string path, string contents);
HttpResponseMessage ReadFile(HttpClient httpClient, Uri uri);
void CopyFile(HttpClient httpClient, string from, string to);
void MoveFile(HttpClient httpClient, string from, string to);
void FileWrite(HttpClient httpClient, string path, string contents);
List<NginxFileSystemSortable> GetNginxFileSystemSortableCollection(HttpClient httpClient, Uri uri, string? endsWith);
}

View File

@ -0,0 +1,21 @@
namespace OI.Metrology.Shared.Models.Stateless;
public interface IInfinityQSV4Controller<T>
{
enum Action : int
{
Index = 0,
MarkAsPinned = 1
}
static string GetRouteName() => nameof(IInfinityQSV4Controller<T>)[1..^10];
T GetData(string sub_group_id);
T GetHeader(string sub_group_id);
T GetDescriptors(string sub_group_id);
T GetEpiProTempVerification(int[] night);
T GetEpiProTempVerificationRows(int[] night);
T GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe);
T GetCommandText(string sub_group_id, string process, string job, string part, string lot, string date_time);
}

View File

@ -0,0 +1,23 @@
using OI.Metrology.Shared.DataModels;
namespace OI.Metrology.Shared.Models.Stateless;
public interface IInfinityQSV4Repository
{
List<Reactor> GetReactors();
string GetRunDataSheet(string rds);
string GetCommandText(string subGroupId);
string GetEpiProTempVerification(int[] night);
string GetProductionSpecification(string part);
string GetCommandText(InfinityQSV4 infinityQSV2);
Result<InfinityQSV4[]> GetData(string subGroupId);
Result<InfinityQSV4[]> GetHeader(string subGroupId);
string GetCommandText(string process, string? part);
string GetCommandText(List<string> eppReactorNumbers);
List<string[]> GetEpiProTempVerificationRows(int[] night);
Result<InfinityQSDescriptorV4[]> GetDescriptors(string subGroupId);
string GetProductDataAverageSumOfDefectsProcessMeanProcessSigma(string process, string? recipe);
string GetCommandText(string? subGroupId, string? process, string? job, string? part, string? lot, string? dateTime);
}

View File

@ -21,7 +21,7 @@ public interface IMetrologyRepository
DataTable ExportData(string spName, DateTime startTime, DateTime endTime);
DataTable GetHeaders(int toolTypeId, DateTime? startTime, DateTime? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords);
DataTable GetHeaders(int toolTypeId, string? startTime, string? endTime, int? pageNo, int? pageSize, long? headerid, out long totalRecords);
DataTable GetData(int toolTypeId, long headerId);
DataTable GetDataSharePoint(int toolTypeId, string headerId);

View File

@ -1,13 +0,0 @@
using OI.Metrology.Shared.DataModels;
namespace OI.Metrology.Shared.Models.Stateless;
public interface IReactorsRepository
{
Result<int[]> EvenReactors();
Result<int[]> OddReactors();
string? GetKey(WorkMaterialOut workMaterialOut, bool save);
}

View File

@ -11,7 +11,7 @@ public interface IToolTypesController<T>
static string GetRouteName() => nameof(IToolTypesController<T>)[1..^10];
T Index();
T GetToolTypeMetadata(int id, string sortby = "");
T GetHeaders(int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid);
T GetHeaders(int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid);
T GetHeaderTitles(int id, int? page, int? pagesize);
T GetHeaderFields(int id, long headerid);
T GetData(int id, long headerid);

View File

@ -8,13 +8,14 @@ public interface IToolTypesRepository
{
Result<ToolTypeNameId[]> Index(IMetrologyRepository metrologyRepository);
Result<ToolTypeMetadataResult> GetToolTypeMetadata(IMetrologyRepository metrologyRepository, int id, string sortby = "");
Result<DataTable> GetHeaders(IMetrologyRepository metrologyRepository, int id, DateTime? datebegin, DateTime? dateend, int? page, int? pagesize, long? headerid);
Result<HeaderCommon[]> GetHeaderTitles(IMetrologyRepository metrologyRepository, int id, int? page, int? pagesize);
Result<ColumnValue[]> GetHeaderFields(IMetrologyRepository metrologyRepository, int id, long headerid);
Result<DataTable> GetData(IMetrologyRepository metrologyRepository, int id, long headerid);
Result<ColumnValue[]> GetHeaderFields(IMetrologyRepository metrologyRepository, int id, long headerid);
byte[] GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend);
Result<HeaderCommon[]> GetHeaderTitles(IMetrologyRepository metrologyRepository, int id, int? page, int? pagesize);
Result<ToolTypeMetadataResult> GetToolTypeMetadata(IMetrologyRepository metrologyRepository, int id, string sortby = "");
Result<DataTable> GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, string? datebegin, string? dateend);
string? OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, long headerid);
Result<DataTable> GetHeaders(IMetrologyRepository metrologyRepository, int id, string? datebegin, string? dateend, int? page, int? pagesize, long? headerid);
(string?, string?, Stream?) GetAttachment(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, int toolTypeId, string tabletype, string attachmentId, string filename);
string? OIExport(IMetrologyRepository metrologyRepository, IAttachmentsService attachmentsService, string attachmentPath, Dictionary<string, string> tableToPath, int toolTypeId, long headerid);
Result<DataTable> GetExportData(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend);
byte[] GetCSVExport(IMetrologyRepository metrologyRepository, int toolTypeId, DateTime? datebegin, DateTime? dateend);
}

View File

@ -0,0 +1,16 @@
namespace OI.Metrology.Shared.Models.Stateless;
public interface IWaferCounterController<T>
{
enum Action : int
{
Index = 0,
MarkAsPinned = 1
}
static string GetRouteName() => nameof(IWaferCounterController<T>)[1..^10];
T GetLastQuantityAndSlotMap(string area, string waferSize);
}

View File

@ -0,0 +1,9 @@
namespace OI.Metrology.Shared.Models.Stateless;
public interface IWaferCounterRepository
{
string? GetSlotMap(string line1, string line2);
DataModels.WaferCounter GetLastQuantityAndSlotMap(string area, string waferSize);
}

14
Shared/Models/Surfscan.cs Normal file
View File

@ -0,0 +1,14 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record Surfscan(
[property: JsonPropertyName("surfscanSigReq")] bool SurfscanSigReq,
[property: JsonPropertyName("surfscanRecipes")] SurfscanRecipe[] SurfscanRecipes
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Surfscan))]
public partial class SurfscanSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
namespace OI.Metrology.Shared.Models;
public record SurfscanRecipe(
[property: JsonPropertyName("recipe")] string Recipe,
[property: JsonPropertyName("defects")] int Defects,
[property: JsonPropertyName("haze")] int Haze,
[property: JsonPropertyName("sampleSize")] int? SampleSize
);
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(SurfscanRecipe))]
public partial class SurfscanRecipeSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -1,50 +0,0 @@
namespace OI.Metrology.Shared.Models;
internal abstract class WorkingDirectory
{
internal static string GetWorkingDirectory(string? executingAssemblyName, string subDirectoryName)
{
string result = string.Empty;
if (executingAssemblyName is null)
throw new Exception();
string traceFile;
List<string> directories = new();
Environment.SpecialFolder[] specialFolders = new Environment.SpecialFolder[]
{
Environment.SpecialFolder.LocalApplicationData,
Environment.SpecialFolder.ApplicationData,
Environment.SpecialFolder.History,
Environment.SpecialFolder.CommonApplicationData,
Environment.SpecialFolder.InternetCache
};
foreach (Environment.SpecialFolder specialFolder in specialFolders)
directories.Add(Path.Combine(Environment.GetFolderPath(specialFolder), subDirectoryName, executingAssemblyName));
foreach (string directory in directories)
{
for (int i = 1; i < 3; i++)
{
if (i == 1)
result = directory;
else
result = string.Concat("D", directory[1..]);
try
{
if (!Directory.Exists(result))
_ = Directory.CreateDirectory(result);
traceFile = string.Concat(result, @"\", DateTime.Now.Ticks, ".txt");
File.WriteAllText(traceFile, traceFile);
File.Delete(traceFile);
break;
}
catch (Exception) { result = string.Empty; }
}
if (!string.IsNullOrEmpty(result))
break;
}
if (string.IsNullOrEmpty(result))
throw new Exception("Unable to set working directory!");
return result;
}
}

View File

@ -2,13 +2,13 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PackageId>OI.Metrology.Shared</PackageId>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>6.0.202.9999</Version>
<Version>8.0.100.9999</Version>
<Authors>Mike Phares</Authors>
<Company>Infineon Technologies Americas Corp.</Company>
<IncludeSymbols>true</IncludeSymbols>
@ -29,8 +29,8 @@
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
</ItemGroup>
</Project>

View File

@ -4,5 +4,5 @@ namespace OI.Metrology.Shared.Repositories;
public interface IDbConnectionFactory
{
DbConnection GetDbConnection(bool? useOI2Sql = null);
DbConnection GetDbConnection(bool? useIqsConnection = null);
}

View File

@ -7,6 +7,6 @@ public interface IAttachmentsService
{
Stream GetAttachmentStreamByTitle(ToolType toolType, bool header, string title, string filename);
Stream GetAttachmentStreamByAttachmentId(ToolType toolType, bool header, Guid attachmentId, string filename);
string? GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, int toolTypeId, long headerId);
void SaveAttachment(ToolType toolType, long headerId, string dataUniqueId, string filename, object uploadedFile);
string? GetProcessDataStandardFormat(IMetrologyRepository metrologyRepository, string attachmentPath, int toolTypeId, long headerId);
}