Compare commits

..

21 Commits

Author SHA1 Message Date
44df972fca Infineon.EAF.Runtime v2.61.1 2025-10-15 07:24:26 -07:00
5dcbf1ff79 Handle center point zero readings 2025-10-15 07:24:15 -07:00
ccba3b8dba Add IndexOf and AttemptCounter properties to WSRequest and Description classes; implement getValue function in recipes-and-patterns.js 2025-10-13 17:43:00 -07:00
48ad90c0f1 Refactor OpenInsight file handling to utilize JsonElement for data processing and enhance serialization with JsonSourceGeneration. Updated methods across multiple classes to improve data handling and reduce dependencies on ProcessDataStandardFormat. 2025-09-08 15:31:55 -07:00
7739ff03a2 Switched to xml for InfinityQS export 2025-09-02 08:14:26 -07:00
34ba8a4843 Preparation to switch to xml for InfinityQS export 2025-08-27 11:47:15 -07:00
ac3463dccd Infineon.EAF.Runtime v2.60.0 2025-06-11 07:34:54 -07:00
374e375c5e json in process-data-standard-format
when mes-entity-matches-process save to MET08THFTIRQS408M

EDA Logic for GV
2025-05-19 10:23:00 -07:00
13bd899101 process-data-standard-format with Pipes, HeaderId and SubgroupId 2025-04-24 19:52:45 -07:00
61188f434d UniqueId replacement for attachments
Write input PDSF in output after EOF

GetPropertyValue for MoveMatchingFiles

ProcessDataStandardFormat over Tuple

MoveMatchingFiles to use ProcessDataStandardFormatMapping
2025-04-23 13:45:07 -07:00
4e8348ebc8 ProcessDataStandardFormat
run.json
descriptions.json
Infineon.Mesa.PDF.Text.Stripper 4.8.0.2
WaferMean
NestExistingFiles only for TriggerOnCreated
txt now writes .a and .b csv file
Stratus doesn't work the .csv file
MSTEST0037
2025-03-03 14:49:22 -07:00
c938da28c2 Infineon.EAF.Runtime v2.59.0 2025-02-20 11:13:58 -07:00
2453d448e7 using Adaptation.FileHandlers.Stratus; 2025-02-17 12:40:52 -07:00
55dbbc517c Build Pipeline 2025-02-05 16:24:18 -07:00
8f8ab10f98 Back to comma 2025-02-05 16:24:08 -07:00
4e94322c66 v2.58.0 2025-01-15 14:08:04 -07:00
7ee0390585 B) No Data and C) No Data 2025-01-15 12:39:56 -07:00
d4d935d2f1 TSV like PDSF ready to test 2025-01-14 11:22:47 -07:00
334929a025 Require Complete
IDE0060
2024-11-20 12:35:54 -07:00
a95f783733 FlagDuplicates
CA1510
Complete
2024-11-18 14:27:59 -07:00
49fddcf319 Ready to test 2024-10-16 11:12:10 -07:00
113 changed files with 8093 additions and 2641 deletions

View File

@ -92,8 +92,9 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
dotnet_code_quality.CAXXXX.api_surface = private, internal dotnet_code_quality.CAXXXX.api_surface = private, internal
dotnet_diagnostic.CA1510.severity = none # CA1510: Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
@ -109,7 +110,7 @@ dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary dotnet_diagnostic.IDE0005.severity = none # Using directive is unnecessary
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031) dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
@ -121,6 +122,8 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
dotnet_diagnostic.MSTEST0015.severity = none # MSTEST0015: Test method {method} should not be ignored
dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods
dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case

View File

@ -1,10 +1,43 @@
{ {
"configurations": [ "configurations": [
{
"mode": "debug",
"name": "Go launch file",
"program": "${file}",
"request": "launch",
"type": "go"
},
{
"name": "node Launch Current Opened File",
"program": "${file}",
"request": "launch",
"type": "node"
},
{
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "neverOpen",
"name": "Debug File",
"program": "${file}",
"request": "launch",
"stopOnEntry": false,
"type": "bun",
"watchMode": false
},
{
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "neverOpen",
"name": "Run File",
"noDebug": true,
"program": "${file}",
"request": "launch",
"type": "bun",
"watchMode": false
},
{ {
"name": ".NET Core Attach", "name": ".NET Core Attach",
"type": "coreclr", "processId": 32760,
"request": "attach", "request": "attach",
"processId": 24640 "type": "coreclr"
} }
] ]
} }

View File

@ -1,19 +1,134 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"inputs": [
{
"default": "Development",
"description": "Which ASP Net Core Environment?",
"id": "ASPNETCORE_ENVIRONMENT",
"options": [
"Development",
"Production"
],
"type": "pickString"
},
{
"default": "{AssemblyTitle}",
"description": "What Assembly Title?",
"id": "AssemblyTitle",
"type": "promptString"
},
{
"default": "{Build.BuildId}",
"description": "Which Build BuildId?",
"id": "Build.BuildId",
"type": "promptString"
},
{
"default": "{Build.Reason}",
"description": "Which Build Reason?",
"id": "Build.Reason",
"type": "promptString"
},
{
"default": "{Build.Repository.Id}",
"description": "Which Build Repository Id?",
"id": "Build.Repository.Id",
"type": "promptString"
},
{
"default": "{Build.Repository.Name}",
"description": "Which Build Repository Name?",
"id": "Build.Repository.Name",
"type": "promptString"
},
{
"default": "{Build.SourceVersion}",
"description": "Which Build Source Version?",
"id": "Build.SourceVersion",
"type": "promptString"
},
{
"default": "Debug",
"description": "Which Configuration?",
"id": "Configuration",
"options": [
"Debug",
"Release"
],
"type": "pickString"
},
{
"default": "net8.0",
"description": "Which Core Version?",
"id": "CoreVersion",
"options": [
"net8.0"
],
"type": "pickString"
},
{
"default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
"description": "Which MS Build?",
"id": "MSBuild",
"type": "promptString"
},
{
"default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/",
"description": "Which Nuget Source?",
"id": "NugetSource",
"type": "promptString"
},
{
"default": "win-x64",
"description": "Which Runtime?",
"id": "Runtime",
"options": [
"win-x64",
"win-x32",
"linux-x64",
"linux-x32"
],
"type": "pickString"
},
{
"default": "L:/",
"description": "Which System DefaultWorkingDirectory?",
"id": "System.DefaultWorkingDirectory",
"options": [
"L:/",
"D:/",
"C:/"
],
"type": "pickString"
},
{
"default": "v4.8",
"description": "Which Core Target Framework Version?",
"id": "TargetFrameworkVersion",
"options": [
"v4.8"
],
"type": "pickString"
},
{
"default": "{UserSecretsId}",
"description": "Which Core User Secrets Id?",
"id": "UserSecretsId",
"type": "promptString"
}
],
"tasks": [ "tasks": [
{ {
"label": "Build", "label": "Build",
"command": "dotnet", "command": "dotnet",
"type": "process", "type": "process",
"args": [ "args": [
"build", "build"
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },
{ {
"label": "Test-Debug", "label": "Test Debug",
"command": "dotnet", "command": "dotnet",
"type": "process", "type": "process",
"args": [ "args": [
@ -24,7 +139,7 @@
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },
{ {
"label": "Test-Release", "label": "Test Release",
"command": "dotnet", "command": "dotnet",
"type": "process", "type": "process",
"args": [ "args": [
@ -49,6 +164,16 @@
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },
{
"label": "Format Whitespaces",
"command": "dotnet",
"type": "process",
"args": [
"format",
"whitespace"
],
"problemMatcher": "$msCompile"
},
{ {
"label": "Nuget Clear", "label": "Nuget Clear",
"command": "dotnet", "command": "dotnet",
@ -68,7 +193,7 @@
"args": [ "args": [
"/target:Build", "/target:Build",
"/restore:True", "/restore:True",
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
"/detailedsummary", "/detailedsummary",
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8", "/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
@ -76,6 +201,38 @@
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
}, },
{
"label": "Code Project",
"type": "shell",
"command": "code ../MET08THFTIRSTRATUS.csproj",
"problemMatcher": []
},
{
"label": "Code Read Me",
"type": "shell",
"command": "code ../README.md",
"problemMatcher": []
},
{
"label": "File-Folder-Helper AOT s X Day-Helper-2025-03-20",
"type": "shell",
"command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
"args": [
"s",
"X",
"L:/DevOps/EAF-Mesa-Integration/MET08THFTIRSTRATUS",
"Day-Helper-2025-03-20",
"false",
"4"
],
"problemMatcher": []
},
{
"label": "Code Git Config",
"type": "shell",
"command": "code ../.git/config",
"problemMatcher": []
},
{ {
"label": "Kanbn Console", "label": "Kanbn Console",
"type": "npm", "type": "npm",

View File

@ -14,7 +14,7 @@ namespace Adaptation.FileHandlers.APC;
public class FileRead : Shared.FileRead, IFileRead public class FileRead : Shared.FileRead, IFileRead
{ {
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -120,15 +120,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); _Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements); List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions); FileCopy(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -18,7 +18,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _JobIdParentDirectory; private readonly string _JobIdParentDirectory;
private readonly string _JobIdArchiveParentDirectory; private readonly string _JobIdArchiveParentDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -115,14 +115,15 @@ public class FileRead : Shared.FileRead, IFileRead
} }
} }
#pragma warning disable IDE0060
private void MoveArchive(string reportFullPath, DateTime dateTime) private void MoveArchive(string reportFullPath, DateTime dateTime)
#pragma warning restore IDE0060
{ {
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
string logisticsSequence = _Logistics.Sequence.ToString(); string logisticsSequence = _Logistics.Sequence.ToString();
string day = $"{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
string destinationArchiveDirectory = Path.Combine(_JobIdArchiveParentDirectory, _Logistics.JobID, weekDirectory); string destinationArchiveDirectory = Path.Combine(_JobIdArchiveParentDirectory, _Logistics.JobID, weekDirectory, day);
if (!Directory.Exists(destinationArchiveDirectory)) if (!Directory.Exists(destinationArchiveDirectory))
_ = Directory.CreateDirectory(destinationArchiveDirectory); _ = Directory.CreateDirectory(destinationArchiveDirectory);
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID); string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
@ -144,15 +145,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); _Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements); List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
MoveArchive(reportFullPath, dateTime); MoveArchive(reportFullPath, dateTime);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -9,7 +9,7 @@ namespace Adaptation.FileHandlers;
public class CellInstanceConnectionName public class CellInstanceConnectionName
{ {
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount) internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
{ {
IFileRead result = cellInstanceConnectionName switch IFileRead result = cellInstanceConnectionName switch
{ {

View File

@ -24,7 +24,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly HttpClient _HttpClient; private readonly HttpClient _HttpClient;
private readonly string _StaticFileServer; private readonly string _StaticFileServer;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -38,7 +38,8 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
_HttpClient = new(); _HttpClient = new();
_StaticFileServer = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".StaticFileServer")); _StaticFileServer = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".StaticFileServer"));
NestExistingFiles(_FileConnectorConfiguration); if (_IsEAFHosted)
NestExistingFiles(_FileConnectorConfiguration);
if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process) if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process)
_Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite); _Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite);
else else

View File

@ -23,7 +23,7 @@ public class FileRead : Shared.FileRead, IFileRead
private int _LastDummyRunIndex; private int _LastDummyRunIndex;
private readonly string[] _CellNames; private readonly string[] _CellNames;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;

View File

@ -14,7 +14,7 @@ namespace Adaptation.FileHandlers.IQSSi;
public class FileRead : Shared.FileRead, IFileRead public class FileRead : Shared.FileRead, IFileRead
{ {
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -103,7 +103,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
private void FileCopy<T>(string reportFullPath, DateTime dateTime, List<T> descriptions) where T : Shared.Properties.IDescription private void WriteFile<T>(string reportFullPath, DateTime dateTime, List<T> descriptions) where T : Shared.Properties.IDescription
{ {
bool isDummyRun = false; bool isDummyRun = false;
string successDirectory = string.Empty; string successDirectory = string.Empty;
@ -111,23 +111,24 @@ public class FileRead : Shared.FileRead, IFileRead
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
if (!Directory.Exists(duplicateDirectory)) if (!Directory.Exists(duplicateDirectory))
_ = Directory.CreateDirectory(duplicateDirectory); _ = Directory.CreateDirectory(duplicateDirectory);
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); string duplicateFile = Path.Combine(duplicateDirectory, $"{Path.GetFileName(reportFullPath)}.xml");
File.Copy(reportFullPath, duplicateFile, overwrite: true); string xml = ProcessDataStandardFormat.GetXml(reportFullPath);
File.WriteAllText(duplicateFile, xml);
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
} }
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); _Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements); List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions); WriteFile(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -5,17 +5,75 @@ using Adaptation.Shared.Duplicator;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO; using System.IO;
using System.Linq;
using System.Text; using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Threading; using System.Threading;
namespace Adaptation.FileHandlers.MoveMatchingFiles; namespace Adaptation.FileHandlers.MoveMatchingFiles;
#nullable enable
public class FileRead : Shared.FileRead, IFileRead public class FileRead : Shared.FileRead, IFileRead
{ {
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : internal class PreWith
{
internal string ErrFile { get; private set; }
internal string CheckFile { get; private set; }
internal string MatchingFile { get; private set; }
internal string CheckDirectory { get; private set; }
internal string NoWaitDirectory { get; private set; }
internal PreWith(string checkDirectory,
string checkFile,
string errFile,
string matchingFile,
string noWaitDirectory)
{
ErrFile = errFile;
CheckFile = checkFile;
MatchingFile = matchingFile;
CheckDirectory = checkDirectory;
NoWaitDirectory = noWaitDirectory;
}
}
internal class Pre
{
internal string MatchingFile { get; private set; }
internal string CheckFile { get; private set; }
internal Pre(string matchingFile, string checkFile)
{
MatchingFile = matchingFile;
CheckFile = checkFile;
}
}
internal class Post
{
internal string ErrFile { get; private set; }
internal string CheckFile { get; private set; }
internal Post(string checkFile, string errFile)
{
ErrFile = errFile;
CheckFile = checkFile;
}
}
private readonly ProcessDataStandardFormatMapping _ProcessDataStandardFormatMapping;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -27,6 +85,12 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
if (!_IsDuplicator) if (!_IsDuplicator)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
string processDataStandardFormatMappingOldColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Old.Column.Names");
string processDataStandardFormatMappingNewColumnNames = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.New.Column.Names");
string processDataStandardFormatMappingColumnIndices = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Process.Data.Standard.Format.Mapping.Column.Indices");
_ProcessDataStandardFormatMapping = ProcessDataStandardFormatMapping.Get(processDataStandardFormatMappingOldColumnNames,
processDataStandardFormatMappingNewColumnNames,
processDataStandardFormatMappingColumnIndices);
} }
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
@ -41,7 +105,8 @@ public class FileRead : Shared.FileRead, IFileRead
Move(extractResults); Move(extractResults);
} }
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); void IFileRead.WaitForThread() =>
WaitForThread(thread: null, threadExceptions: null);
string IFileRead.GetEventDescription() string IFileRead.GetEventDescription()
{ {
@ -88,7 +153,7 @@ public class FileRead : Shared.FileRead, IFileRead
DateTime dateTime = DateTime.Now; DateTime dateTime = DateTime.Now;
results = GetExtractResult(reportFullPath, dateTime); results = GetExtractResult(reportFullPath, dateTime);
if (results.Item3 is null) if (results.Item3 is null)
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]") ?? throw new Exception(), results.Item4);
if (results.Item3.Length > 0 && _IsEAFHosted) if (results.Item3.Length > 0 && _IsEAFHosted)
WritePDSF(this, results.Item3); WritePDSF(this, results.Item3);
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
@ -104,7 +169,33 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
private static List<string> GetSearchDirectories(int numberLength, string parentDirectory) private static ReadOnlyCollection<PreWith> GetPreWithCollection(ReadOnlyCollection<Pre> preCollection)
{
List<PreWith> results = new();
string errFile;
PreWith preWith;
string? checkDirectory;
string noWaitDirectory;
foreach (Pre pre in preCollection)
{
errFile = string.Concat(pre.CheckFile, ".err");
checkDirectory = Path.GetDirectoryName(pre.CheckFile);
if (string.IsNullOrEmpty(checkDirectory))
continue;
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
preWith = new(checkDirectory: checkDirectory,
checkFile: pre.CheckFile,
errFile: errFile,
matchingFile: pre.MatchingFile,
noWaitDirectory: noWaitDirectory);
results.Add(preWith);
}
return results.AsReadOnly();
}
private static ReadOnlyCollection<string> GetSearchDirectories(int numberLength, string parentDirectory)
{ {
List<string> results = new(); List<string> results = new();
string[] directories = Directory.GetDirectories(parentDirectory, "*", SearchOption.TopDirectoryOnly); string[] directories = Directory.GetDirectories(parentDirectory, "*", SearchOption.TopDirectoryOnly);
@ -115,10 +206,138 @@ public class FileRead : Shared.FileRead, IFileRead
results.Add(directory); results.Add(directory);
} }
results.Sort(); results.Sort();
return results.AsReadOnly();
}
private static void CreatePointerFile(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
{
string checkFile;
string writeFile;
string? directoryName;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
directoryName = Path.GetDirectoryName(matchingFile);
if (directoryName is null)
continue;
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
if (File.Exists(writeFile))
continue;
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
}
}
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
{
List<Pre> results = new();
Pre pre;
string checkFile;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
pre = new(matchingFile, checkFile);
results.Add(pre);
}
return results.AsReadOnly();
}
private void MoveCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
{
ReadOnlyCollection<Post> postCollection = GetPostCollection(dateTime, processDataStandardFormat, preWithCollection);
if (postCollection.Count != 0)
{
Thread.Sleep(500);
StringBuilder stringBuilder = new();
foreach (Post post in postCollection)
{
if (File.Exists(post.ErrFile))
_ = stringBuilder.AppendLine(File.ReadAllText(post.ErrFile));
if (File.Exists(post.CheckFile))
_ = stringBuilder.AppendLine($"<{post.CheckFile}> was not consumed by the end!");
}
if (stringBuilder.Length > 0)
throw new Exception(stringBuilder.ToString());
}
}
private ReadOnlyCollection<Post> GetPostCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
{
List<Post> results = new();
Post post;
long preWait;
foreach (PreWith preWith in preWithCollection)
{
if (!_IsEAFHosted)
continue;
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
wsResults = null;
if (processDataStandardFormat.InputPDSF is null)
File.Move(preWith.MatchingFile, preWith.CheckFile);
else
{
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
File.Delete(preWith.MatchingFile);
}
if (Directory.Exists(preWith.NoWaitDirectory))
{
post = new(preWith.CheckFile, preWith.ErrFile);
results.Add(post);
continue;
}
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
else
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
for (short i = 0; i < short.MaxValue; i++)
{
if (DateTime.Now.Ticks > preWait)
break;
Thread.Sleep(500);
}
for (int i = 0; i < int.MaxValue; i++)
{
if (File.Exists(preWith.ErrFile))
throw new Exception(File.ReadAllText(preWith.ErrFile));
if (!File.Exists(preWith.CheckFile))
break;
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
Thread.Sleep(500);
}
}
return results.AsReadOnly();
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, _ProcessDataStandardFormatMapping);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
if (!_IsEAFHosted)
ProcessDataStandardFormat.Write("../../.pdsf", processDataStandardFormat, wsResults: null);
SetFileParameterLotIDToLogisticsMID();
int numberLength = 2;
long ticks = dateTime.Ticks;
string parentParentDirectory = GetParentParent(reportFullPath);
ReadOnlyCollection<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
ReadOnlyCollection<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
if (matchingFiles.Count != searchDirectories.Count)
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
if (_IsEAFHosted)
{
try
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
catch (Exception) { }
}
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles);
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
return results; return results;
} }
private List<string> GetMatchingFiles(long ticks, string reportFullPath, List<string> searchDirectories) private ReadOnlyCollection<string> GetMatchingFiles(long ticks, string reportFullPath, ReadOnlyCollection<string> searchDirectories)
{ {
List<string> results = new(); List<string> results = new();
string[] found; string[] found;
@ -137,129 +356,7 @@ public class FileRead : Shared.FileRead, IFileRead
break; break;
} }
} }
return results; return results.AsReadOnly();
}
private static List<(string matchingFile, string checkFile)> GetCollection(int numberLength, string parentDirectory, List<string> matchingFiles)
{
List<(string matchingFile, string checkFile)> results = new();
string checkFile;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
results.Add(new(matchingFile, checkFile));
}
return results;
}
private static List<(string, string, string, string, string)> GetCollection(List<(string matchingFile, string checkFile)> collection)
{
List<(string, string, string, string, string)> results = new();
string errFile;
string checkDirectory;
string noWaitDirectory;
foreach ((string matchingFile, string checkFile) in collection)
{
errFile = string.Concat(checkFile, ".err");
checkDirectory = Path.GetDirectoryName(checkFile);
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
results.Add(new(matchingFile, checkFile, errFile, checkDirectory, noWaitDirectory));
}
return results;
}
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
{
long preWait;
List<(string checkFile, string errFile)> postCollection = new();
foreach ((string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory) in GetCollection(collection))
{
File.Move(matchingFile, checkFile);
if (Directory.Exists(noWaitDirectory))
{
postCollection.Add(new(checkFile, errFile));
continue;
}
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
else
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
for (short i = 0; i < short.MaxValue; i++)
{
if (DateTime.Now.Ticks > preWait)
break;
Thread.Sleep(500);
}
for (int i = 0; i < int.MaxValue; i++)
{
if (File.Exists(errFile))
throw new Exception(File.ReadAllText(errFile));
if (!File.Exists(checkFile))
break;
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
Thread.Sleep(500);
}
}
if (postCollection.Count != 0)
{
Thread.Sleep(500);
StringBuilder stringBuilder = new();
foreach ((string checkFile, string errFile) in postCollection)
{
if (File.Exists(errFile))
_ = stringBuilder.AppendLine(File.ReadAllText(errFile));
if (File.Exists(checkFile))
_ = stringBuilder.AppendLine($"<{checkFile}> was not consumed by the end!");
}
if (stringBuilder.Length > 0)
throw new Exception(stringBuilder.ToString());
}
}
private static void CreatePointerFile(int numberLength, string parentDirectory, List<string> matchingFiles)
{
#nullable enable
string checkFile;
string writeFile;
string? directoryName;
int parentDirectoryLength = parentDirectory.Length;
foreach (string matchingFile in matchingFiles)
{
directoryName = Path.GetDirectoryName(matchingFile);
if (directoryName is null)
continue;
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
if (File.Exists(writeFile))
continue;
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
}
#nullable disable
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
SetFileParameterLotIDToLogisticsMID();
int numberLength = 2;
long ticks = dateTime.Ticks;
string parentParentDirectory = GetParentParent(reportFullPath);
List<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
if (matchingFiles.Count != searchDirectories.Count)
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
try
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
catch (Exception) { }
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
MoveCollection(dateTime, collection);
return results;
} }
} }

View File

@ -21,7 +21,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightFilePattern; private readonly string _OpenInsightFilePattern;
private readonly string _OpenInsightApiECDirectory; private readonly string _OpenInsightApiECDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -113,89 +113,61 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
private string GetLines(List<Stratus.Description> descriptions) private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<Stratus.Description> descriptions, Test[] tests)
{
StringBuilder results = new();
char del = '\t';
Stratus.Description x = descriptions[0];
_ = results.Append("Stratus_").Append(_Logistics.MID).Append('_').Append(_Logistics.DateTimeFromSequence.ToString("yyyyMMddhhmmssfff")).Append(del).
Append(x.Date).Append(del).
Append(_Logistics.JobID).Append(del).
Append("FQA Thickness").Append(del).
Append(x.Employee).Append(del).
Append(x.Recipe).Append(del).
Append(x.Reactor).Append(del).
Append(x.RDS).Append(del).
Append(x.PSN).Append(del).
Append(x.Lot).Append(del).
Append(x.Cassette).Append(del).
Append(x.MeanThickness);
for (int i = 0; i < descriptions.Count; i++)
_ = results.Append(del).Append(descriptions[i].Slot).
Append(del).Append(descriptions[i].Mean);
return results.ToString();
}
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<Stratus.Description> descriptions, Test[] tests)
{ {
string duplicateFile;
bool isDummyRun = false; bool isDummyRun = false;
List<(Shared.Properties.IScopeInfo, string)> collection = new(); List<(Shared.Properties.IScopeInfo, string)> collection = new();
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
if (!Directory.Exists(duplicateDirectory)) if (!Directory.Exists(duplicateDirectory))
_ = Directory.CreateDirectory(duplicateDirectory); _ = Directory.CreateDirectory(duplicateDirectory);
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
if (!Directory.Exists(Path.Combine(duplicateDirectory, "1"))) if (descriptions.Count == 0 || tests.Length == 0)
duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
else
{ {
string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation); long? subgroupId;
if (parentParent.Contains(_CellInstanceName)) string fileName = Path.GetFileName(reportFullPath);
parentParent = Path.GetDirectoryName(parentParent); long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
duplicateDirectory = Path.Combine(parentParent, "Data"); long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
if (!Directory.Exists(duplicateDirectory)) if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN))
_ = Directory.CreateDirectory(duplicateDirectory); subgroupId = null;
} else
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); (subgroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
if (descriptions.Count != 0 && tests.Length != 0) if (_StaticRuns.TryGetValue(_Logistics.Sequence, out List<WS.Results> wsResults))
{
string lines = GetLines(descriptions);
if (!string.IsNullOrEmpty(lines))
{ {
long? subGroupId; if (wsResults is null || wsResults.Count != 1)
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; throw new NullReferenceException($"{nameof(wsResults)} {wsResults?.Count} != 1 {_Logistics.Sequence}!");
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; lock (_StaticRuns)
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN)) wsResults[0] = WS.Results.Get(wsResults[0], subgroupId);
subGroupId = null;
else
(subGroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
if (subGroupId is null)
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
else
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines));
if (_StaticRuns.TryGetValue(_Logistics.Sequence, out List<string> values))
{
if (values.Count != 1)
throw new Exception($"{nameof(_StaticRuns)} {values.Count} != 1 {_Logistics.Sequence}!");
values[0] = $"{values[0]}|{subGroupId}";
}
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, logistics, descriptions.First(), lines, subGroupId, weekOfYear);
} }
if (!fileName.StartsWith("Viewer"))
duplicateFile = Path.Combine(duplicateDirectory, $"{subgroupId} {fileName}".TrimStart());
else
duplicateFile = Path.Combine(duplicateDirectory, $"{$"Viewer {subgroupId}".TrimEnd()} {fileName.Replace("Viewer", string.Empty)}");
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, descriptions.First(), subgroupId, weekOfYear);
} }
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
{
File.Copy(reportFullPath, duplicateFile, overwrite: true);
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
}
} }
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); string[] lines = File.ReadAllLines(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements); List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests); SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics[0]), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -1,5 +1,6 @@
using Adaptation.Shared; using Adaptation.Shared;
using System; using System;
using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Globalization; using System.Globalization;
@ -16,65 +17,174 @@ public class FromIQS
#nullable enable #nullable enable
private static string GetCommandText(DateTime dateTime)
{ // cSpell:disable
List<string> results = new();
TimeSpan timeSpan = new(dateTime.ToUniversalTime().AddDays(-1).Ticks - new DateTime(1970, 01, 01).Ticks);
long infinityQS = (long)Math.Floor(timeSpan.TotalSeconds);
results.Add(" select count_se_sgtm CountSeSgtm, ");
results.Add(" dateadd(HH, -7, (dateadd(SS, convert(bigint, max_se_sgtm), '19700101'))) DateTime, ");
results.Add(" max_max_se_test MaxMaxSeTest, ");
results.Add(" ( ");
results.Add(" select td.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
results.Add(" where td.f_test = max_max_se_test ");
results.Add(" ) MaxMaxSeTestName, ");
results.Add(" max_max_se_val MaxMaxSeVal, ");
results.Add(" max_se_lot MaxSeLot, ");
results.Add(" ( ");
results.Add(" select pl.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PART_LOT] pl ");
results.Add(" where max_se_lot = pl.f_lot ");
results.Add(" ) MaxSeLotName, ");
results.Add(" max_se_part MaxSePart, ");
results.Add(" ( ");
results.Add(" select rd.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PART_DAT] rd ");
results.Add(" where max_se_part = rd.f_part ");
results.Add(" ) MaxSePartName, ");
results.Add(" max_se_prcs MaxSePrcs, ");
results.Add(" ( ");
results.Add(" select rd.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[PRCS_DAT] rd ");
results.Add(" where max_se_prcs = rd.f_prcs ");
results.Add(" ) MaxSePrcsName, ");
results.Add(" max_se_sgrp MaxSeSgrp, ");
results.Add(" min_min_se_test MinMinSeTest, ");
results.Add(" ( ");
results.Add(" select td.f_name ");
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
results.Add(" where td.f_test = min_min_se_test ");
results.Add(" ) MinMinSeTestName, ");
results.Add(" min_min_se_val MinMinSeVal, ");
results.Add(" min_se_sgrp MinSeSgrp ");
results.Add(" from ( ");
results.Add(" select count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" min_se_sgrp, ");
results.Add(" max(max_se_val) max_max_se_val, ");
results.Add(" min(min_se_val) min_min_se_val, ");
results.Add(" max(max_se_test) max_max_se_test, ");
results.Add(" min(min_se_test) min_min_se_test ");
results.Add(" from ( ");
results.Add(" select count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_val, ");
results.Add(" min_se_val, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" max_se_test, ");
results.Add(" min_se_sgrp, ");
results.Add(" min_se_test ");
results.Add(" from ( ");
results.Add(" select ");
results.Add(" max(se.f_lot) max_se_lot, ");
results.Add(" max(se.f_val) max_se_val, ");
results.Add(" min(se.f_lot) min_se_lot, ");
results.Add(" min(se.f_val) min_se_val, ");
results.Add(" max(se.f_part) max_se_part, ");
results.Add(" max(se.f_prcs) max_se_prcs, ");
results.Add(" max(se.f_sgrp) max_se_sgrp, ");
results.Add(" max(se.f_sgtm) max_se_sgtm, ");
results.Add(" max(se.f_test) max_se_test, ");
results.Add(" min(se.f_part) min_se_part, ");
results.Add(" min(se.f_prcs) min_se_prcs, ");
results.Add(" min(se.f_sgrp) min_se_sgrp, ");
results.Add(" min(se.f_sgtm) min_se_sgtm, ");
results.Add(" min(se.f_test) min_se_test, ");
results.Add(" count(se.f_sgtm) count_se_sgtm ");
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
results.Add(" where se.f_tsno = 1 ");
results.Add(" and se.f_flag = 0 ");
results.Add($" and se.f_sgtm > {infinityQS} ");
results.Add(" group by se.f_sgtm, se.f_prcs, se.f_lot, se.f_test, se.f_val ");
results.Add(" ) qa ");
results.Add(" where qa.count_se_sgtm > 1 ");
results.Add(" and min_se_lot = max_se_lot ");
results.Add(" and min_se_val = max_se_val ");
results.Add(" and min_se_val = max_se_val ");
results.Add(" and min_se_part = max_se_part ");
results.Add(" and min_se_prcs = max_se_prcs ");
results.Add(" and min_se_sgtm = max_se_sgtm ");
results.Add(" and min_se_test = max_se_test ");
results.Add(" ) qb ");
results.Add(" group by count_se_sgtm, ");
results.Add(" max_se_lot, ");
results.Add(" max_se_part, ");
results.Add(" max_se_prcs, ");
results.Add(" max_se_sgrp, ");
results.Add(" max_se_sgtm, ");
results.Add(" min_se_sgrp ");
results.Add(" ");
results.Add(" ) qc ");
results.Add(" order by max_se_sgrp desc ");
results.Add(" for json path ");
return string.Join(Environment.NewLine, results);
} // cSpell:restore
private static string GetCommandText(Logistics logistics, Stratus.Description description, string dateTime, long? subGroupId) private static string GetCommandText(Logistics logistics, Stratus.Description description, string dateTime, long? subGroupId)
{ // cSpell:disable { // cSpell:disable
StringBuilder result = new(); List<string> results = new();
_ = result results.Add(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ");
.AppendLine(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ") results.Add(" from ( ");
.AppendLine(" from ( ") results.Add(" select ");
.AppendLine(" select ") results.Add(" se.f_sgrp se_sgrp, ");
.AppendLine(" se.f_sgrp se_sgrp, ") results.Add(" se.f_sgtm se_sgtm, ");
.AppendLine(" se.f_sgtm se_sgtm, ") results.Add(" se.f_tsno se_tsno, ");
.AppendLine(" se.f_tsno se_tsno, ") results.Add(" se.f_val se_val, ");
.AppendLine(" se.f_val se_val, ") results.Add(" pr.f_name pr_name, ");
.AppendLine(" pr.f_name pr_name, ") results.Add(" jd.f_name jd_name, ");
.AppendLine(" jd.f_name jd_name, ") results.Add(" pl.f_name pl_name, ");
.AppendLine(" pl.f_name pl_name, ") results.Add(" pd.f_name pd_name, ");
.AppendLine(" pd.f_name pd_name, ") results.Add(" td.f_test td_test, ");
.AppendLine(" td.f_test td_test, ") results.Add(" td.f_name td_name, ");
.AppendLine(" td.f_name td_name, ") results.Add(" (select count(cl.f_part) ");
.AppendLine(" (select count(cl.f_part) ") results.Add(" from [spcepiworld].[dbo].[ctrl_lim] cl ");
.AppendLine(" from [spcepiworld].[dbo].[ctrl_lim] cl ") results.Add(" where cl.f_part = pd.f_part ");
.AppendLine(" where cl.f_part = pd.f_part ") results.Add(" and cl.f_test = td.f_test ");
.AppendLine(" and cl.f_test = td.f_test ") results.Add(" ) cl_count, ");
.AppendLine(" ) cl_count, ") results.Add(" (select count(sl.f_part) ");
.AppendLine(" (select count(sl.f_part) ") results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ") results.Add(" where sl.f_part = pd.f_part ");
.AppendLine(" where sl.f_part = pd.f_part ") results.Add(" and sl.f_test = td.f_test ");
.AppendLine(" and sl.f_test = td.f_test ") results.Add(" ) sl_count, ");
.AppendLine(" ) sl_count, ") results.Add(" (select count(ev.f_evnt) ");
.AppendLine(" (select count(ev.f_evnt) ") results.Add(" from [spcepiworld].[dbo].[evnt_inf] ev ");
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ") results.Add(" where ev.f_prcs = pr.f_prcs ");
.AppendLine(" where ev.f_prcs = pr.f_prcs ") results.Add(" and ev.f_part = pd.f_part ");
.AppendLine(" and ev.f_part = pd.f_part ") results.Add(" and ev.f_sgtm = se.f_sgtm ");
.AppendLine(" and ev.f_sgtm = se.f_sgtm ") results.Add(" ) ev_count ");
.AppendLine(" ) ev_count ") results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ") results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] pr ") results.Add(" on se.f_prcs = pr.f_prcs ");
.AppendLine(" on se.f_prcs = pr.f_prcs ") results.Add(" join [spcepiworld].[dbo].[job_dat] jd ");
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ") results.Add(" on se.f_job = jd.f_job ");
.AppendLine(" on se.f_job = jd.f_job ") results.Add(" join [spcepiworld].[dbo].[part_lot] pl ");
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ") results.Add(" on se.f_lot = pl.f_lot ");
.AppendLine(" on se.f_lot = pl.f_lot ") results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ") results.Add(" on se.f_part = pd.f_part ");
.AppendLine(" on se.f_part = pd.f_part ") results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ") results.Add(" on se.f_test = td.f_test ");
.AppendLine(" on se.f_test = td.f_test ") results.Add(" where se.f_flag = 0 ");
.AppendLine(" where se.f_flag = 0 ");
if (subGroupId is not null) if (subGroupId is not null)
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId).AppendLine(" "); results.Add($" and se.f_sgrp = {subGroupId} ");
if (!string.IsNullOrEmpty(description.RDS)) if (!string.IsNullOrEmpty(description.RDS))
_ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' "); results.Add($" and pl.f_name = '{description.RDS}' ");
_ = result results.Add($" and pr.f_name = '{description.Reactor}' ");
.Append(" and pr.f_name = '").Append(description.Reactor).AppendLine("' ") results.Add($" and pd.f_name = '{description.PSN}' ");
.Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ") results.Add(" and jd.f_name in ('BIORAD4', 'BIORAD5') ");
.AppendLine(" and jd.f_name in ('BIORAD4', 'BIORAD5') ") results.Add($" and jd.f_name = '{logistics.MesEntity}' ");
.Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ") results.Add($" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '{dateTime}' ");
.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ") results.Add(" ) as iq ");
.AppendLine(" ) as iq ") results.Add(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ");
.AppendLine(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ") results.Add(" for json path ");
.AppendLine(" for json path "); return string.Join(Environment.NewLine, results);
return result.ToString();
} // cSpell:restore } // cSpell:restore
private static StringBuilder GetForJsonPath(string connectionString, string commandText) private static StringBuilder GetForJsonPath(string connectionString, string commandText)
@ -89,27 +199,89 @@ public class FromIQS
return stringBuilder; return stringBuilder;
} }
private static string GetCommandText(List<long> subGroups)
{ // cSpell:disable
List<string> results = new();
results.Add(" update [spcepiworld].[dbo].[sgrp_ext] ");
results.Add(" set f_flag = 1 ");
results.Add(" where f_flag = 0 ");
results.Add($" and f_sgrp in ({string.Join($",{Environment.NewLine} ", subGroups)}) ");
return string.Join(Environment.NewLine, results);
} // cSpell:enable
private static int? ExecuteNonQuery(string connectionString, string commandText)
{
int? result;
if (string.IsNullOrEmpty(connectionString))
result = null;
else
{
using SqlConnection sqlConnection = new(connectionString);
sqlConnection.Open();
using SqlCommand sqlCommand = new(commandText, sqlConnection);
result = sqlCommand.ExecuteNonQuery();
}
return result;
}
private static void FlagDuplicates(string connectionString, string json)
{
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
{
Root? root;
List<long> collection = new();
JsonElement[] array = jsonElements.ToArray();
foreach (JsonElement jsonElement in array)
{
root = JsonSerializer.Deserialize<Root>(jsonElement.ToString(), jsonSerializerOptions);
if (root is null || root.MaxSeSgrp < 1)
continue;
if (collection.Count > 99)
break;
collection.Add(root.MaxSeSgrp);
}
if (collection.Count > 0)
{
string commandText = GetCommandText(collection);
File.WriteAllText("D:/.sql", commandText);
_ = ExecuteNonQuery(connectionString, commandText);
}
}
}
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, Stratus.Description description, long breakAfter, long preWait) internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, Stratus.Description description, long breakAfter, long preWait)
{ {
string dateTime; DateTime dateTime;
int? count = null; int? count = null;
string commandText; string commandText;
long? result = null; long? result = null;
StringBuilder stringBuilder;
string dateFormat = Stratus.Description.GetDateFormat(); string dateFormat = Stratus.Description.GetDateFormat();
if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss"); dateTime = dateTimeParsed;
else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed)) else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed))
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss"); dateTime = dateTimeParsed;
else else
dateTime = logistics.DateTimeFromSequence.ToString("yyyy-MM-dd HH:mm:ss"); dateTime = logistics.DateTimeFromSequence;
commandText = GetCommandText(logistics, description, dateTime, subGroupId: null); commandText = GetCommandText(dateTime);
try
{
stringBuilder = GetForJsonPath(connectionString, commandText);
if (stringBuilder.Length > 0)
FlagDuplicates(connectionString, stringBuilder.ToString());
}
catch (Exception)
{ stringBuilder = new(); }
_ = stringBuilder.Clear();
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
for (short i = 0; i < short.MaxValue; i++) for (short i = 0; i < short.MaxValue; i++)
{ {
if (DateTime.Now.Ticks > preWait) if (DateTime.Now.Ticks > preWait)
break; break;
Thread.Sleep(100); Thread.Sleep(100);
} }
StringBuilder stringBuilder = new();
for (short z = 0; z < short.MaxValue; z++) for (short z = 0; z < short.MaxValue; z++)
{ {
stringBuilder = GetForJsonPath(connectionString, commandText); stringBuilder = GetForJsonPath(connectionString, commandText);
@ -153,156 +325,96 @@ public class FromIQS
return new(result, count, commandText); return new(result, count, commandText);
} }
private static string GetJson(Logistics logistics, string logisticLines, Stratus.Description description) internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, Stratus.Description description, long? subGroupId, string weekOfYear)
{ {
string result;
StringBuilder stringBuilder = new();
var @object = new
{
description.MesEntity,
description.Employee,
description.Layer,
description.PSN,
description.RDS,
description.Reactor,
description.Recipe,
description.Zone,
logistics.DateTimeFromSequence.Ticks
};
string[] pair;
string safeValue;
string[] segments;
string serializerValue;
foreach (string line in logisticLines.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
{
segments = line.Split('\t');
if (segments.Length < 2)
continue;
segments = segments[1].Split(';');
_ = stringBuilder.Append('{');
foreach (string segment in segments)
{
pair = segment.Split('=');
if (pair.Length != 2 || pair[0].Length < 3)
continue;
serializerValue = JsonSerializer.Serialize(pair[1]);
safeValue = serializerValue.Substring(1, serializerValue.Length - 2);
_ = stringBuilder.Append('"').Append(pair[0].Substring(2)).Append('"').Append(':').Append('"').Append(safeValue).Append('"').Append(',');
}
if (stringBuilder.Length > 0)
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
_ = stringBuilder.Append('}').Append(',');
}
if (stringBuilder.Length > 0)
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
_ = stringBuilder.Append(']').Append('}');
_ = stringBuilder.Insert(0, ",\"Logistics\":[");
string json = JsonSerializer.Serialize(@object);
_ = stringBuilder.Insert(0, json.Substring(0, json.Length - 1));
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(stringBuilder.ToString());
result = jsonElement is null ? "{}" : JsonSerializer.Serialize(jsonElement, new JsonSerializerOptions { WriteIndented = true });
return result;
}
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, string logisticLines, Stratus.Description description, string lines, long? subGroupId, string weekOfYear)
{
string checkFile;
string fileName = Path.GetFileName(reportFullPath); string fileName = Path.GetFileName(reportFullPath);
string json = GetJson(logistics, logisticLines, description);
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory); string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot); bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}"; string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}"); string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
if (ecExists && !Directory.Exists(ecDirectory)) if (ecExists && !Directory.Exists(ecDirectory))
_ = Directory.CreateDirectory(ecDirectory); _ = Directory.CreateDirectory(ecDirectory);
checkFile = Path.Combine(ecDirectory, fileName); string checkFile = Path.Combine(ecDirectory, fileName);
if (ecExists && !File.Exists(checkFile)) if (ecExists && !File.Exists(checkFile))
File.Copy(reportFullPath, checkFile); File.Copy(reportFullPath, checkFile);
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
if (ecExists && !File.Exists(checkFile))
File.WriteAllText(checkFile, lines);
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
if (ecExists && !File.Exists(checkFile))
File.WriteAllText(checkFile, json);
} }
private static string GetCommandText(string[] iqsCopyValues) private static string GetCommandText(string[] iqsCopyValues)
{ // cSpell:disable { // cSpell:disable
StringBuilder result = new(); List<string> results = new();
if (iqsCopyValues.Length != 4) if (iqsCopyValues.Length != 4)
throw new NotSupportedException(); throw new NotSupportedException();
string find = iqsCopyValues[1]; string find = iqsCopyValues[1];
string replace = iqsCopyValues[3]; string replace = iqsCopyValues[3];
_ = result results.Add(" select pd.f_name [Part Name], ");
.AppendLine(" select pd.f_name [Part Name], ") results.Add(" null [Part Revision], ");
.AppendLine(" null [Part Revision], ") results.Add($" '{replace}' [Test Name], ");
.Append(" '").Append(replace).AppendLine("' [Test Name], ") results.Add(" null [Description], ");
.AppendLine(" null [Description], ") results.Add(" null [Lot Number], ");
.AppendLine(" null [Lot Number], ") results.Add(" null [Job Name], ");
.AppendLine(" null [Job Name], ") results.Add(" null [Process Name], ");
.AppendLine(" null [Process Name], ") results.Add(" case when sl.f_url = 0 then null else sl.f_url end [Reasonable Limit (Upper)], ");
.AppendLine(" case when sl.f_url = 0 then null else sl.f_url end [Reasonable Limit (Upper)], ") results.Add(" case when sl.f_url = 0 then 0 else 1 end [Alarm Reasonable Limit (Upper)], ");
.AppendLine(" case when sl.f_url = 0 then 0 else 1 end [Alarm Reasonable Limit (Upper)], ") results.Add(" case when sl.f_usl = 0 then null else sl.f_usl end [Specification Limit (Upper)], ");
.AppendLine(" case when sl.f_usl = 0 then null else sl.f_usl end [Specification Limit (Upper)], ") results.Add(" case when sl.f_usl = 0 then 0 else 1 end [Alarm Specification Limit (Upper)], ");
.AppendLine(" case when sl.f_usl = 0 then 0 else 1 end [Alarm Specification Limit (Upper)], ") results.Add(" case when sl.f_ugb = 0 then null else sl.f_ugb end [Warning Limit (Upper)], ");
.AppendLine(" case when sl.f_ugb = 0 then null else sl.f_ugb end [Warning Limit (Upper)], ") results.Add(" case when sl.f_ugb = 0 then 0 else 1 end [Alarm Warning Limit (Upper)], ");
.AppendLine(" case when sl.f_ugb = 0 then 0 else 1 end [Alarm Warning Limit (Upper)], ") results.Add(" case when sl.f_tar = 0 then null else sl.f_tar end [Specification Limit (Target)], ");
.AppendLine(" case when sl.f_tar = 0 then null else sl.f_tar end [Specification Limit (Target)], ") results.Add(" case when sl.f_lgb = 0 then null else sl.f_lgb end [Warning Limit (Lower)], ");
.AppendLine(" case when sl.f_lgb = 0 then null else sl.f_lgb end [Warning Limit (Lower)], ") results.Add(" case when sl.f_lgb = 0 then 0 else 1 end [Alarm Warning Limit (Lower)], ");
.AppendLine(" case when sl.f_lgb = 0 then 0 else 1 end [Alarm Warning Limit (Lower)], ") results.Add(" case when sl.f_lsl = 0 then null else sl.f_lsl end [Specification Limit (Lower)], ");
.AppendLine(" case when sl.f_lsl = 0 then null else sl.f_lsl end [Specification Limit (Lower)], ") results.Add(" case when sl.f_lsl = 0 then 0 else 1 end [Alarm Specification Limit (Lower)], ");
.AppendLine(" case when sl.f_lsl = 0 then 0 else 1 end [Alarm Specification Limit (Lower)], ") results.Add(" case when sl.f_lrl = 0 then null else sl.f_lrl end [Reasonable Limit (Lower)], ");
.AppendLine(" case when sl.f_lrl = 0 then null else sl.f_lrl end [Reasonable Limit (Lower)], ") results.Add(" case when sl.f_lrl = 0 then 0 else 1 end [Alarm Reasonable Limit (Lower)], ");
.AppendLine(" case when sl.f_lrl = 0 then 0 else 1 end [Alarm Reasonable Limit (Lower)], ") results.Add(" td.f_name [Original Test Name], ");
.AppendLine(" td.f_name [Original Test Name], ") results.Add(" td.f_test [Test Id], ");
.AppendLine(" td.f_test [Test Id], ") results.Add(" ( ");
.AppendLine(" ( ") results.Add(" select count(sl_b.f_spec) ");
.AppendLine(" select count(sl_b.f_spec) ") results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl_b ") results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd_b ") results.Add(" on sl_b.f_part = pd_b.f_part ");
.AppendLine(" on sl_b.f_part = pd_b.f_part ") results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td_b ") results.Add(" on sl_b.f_test = td_b.f_test ");
.AppendLine(" on sl_b.f_test = td_b.f_test ") results.Add(" where sl_b.f_prcs = 0 ");
.AppendLine(" where sl_b.f_prcs = 0 ") results.Add($" and td_b.f_name = '{replace}' ");
.Append(" and td_b.f_name = '").Append(replace).AppendLine("' ") results.Add(" and pd_b.f_name = pd.f_name ");
.AppendLine(" and pd_b.f_name = pd.f_name ") results.Add(" and sl_b.f_url = sl.f_url ");
.AppendLine(" and sl_b.f_url = sl.f_url ") results.Add(" and sl_b.f_usl = sl.f_usl ");
.AppendLine(" and sl_b.f_usl = sl.f_usl ") results.Add(" and sl_b.f_ugb = sl.f_ugb ");
.AppendLine(" and sl_b.f_ugb = sl.f_ugb ") results.Add(" and sl_b.f_tar = sl.f_tar ");
.AppendLine(" and sl_b.f_tar = sl.f_tar ") results.Add(" and sl_b.f_lgb = sl.f_lgb ");
.AppendLine(" and sl_b.f_lgb = sl.f_lgb ") results.Add(" and sl_b.f_lsl = sl.f_lsl ");
.AppendLine(" and sl_b.f_lsl = sl.f_lsl ") results.Add(" and sl_b.f_lrl = sl.f_lrl ");
.AppendLine(" and sl_b.f_lrl = sl.f_lrl ") results.Add(" group by sl_b.f_spec ");
.AppendLine(" group by sl_b.f_spec ") results.Add(" ) count ");
.AppendLine(" ) count ") results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl ") results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ") results.Add(" on sl.f_part = pd.f_part ");
.AppendLine(" on sl.f_part = pd.f_part ") results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ") results.Add(" on sl.f_test = td.f_test ");
.AppendLine(" on sl.f_test = td.f_test ") results.Add(" where sl.f_prcs = 0 ");
.AppendLine(" where sl.f_prcs = 0 ") results.Add($" and td.f_name = '{find}' ");
.Append(" and td.f_name = '").Append(find).AppendLine("' ") results.Add(" and isnull(( ");
.AppendLine(" and isnull(( ") results.Add(" select count(sl_b.f_spec) ");
.AppendLine(" select count(sl_b.f_spec) ") results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
.AppendLine(" from [spcepiworld].[dbo].[spec_lim] sl_b ") results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd_b ") results.Add(" on sl_b.f_part = pd_b.f_part ");
.AppendLine(" on sl_b.f_part = pd_b.f_part ") results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td_b ") results.Add(" on sl_b.f_test = td_b.f_test ");
.AppendLine(" on sl_b.f_test = td_b.f_test ") results.Add(" where sl_b.f_prcs = 0 ");
.AppendLine(" where sl_b.f_prcs = 0 ") results.Add($" and td_b.f_name = '{replace}' ");
.Append(" and td_b.f_name = '").Append(replace).AppendLine("' ") results.Add(" and pd_b.f_name = pd.f_name ");
.AppendLine(" and pd_b.f_name = pd.f_name ") results.Add(" and sl_b.f_url = sl.f_url ");
.AppendLine(" and sl_b.f_url = sl.f_url ") results.Add(" and sl_b.f_usl = sl.f_usl ");
.AppendLine(" and sl_b.f_usl = sl.f_usl ") results.Add(" and sl_b.f_ugb = sl.f_ugb ");
.AppendLine(" and sl_b.f_ugb = sl.f_ugb ") results.Add(" and sl_b.f_tar = sl.f_tar ");
.AppendLine(" and sl_b.f_tar = sl.f_tar ") results.Add(" and sl_b.f_lgb = sl.f_lgb ");
.AppendLine(" and sl_b.f_lgb = sl.f_lgb ") results.Add(" and sl_b.f_lsl = sl.f_lsl ");
.AppendLine(" and sl_b.f_lsl = sl.f_lsl ") results.Add(" and sl_b.f_lrl = sl.f_lrl ");
.AppendLine(" and sl_b.f_lrl = sl.f_lrl ") results.Add(" group by sl_b.f_spec ");
.AppendLine(" group by sl_b.f_spec ") results.Add(" ), 0) = 0 ");
.AppendLine(" ), 0) = 0 ") results.Add(" for json path ");
.AppendLine(" for json path "); return string.Join(Environment.NewLine, results);
return result.ToString();
} // cSpell:restore } // cSpell:restore
internal static void SaveCopy(string fileConnectorConfigurationSourceFileLocation, string connectionString, string name, string[] iqsCopyValues) internal static void SaveCopy(string fileConnectorConfigurationSourceFileLocation, string connectionString, string name, string[] iqsCopyValues)

View File

@ -0,0 +1,47 @@
using System;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.OpenInsight;
public class Root
{
public long CountSeSgtm { get; } // [JsonPropertyName("count_se_sgtm")]
public DateTime DateTime { get; } // [JsonPropertyName("date_time")]
public long MaxMaxSeTest { get; } // [JsonPropertyName("max_max_se_test")]
public string MaxMaxSeTestName { get; } // [JsonPropertyName("max_max_se_test_name")]
public double MaxMaxSeVal { get; } // [JsonPropertyName("max_max_se_val")]
public long MaxSeLot { get; } // [JsonPropertyName("max_se_lot")]
public string MaxSeLotName { get; } // [JsonPropertyName("max_se_lot_name")]
public long MaxSePart { get; } // [JsonPropertyName("max_se_part")]
public string MaxSePartName { get; } // [JsonPropertyName("max_se_part_name")]
public long MaxSePrcs { get; } // [JsonPropertyName("max_se_prcs")]
public string MaxSePrcsName { get; } // [JsonPropertyName("max_se_prcs_name")]
public long MaxSeSgrp { get; } // [JsonPropertyName("max_se_sgrp")]
public long MinMinSeTest { get; } // [JsonPropertyName("min_min_se_test")]
public string MinMinSeTestName { get; } // [JsonPropertyName("min_min_se_test_name")]
public double MinMinSeVal { get; } // [JsonPropertyName("min_min_se_val")]
public long MinSeSgrp { get; } // [JsonPropertyName("min_se_sgrp")]
[JsonConstructor]
public Root(long countSeSgtm, DateTime dateTime, long maxMaxSeTest, string maxMaxSeTestName, double maxMaxSeVal, long maxSeLot, string maxSeLotName, long maxSePart, string maxSePartName, long maxSePrcs, string maxSePrcsName, long maxSeSgrp, long minMinSeTest, string minMinSeTestName, double minMinSeVal, long minSeSgrp)
{
CountSeSgtm = countSeSgtm;
DateTime = dateTime;
MaxMaxSeTest = maxMaxSeTest;
MaxMaxSeTestName = maxMaxSeTestName;
MaxMaxSeVal = maxMaxSeVal;
MaxSeLot = maxSeLot;
MaxSeLotName = maxSeLotName;
MaxSePart = maxSePart;
MaxSePartName = maxSePartName;
MaxSePrcs = maxSePrcs;
MaxSePrcsName = maxSePrcsName;
MaxSeSgrp = maxSeSgrp;
MinMinSeTest = minMinSeTest;
MinMinSeTestName = minMinSeTestName;
MinMinSeVal = minMinSeVal;
MinSeSgrp = minSeSgrp;
}
}

View File

@ -19,7 +19,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightMetrologyViewerAPI; private readonly string _OpenInsightMetrologyViewerAPI;
private readonly string _OpenInsightMetrologyViewerFileShare; private readonly string _OpenInsightMetrologyViewerFileShare;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -110,10 +110,10 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
private void SendData(string reportFullPath, DateTime dateTime, List<Stratus.Description> descriptions) private void SendData(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List<Stratus.Description> descriptions)
{ {
string checkDirectory; string checkDirectory;
WSRequest wsRequest = new(this, _Logistics, descriptions); WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday); int weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}"); string directory = Path.Combine(_OpenInsightMetrologyViewerFileShare, dateTime.Year.ToString(), $"WW{weekOfYear:00}");
checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString()); checkDirectory = Path.Combine(directory, _Logistics.Sequence.ToString());
@ -121,16 +121,16 @@ public class FileRead : Shared.FileRead, IFileRead
_ = Directory.CreateDirectory(checkDirectory); _ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true); File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
(string jsonResults, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, _Logistics.Sequence, directory, wsRequest); (string jsonResults, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, _Logistics.Sequence, directory, wsRequest);
if (!wsResults.Success) if (wsResults.Success is null || !wsResults.Success.Value)
throw new Exception(wsResults.ToString()); throw new Exception(jsonResults);
_Log.Debug(wsResults.HeaderID); _Log.Debug(wsResults.HeaderId);
lock (_StaticRuns) lock (_StaticRuns)
{ {
if (!_StaticRuns.ContainsKey(_Logistics.Sequence)) if (!_StaticRuns.ContainsKey(_Logistics.Sequence))
_StaticRuns.Add(_Logistics.Sequence, new()); _StaticRuns.Add(_Logistics.Sequence, new());
_StaticRuns[_Logistics.Sequence].Add(jsonResults); _StaticRuns[_Logistics.Sequence].Add(wsResults);
} }
checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderID}"); checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}");
if (!Directory.Exists(checkDirectory)) if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory); _ = Directory.CreateDirectory(checkDirectory);
File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true); File.Copy(reportFullPath, Path.Combine(checkDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
@ -139,15 +139,16 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); string[] lines = File.ReadAllLines(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements); List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
SendData(reportFullPath, dateTime, descriptions); SendData(reportFullPath, dateTime, jsonElements, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -13,11 +13,13 @@ public class WSRequest
{ {
public int Id { get; set; } public int Id { get; set; }
public string AttemptCounter { get; set; }
public string Batch { get; set; } public string Batch { get; set; }
public string Cassette { get; set; } public string Cassette { get; set; }
public string CellName { get; set; } public string CellName { get; set; }
public string Date { get; set; } public string Date { get; set; }
public string FilePath { get; set; } public string FilePath { get; set; }
public string IndexOf { get; set; }
public string MeanThickness { get; set; } public string MeanThickness { get; set; }
public string Operator { get; set; } public string Operator { get; set; }
public string PSN { get; set; } public string PSN { get; set; }
@ -32,7 +34,7 @@ public class WSRequest
[Obsolete("For json")] public WSRequest() { } [Obsolete("For json")] public WSRequest() { }
#pragma warning disable IDE0060 #pragma warning disable IDE0060
internal WSRequest(IFileRead fileRead, Logistics logistics, List<Stratus.Description> descriptions, string processDataStandardFormat = null) internal WSRequest(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, List<Stratus.Description> descriptions, string processDataStandardFormat = null)
#pragma warning restore IDE0060 #pragma warning restore IDE0060
{ {
Id = -1; Id = -1;
@ -43,16 +45,18 @@ public class WSRequest
Details = new List<Stratus.Detail>(); Details = new List<Stratus.Detail>();
//Header //Header
{ {
Batch = x.Lot; AttemptCounter = x.AttemptCounter;
Batch = x.Lot; // different name
Cassette = x.Cassette; Cassette = x.Cassette;
Date = x.Date; Date = x.Date;
IndexOf = x.IndexOf;
MeanThickness = x.MeanThickness; MeanThickness = x.MeanThickness;
Operator = x.Employee; Operator = x.Employee; // different name
PSN = x.PSN; PSN = x.PSN;
RDS = x.RDS; RDS = x.RDS;
Reactor = x.Reactor; Reactor = x.Reactor;
Recipe = x.Recipe; Recipe = x.Recipe;
StdDev = x.GradeStdDev; StdDev = x.GradeStdDev; // different name
Title = x.Title; Title = x.Title;
UniqueId = x.UniqueId; UniqueId = x.UniqueId;
} }
@ -65,7 +69,6 @@ public class WSRequest
HeaderUniqueId = description.HeaderUniqueId, HeaderUniqueId = description.HeaderUniqueId,
Mean = description.Mean, Mean = description.Mean,
PassFail = description.PassFail, PassFail = description.PassFail,
Position = description.Position,
Recipe = description.Recipe, Recipe = description.Recipe,
Slot = description.Slot, Slot = description.Slot,
StdDev = description.StdDev, StdDev = description.StdDev,
@ -74,7 +77,7 @@ public class WSRequest
Wafer = description.Wafer, Wafer = description.Wafer,
Points = new() Points = new()
}; };
segments = description.Position.Split(','); segments = description.Slot.Split(',');
foreach (string segment in segments) foreach (string segment in segments)
detail.Points.Add(new Stratus.Point { HeaderUniqueId = description.HeaderUniqueId, UniqueId = description.UniqueId, Position = segment }); detail.Points.Add(new Stratus.Point { HeaderUniqueId = description.HeaderUniqueId, UniqueId = description.UniqueId, Position = segment });
segments = description.Thickness.Split(','); segments = description.Thickness.Split(',');
@ -85,34 +88,39 @@ public class WSRequest
Details.Add(detail); Details.Add(detail);
} }
Date ??= logistics.DateTimeFromSequence.ToString(); Date ??= logistics.DateTimeFromSequence.ToString();
if (UniqueId is null && Details.Count != 0) UniqueId = $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}";
UniqueId = Details[0].HeaderUniqueId; for (int i = 0; i < Details.Count; i++)
{
Details[i].HeaderUniqueId = UniqueId;
Details[i].UniqueId = $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}_Item-{i + 1}";
}
} }
internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List<Stratus.Description> descriptions) internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, WS.Results results, JsonElement[] jsonElements, List<Stratus.Description> descriptions)
{ {
long result; long result;
if (string.IsNullOrEmpty(json)) if (results is not null && results.HeaderId is not null)
result = results.HeaderId.Value;
else
{ {
WSRequest wsRequest = new(fileRead, logistics, descriptions); WSRequest wsRequest = new(fileRead, logistics, jsonElements, descriptions);
string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}"); string directory = Path.Combine(openInsightMetrologyViewerFileShare, logistics.DateTimeFromSequence.Year.ToString(), $"WW{weekOfYear:00}");
(json, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest); (_, WS.Results wsResults) = WS.SendData(openInsightMetrologyViewerAPI, logistics.Sequence, directory, wsRequest);
if (!wsResults.Success) if (wsResults.Success is null || !wsResults.Success.Value)
throw new Exception(wsResults.ToString()); throw new Exception(wsResults.ToString());
result = wsResults.HeaderId.Value;
} }
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
result = metrologyWSRequest.HeaderID;
return result; return result;
} }
#pragma warning disable IDE0060 #pragma warning disable IDE0060
internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string originalDataBioRad, List<Stratus.Description> descriptions, string matchDirectory, string subGroupId, long headerId, string headerIdDirectory) internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string originalDataBioRad, List<Stratus.Description> descriptions, string matchDirectory, WS.Results results, string headerIdDirectory)
#pragma warning restore IDE0060 #pragma warning restore IDE0060
{ {
string dataPDFFile = Path.Combine(matchDirectory, $"{headerId}.pdf"); string dataPDFFile = Path.Combine(matchDirectory, $"{results.HeaderId}.pdf");
string[] txtFiles = Directory.GetFiles(matchDirectory, string.Concat(originalDataBioRad, "*.txt"), SearchOption.TopDirectoryOnly); string[] txtFiles = Directory.GetFiles(matchDirectory, string.Concat(originalDataBioRad, "*.txt"), SearchOption.TopDirectoryOnly);
if (txtFiles.Length != 1) if (txtFiles.Length != 1)
throw new Exception($"Invalid source file count for <{headerId}>!"); throw new Exception($"Invalid source file count for <{results.HeaderId}>!");
string[] lines = File.ReadAllLines(txtFiles[0]); string[] lines = File.ReadAllLines(txtFiles[0]);
lines = (from l in lines where !string.IsNullOrEmpty(l) select l).ToArray(); lines = (from l in lines where !string.IsNullOrEmpty(l) select l).ToArray();
if (lines.Length > 1) if (lines.Length > 1)
@ -135,7 +143,7 @@ public class WSRequest
pdDocument.close(); pdDocument.close();
List<WS.Attachment> headerAttachments = new() List<WS.Attachment> headerAttachments = new()
{ {
new WS.Attachment(subGroupId, headerId, headerIdDirectory, descriptions[0].HeaderUniqueId, "Data.pdf", dataPDFFile) new WS.Attachment(results, headerIdDirectory, $"{logistics.JobID}_{logistics.MID}_{logistics.DateTimeFromSequence:yyyyMMddHHmmssffff}", "Data.pdf", dataPDFFile)
}; };
WS.AttachFiles(openInsightMetrologyViewerAPI, headerAttachments, dataAttachments: null); WS.AttachFiles(openInsightMetrologyViewerAPI, headerAttachments, dataAttachments: null);
} }

View File

@ -19,7 +19,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _OpenInsightMetrologyViewerAPI; private readonly string _OpenInsightMetrologyViewerAPI;
private readonly string _OpenInsightMetrologyViewerFileShare; private readonly string _OpenInsightMetrologyViewerFileShare;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -137,48 +137,44 @@ public class FileRead : Shared.FileRead, IFileRead
return result; return result;
} }
private void PostOpenInsightMetrologyViewerAttachments(List<Stratus.Description> descriptions) private void PostOpenInsightMetrologyViewerAttachments(JsonElement[] jsonElements, List<Stratus.Description> descriptions)
{ {
string? json; Shared.Metrology.WS.Results? results;
string? subGroupId;
string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID); string jobIdDirectory = Path.Combine(Path.GetDirectoryName(_FileConnectorConfiguration.AlternateTargetFolder) ?? throw new Exception(), _Logistics.JobID);
if (!Directory.Exists(jobIdDirectory)) if (!Directory.Exists(jobIdDirectory))
_ = Directory.CreateDirectory(jobIdDirectory); _ = Directory.CreateDirectory(jobIdDirectory);
string[] matchDirectories = GetInProcessDirectory(jobIdDirectory); string[] matchDirectories = GetInProcessDirectory(jobIdDirectory);
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<string>? values)) if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
(json, subGroupId) = (null, null); results = null;
else else
{ {
if (values.Count != 1) if (wsResults is null || wsResults.Count != 1)
throw new Exception($"{nameof(_StaticRuns)} {values.Count} != 1 {_Logistics.Sequence}!"); throw new NullReferenceException($"{nameof(wsResults)} {wsResults?.Count} != 1 {_Logistics.Sequence}!");
string[] segments = values[0].Split(new string[] { "|" }, StringSplitOptions.None); results = wsResults[0];
json = segments[0];
subGroupId = segments.Length > 1 ? segments[1] : null;
lock (_StaticRuns)
_ = _StaticRuns.Remove(_Logistics.Sequence);
} }
int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday); int weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, json, descriptions); long headerId = !_IsEAFHosted ? -1 : OpenInsightMetrologyViewer.WSRequest.GetHeaderId(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OpenInsightMetrologyViewerFileShare, weekOfYear, results, jsonElements, descriptions);
string? headerIdDirectory = GetHeaderIdDirectory(headerId); string? headerIdDirectory = GetHeaderIdDirectory(headerId);
if (string.IsNullOrEmpty(headerIdDirectory)) if (string.IsNullOrEmpty(headerIdDirectory))
throw new Exception($"Didn't find header id directory <{headerId}>"); throw new Exception($"Didn't find header id directory <{headerId}>");
OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OriginalDataBioRad, descriptions, matchDirectories[0], subGroupId, headerId, headerIdDirectory); OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, _OriginalDataBioRad, descriptions, matchDirectories[0], results, headerIdDirectory);
} }
#pragma warning disable IDE0060
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
#pragma warning restore IDE0060
{ {
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); string[] lines = File.ReadAllLines(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements); List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
PostOpenInsightMetrologyViewerAttachments(descriptions); PostOpenInsightMetrologyViewerAttachments(jsonElements, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -17,7 +17,7 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _JobIdParentDirectory; private readonly string _JobIdParentDirectory;
private readonly string _JobIdProcessParentDirectory; private readonly string _JobIdProcessParentDirectory;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -108,10 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
#pragma warning disable IDE0060 private void DirectoryMove(string reportFullPath, DateTime dateTime, JsonElement[] jsonElements, List<Stratus.Description> descriptions)
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<Stratus.Description> descriptions)
#pragma warning restore IDE0060
{ {
if (dateTime == DateTime.MinValue)
throw new ArgumentNullException(nameof(dateTime));
FileInfo fileInfo = new(reportFullPath); FileInfo fileInfo = new(reportFullPath);
string logisticsSequence = _Logistics.Sequence.ToString(); string logisticsSequence = _Logistics.Sequence.ToString();
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID); string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
@ -122,40 +122,68 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception("Didn't find directory by logistics sequence"); throw new Exception("Didn't find directory by logistics sequence");
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime) if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime); File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions); OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true }; JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions); string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
string directoryName = $"{Path.GetFileName(matchDirectories[0]).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0]}{_Logistics.DateTimeFromSequence:yyyy-MM-dd_hh;mm_tt_}{DateTime.Now.Ticks - _Logistics.Sequence}"; string directoryName = $"{Path.GetFileName(matchDirectories[0]).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0]}{_Logistics.DateTimeFromSequence:yyyy-MM-dd_hh;mm_tt_}{DateTime.Now.Ticks - _Logistics.Sequence}";
string destinationJobIdDirectory = Path.Combine(_JobIdProcessParentDirectory, _Logistics.JobID, directoryName); string destinationJobIdDirectory = Path.Combine(_JobIdProcessParentDirectory, _Logistics.JobID, directoryName);
string sequenceDirectory = Path.Combine(destinationJobIdDirectory, logisticsSequence); string sequenceDirectory = Path.Combine(destinationJobIdDirectory, logisticsSequence);
string jsonFileName = Path.Combine(sequenceDirectory, $"{Path.GetFileNameWithoutExtension(reportFullPath)}.json"); string jsonFileName = Path.Combine(sequenceDirectory, $"{Path.GetFileNameWithoutExtension(reportFullPath)}.json");
MoveMatchingFile(jobIdDirectory, matchDirectories[0]);
Directory.Move(matchDirectories[0], destinationJobIdDirectory); Directory.Move(matchDirectories[0], destinationJobIdDirectory);
if (!Directory.Exists(sequenceDirectory)) if (!Directory.Exists(sequenceDirectory))
_ = Directory.CreateDirectory(sequenceDirectory); _ = Directory.CreateDirectory(sequenceDirectory);
File.Copy(reportFullPath, Path.Combine(sequenceDirectory, Path.GetFileName(reportFullPath)), overwrite: true); File.Copy(reportFullPath, Path.Combine(sequenceDirectory, Path.GetFileName(reportFullPath)), overwrite: true);
File.WriteAllText(jsonFileName, json); File.WriteAllText(jsonFileName, json);
lock (_StaticRuns)
_ = _StaticRuns.Remove(_Logistics.Sequence);
}
private static void MoveMatchingFile(string jobIdDirectory, string matchDirectory)
{
string checkFile;
string jobIdDirectoryFileName;
string matchDirectoryFileName;
string[] jobIdDirectoryFiles = Directory.GetFiles(jobIdDirectory, "*", SearchOption.TopDirectoryOnly);
string[] matchDirectoryFiles = Directory.GetFiles(matchDirectory, "*", SearchOption.TopDirectoryOnly);
foreach (string jobIdDirectoryFile in jobIdDirectoryFiles)
{
jobIdDirectoryFileName = Path.GetFileName(jobIdDirectoryFile);
foreach (string matchDirectoryFile in matchDirectoryFiles)
{
matchDirectoryFileName = Path.GetFileName(matchDirectoryFile);
if (jobIdDirectoryFileName.StartsWith(matchDirectoryFileName))
{
checkFile = Path.Combine(matchDirectory, jobIdDirectoryFileName);
if (File.Exists(checkFile))
continue;
File.Move(jobIdDirectoryFile, checkFile);
}
}
}
} }
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); string[] lines = File.ReadAllLines(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath, lines);
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(reportFullPath, lines, processDataStandardFormat);
List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements); List<Stratus.Description> descriptions = Stratus.ProcessData.GetDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
DirectoryMove(reportFullPath, dateTime, descriptions); DirectoryMove(reportFullPath, dateTime, jsonElements, descriptions);
else if (!_IsEAFHosted) else if (!_IsEAFHosted)
{ {
OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions); OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, jsonElements, descriptions);
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true }; JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions); string check = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
string jsonFileName = Path.ChangeExtension(reportFullPath, ".json"); string jsonFileName = Path.ChangeExtension(reportFullPath, ".json");
string historicalText = File.ReadAllText(jsonFileName); string historicalText = File.ReadAllText(jsonFileName);
if (json != historicalText) if (check != historicalText)
throw new Exception("File doesn't match historical!"); throw new Exception("File doesn't match historical!");
} }
return results; return results;

View File

@ -14,7 +14,7 @@ namespace Adaptation.FileHandlers.SPaCe;
public class FileRead : Shared.FileRead, IFileRead public class FileRead : Shared.FileRead, IFileRead
{ {
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -117,15 +117,15 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results; Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
_Logistics = new Logistics(reportFullPath, pdsf.Item1); _Logistics = new Logistics(reportFullPath, processDataStandardFormat);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements); List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
FileCopy(reportFullPath, dateTime, descriptions); FileCopy(reportFullPath, dateTime, descriptions);
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
return results; return results;
} }

View File

@ -0,0 +1,26 @@
namespace Adaptation.FileHandlers.Stratus;
internal class Constant
{
public string Mean { get; } = "Mean";
public string Slot { get; } = "Slot";
public string STDD { get; } = "STDD";
public string Batch { get; } = "Batch";
public string Wafer { get; } = "Wafer";
public string OneHypen { get; } = "1 - ";
public string Recipe { get; } = "Recipe";
public string Source { get; } = "Source:";
public string Started { get; } = "started";
public string Cassette { get; } = "Cassette";
public string Finished { get; } = "finished.";
public string Reference { get; } = "Reference";
public string StartedAt { get; } = "started at";
public string Thickness { get; } = "Thickness,";
public string Destination { get; } = "Destination:";
public string IsPut { get; } = "is put to the slot";
public string WaferParentheses { get; } = "Wafer (";
public string IsTaken { get; } = "is taken from the slot";
public string ProcessFailed { get; } = "- Process failed -";
}

View File

@ -4,49 +4,56 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.Stratus; namespace Adaptation.FileHandlers.Stratus;
public class Description : IDescription, Shared.Properties.IDescription public class Description : IDescription, Shared.Properties.IDescription
{ {
public int Test { get; set; } [JsonPropertyName("EventId")] public int Test { get; set; }
public int Count { get; set; } [JsonPropertyName("Count")] public int Count { get; set; }
public int Index { get; set; } [JsonPropertyName("Index")] public int Index { get; set; }
// //
public string EventName { get; set; } public string EventName { get; set; }
public string NullData { get; set; } public string NullData { get; set; }
public string JobID { get; set; } public string JobID { get; set; }
public string Sequence { get; set; } public string Sequence { get; set; }
public string MesEntity { get; set; } [JsonPropertyName("MesEntity")] public string MesEntity { get; set; }
public string ReportFullPath { get; set; } public string ReportFullPath { get; set; }
public string ProcessJobID { get; set; } public string ProcessJobID { get; set; }
public string MID { get; set; } public string MID { get; set; } // [JsonPropertyName("Cassette")]
// //
public string Date { get; set; } [JsonPropertyName("DateTime")] public string Date { get; set; }
public string Employee { get; set; } [JsonPropertyName("Employee")] public string Employee { get; set; }
public string Lot { get; set; } [JsonPropertyName("Batch")] public string Lot { get; set; }
public string PSN { get; set; } [JsonPropertyName("PSN")] public string PSN { get; set; }
public string Reactor { get; set; } [JsonPropertyName("Reactor")] public string Reactor { get; set; }
public string Recipe { get; set; } [JsonPropertyName("Recipe")] public string Recipe { get; set; }
[JsonPropertyName("IndexOf")] public string IndexOf { get; set; }
[JsonPropertyName("AttemptCounter")] public string AttemptCounter { get; set; }
// //
public string Cassette { get; set; } [JsonPropertyName("Cassette")] public string Cassette { get; set; }
public string GradeStdDev { get; set; } [JsonPropertyName("GradeStdDev")] public string GradeStdDev { get; set; }
public string HeaderUniqueId { get; set; } public string HeaderUniqueId { get; set; }
public string Layer { get; set; } [JsonPropertyName("Layer")] public string Layer { get; set; }
public string MeanThickness { get; set; } [JsonPropertyName("GradeMean")] public string MeanThickness { get; set; }
public string PassFail { get; set; } [JsonPropertyName("PassFail")] public string PassFail { get; set; }
public string RDS { get; set; } [JsonPropertyName("RDS")] public string RDS { get; set; }
public string Slot { get; set; } [JsonPropertyName("Slot")] public string Slot { get; set; }
public string Title { get; set; } public string Title { get; set; } // [JsonPropertyName("Batch")]
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string Wafer { get; set; } [JsonPropertyName("Text")] public string Wafer { get; set; }
public string Zone { get; set; } [JsonPropertyName("Zone")] public string Zone { get; set; }
// //
public string Mean { get; set; } [JsonPropertyName("Mean")] public string Mean { get; set; }
public string Position { get; set; } [JsonPropertyName("StdDev")] public string StdDev { get; set; }
public string StdDev { get; set; } [JsonPropertyName("Site")] public string Thickness { get; set; }
public string Thickness { get; set; } //
[JsonPropertyName("ThicknessSlotOne")] public string ThicknessSlotOne { get; set; }
[JsonPropertyName("ThicknessSlotTwentyFive")] public string ThicknessSlotTwentyFive { get; set; }
[JsonPropertyName("Actual Delta Thick Pts 1 and 25")] public string DeltaThicknessSlotsOneAndTwentyFive { get; set; }
[JsonPropertyName("% Delta Thick Pts 1 and 25")] public string PercentDeltaThicknessSlotsOneAndTwentyFive { get; set; }
string IDescription.GetEventDescription() => "File Has been read and parsed"; string IDescription.GetEventDescription() => "File Has been read and parsed";
@ -108,7 +115,7 @@ public class Description : IDescription, Shared.Properties.IDescription
List<string> results = new() List<string> results = new()
{ {
nameof(Mean), nameof(Mean),
nameof(Position), nameof(Slot),
nameof(StdDev), nameof(StdDev),
nameof(Thickness) nameof(Thickness)
}; };
@ -198,6 +205,8 @@ public class Description : IDescription, Shared.Properties.IDescription
PSN = processData.PSN, PSN = processData.PSN,
Reactor = processData.Reactor, Reactor = processData.Reactor,
Recipe = detail.Recipe, Recipe = detail.Recipe,
IndexOf = nameof(IndexOf),
AttemptCounter = nameof(AttemptCounter),
// //
Cassette = processData.Cassette, Cassette = processData.Cassette,
GradeStdDev = processData.StdDev, GradeStdDev = processData.StdDev,
@ -213,9 +222,14 @@ public class Description : IDescription, Shared.Properties.IDescription
Zone = processData.Zone, Zone = processData.Zone,
// //
Mean = detail.Mean, Mean = detail.Mean,
Position = detail.Position,
StdDev = detail.StdDev, StdDev = detail.StdDev,
Thickness = detail.Thickness Thickness = detail.Thickness,
//
ThicknessSlotOne = processData.ThicknessSlotOne,
ThicknessSlotTwentyFive = processData.ThicknessSlotTwentyFive,
//
DeltaThicknessSlotsOneAndTwentyFive = processData.DeltaThicknessSlotsOneAndTwentyFive,
PercentDeltaThicknessSlotsOneAndTwentyFive = processData.PercentDeltaThicknessSlotsOneAndTwentyFive,
}; };
results.Add(description); results.Add(description);
} }
@ -252,6 +266,8 @@ public class Description : IDescription, Shared.Properties.IDescription
PSN = nameof(PSN), PSN = nameof(PSN),
Reactor = nameof(Reactor), Reactor = nameof(Reactor),
Recipe = nameof(Recipe), Recipe = nameof(Recipe),
IndexOf = nameof(IndexOf),
AttemptCounter = nameof(AttemptCounter),
// //
Cassette = nameof(Cassette), Cassette = nameof(Cassette),
GradeStdDev = nameof(GradeStdDev), GradeStdDev = nameof(GradeStdDev),
@ -267,13 +283,29 @@ public class Description : IDescription, Shared.Properties.IDescription
Zone = nameof(Zone), Zone = nameof(Zone),
// //
Mean = nameof(Mean), Mean = nameof(Mean),
Position = nameof(Position),
StdDev = nameof(StdDev), StdDev = nameof(StdDev),
Thickness = nameof(Thickness) Thickness = nameof(Thickness),
//
ThicknessSlotOne = nameof(ThicknessSlotOne),
ThicknessSlotTwentyFive = nameof(ThicknessSlotTwentyFive),
DeltaThicknessSlotsOneAndTwentyFive = nameof(DeltaThicknessSlotsOneAndTwentyFive),
PercentDeltaThicknessSlotsOneAndTwentyFive = nameof(PercentDeltaThicknessSlotsOneAndTwentyFive),
}; };
return result; return result;
} }
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Description))]
internal partial class DescriptionSourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Description[]))]
internal partial class DescriptionArraySourceGenerationContext : JsonSerializerContext
{
} }

View File

@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.Stratus; namespace Adaptation.FileHandlers.Stratus;
@ -6,15 +7,26 @@ public class Detail
{ {
public string HeaderUniqueId { get; set; } public string HeaderUniqueId { get; set; }
public string Mean { get; set; } [JsonPropertyName("Mean")] public string Mean { get; set; }
public string PassFail { get; set; } [JsonPropertyName("PassFail")] public string PassFail { get; set; }
public string Position { get; set; } [JsonPropertyName("Recipe")] public string Recipe { get; set; }
public string Recipe { get; set; } [JsonPropertyName("Slot")] public string Slot { get; set; }
public string Slot { get; set; } [JsonPropertyName("StdDev")] public string StdDev { get; set; }
public string StdDev { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string Thickness { get; set; } [JsonPropertyName("Site")] public string Thickness { get; set; } // different name
public string Wafer { get; set; } [JsonPropertyName("Text")] public string Wafer { get; set; } // different name
public List<Point> Points { get; set; } public List<Point> Points { get; set; }
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Detail))]
internal partial class DetailSourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Detail[]))]
internal partial class DetailArraySourceGenerationContext : JsonSerializerContext
{
} }

View File

@ -16,7 +16,7 @@ public class FileRead : Shared.FileRead, IFileRead
private long? _TickOffset; private long? _TickOffset;
private readonly string _OriginalDataBioRad; private readonly string _OriginalDataBioRad;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -29,7 +29,8 @@ public class FileRead : Shared.FileRead, IFileRead
if (_IsDuplicator) if (_IsDuplicator)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
_OriginalDataBioRad = "OriginalDataBioRad_"; _OriginalDataBioRad = "OriginalDataBioRad_";
NestExistingFiles(_FileConnectorConfiguration); if (_IsEAFHosted)
NestExistingFiles(_FileConnectorConfiguration);
} }
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults); void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
@ -97,9 +98,11 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
#nullable enable
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>()); Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks; _TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true); _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID(); SetFileParameterLotIDToLogisticsMID();
@ -107,27 +110,36 @@ public class FileRead : Shared.FileRead, IFileRead
results.Item4.Add(_Logistics.FileInfo); results.Item4.Add(_Logistics.FileInfo);
else else
{ {
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, dataText: string.Empty); Run? run = Run.Get(_Logistics);
if (iProcessData is not ProcessData processData) if (run is null)
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
string mid; IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, run, dataText: string.Empty);
if (!string.IsNullOrEmpty(processData.Cassette) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) if (iProcessData is not ProcessData processData)
mid = processData.Cassette; results = new(string.Concat("B) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else else
{ {
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); string mid;
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; if (!string.IsNullOrEmpty(processData.Cassette) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Cassette;
else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN))
mid = processData.Employee;
else
{
mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
}
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (iProcessData.Details.Count > 0 && iProcessData.Details[0] is Detail detail && string.IsNullOrEmpty(detail.PassFail))
results.Item4.Add(_Logistics.FileInfo);
else
{
if (iProcessData.Details.Count > 0)
results = iProcessData.GetResults(this, _Logistics, results.Item4);
else
results = new(string.Concat("C) No Data - ", dateTime.Ticks), Array.Empty<Test>(), Array.Empty<JsonElement>(), results.Item4);
}
} }
SetFileParameterLotID(mid);
_Logistics.Update(mid, processData.Reactor);
if (iProcessData.Details.Count == 0)
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
if (iProcessData.Details[0] is Detail detail && string.IsNullOrEmpty(detail.PassFail))
results.Item4.Add(_Logistics.FileInfo);
else
results = iProcessData.GetResults(this, _Logistics, results.Item4);
} }
return results; return results;
} }

View File

@ -0,0 +1,48 @@
using System.Collections.ObjectModel;
namespace Adaptation.FileHandlers.Stratus;
#nullable enable
public class Grade
{
public Grade(string meanThickness, string stdDev)
{
MeanThickness = meanThickness;
StdDev = stdDev;
}
public string MeanThickness { get; }
public string StdDev { get; }
internal static Grade? Get(Constant constant, ReadOnlyCollection<string> groups)
{
Grade? result;
string? mean = null;
string? stdDev = null;
int[] j = new int[] { 0 };
foreach (string groupText in groups)
{
if (!groupText.Contains(constant.Finished))
continue;
mean = string.Empty;
stdDev = string.Empty;
Header.ScanPast(groupText, j, constant.Mean);
mean = Wafer.GetToken(groupText, j);
if (mean.EndsWith(","))
mean = mean.Remove(mean.Length - 1, 1);
Header.ScanPast(groupText, j, constant.STDD);
stdDev = Wafer.GetToken(groupText, j);
if (stdDev.EndsWith(","))
stdDev = stdDev.Remove(stdDev.Length - 1, 1);
}
if (mean is null || stdDev is null)
result = null;
else
result = new(meanThickness: mean,
stdDev: stdDev);
return result;
}
}

View File

@ -0,0 +1,96 @@
using System;
namespace Adaptation.FileHandlers.Stratus;
#nullable enable
public class Header
{
public Header(string batch, string cassette, string dateTime)
{
Batch = batch;
Cassette = cassette;
DateTime = dateTime;
}
public string Batch { get; }
public string Cassette { get; }
public string DateTime { get; }
internal static string GetBefore(string text, int[] i, string search)
{
string str;
string str1;
int num = text.IndexOf(search, i[0]);
if (num <= -1)
{
str = text.Substring(i[0]);
i[0] = text.Length;
str1 = str.Trim();
}
else
{
str = text.Substring(i[0], num - i[0]);
i[0] = num + search.Length;
str1 = str.Trim();
}
return str1;
}
internal static string GetToEOL(string text, int[] i)
{
string result;
if (text.IndexOf("\n", i[0]) > -1)
result = GetBefore(text, i, "\n");
else
result = GetBefore(text, i, Environment.NewLine);
return result;
}
private static string GetToText(string text, int[] i, string search) =>
text.Substring(i[0], text.IndexOf(search, i[0]) - i[0]).Trim();
internal static void ScanPast(string text, int[] i, string search)
{
int num = text.IndexOf(search, i[0]);
if (num <= -1)
i[0] = text.Length;
else
i[0] = num + search.Length;
}
internal static Header Get(string text, Constant constant, int[] i)
{
Header? result;
string batch;
if (!text.Contains(constant.Batch) || !text.Contains(constant.Started))
batch = string.Empty;
else
{
for (int z = 0; z < int.MaxValue; z++)
{
ScanPast(text, i, constant.Batch);
if (!text.Substring(i[0]).Contains(constant.Batch))
break;
}
batch = GetToText(text, i, constant.Started);
ScanPast(text, i, constant.StartedAt);
}
ScanPast(text, i, constant.Cassette);
string cassette;
if (!text.Substring(i[0]).Contains(constant.Started))
cassette = string.Empty;
else
cassette = GetToText(text, i, constant.Started);
ScanPast(text, i, constant.StartedAt);
string dateTime = GetToEOL(text, i);
if (dateTime.EndsWith("."))
dateTime = dateTime.Remove(dateTime.Length - 1, 1);
result = new(batch: batch,
cassette: cassette,
dateTime: dateTime);
return result;
}
}

View File

@ -35,6 +35,11 @@ public partial class ProcessData : IProcessData
public string Title { get; set; } public string Title { get; set; }
public string UniqueId { get; set; } public string UniqueId { get; set; }
public string Zone { get; set; } public string Zone { get; set; }
//
public string ThicknessSlotOne { get; set; }
public string ThicknessSlotTwentyFive { get; set; }
public string DeltaThicknessSlotsOneAndTwentyFive { get; set; }
public string PercentDeltaThicknessSlotsOneAndTwentyFive { get; set; }
List<object> Shared.Properties.IProcessData.Details => _Details; List<object> Shared.Properties.IProcessData.Details => _Details;
@ -42,14 +47,17 @@ public partial class ProcessData : IProcessData
private string _Data; private string _Data;
private readonly ILog _Log; private readonly ILog _Log;
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, string dataText) #nullable enable
internal ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, Run? run, string dataText)
{ {
JobID = logistics.JobID; JobID = logistics.JobID;
fileInfoCollection.Clear(); if (!string.IsNullOrEmpty(dataText))
fileInfoCollection.Clear();
_Details = new List<object>(); _Details = new List<object>();
MesEntity = logistics.MesEntity; MesEntity = logistics.MesEntity;
_Log = LogManager.GetLogger(typeof(ProcessData)); _Log = LogManager.GetLogger(typeof(ProcessData));
Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, dataText); Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, run, dataText);
} }
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse)));
@ -70,9 +78,13 @@ public partial class ProcessData : IProcessData
if (description.Test != (int)tests[i]) if (description.Test != (int)tests[i])
throw new Exception(); throw new Exception();
} }
FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json");
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json); File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
return results; return results;
} }
@ -383,7 +395,7 @@ public partial class ProcessData : IProcessData
return result; return result;
} }
private void Set(Logistics logistics) private void Set(Logistics logistics, Run? run)
{ {
string psn; string psn;
string rds; string rds;
@ -413,6 +425,8 @@ public partial class ProcessData : IProcessData
batch = GetToText(startedKey); batch = GetToText(startedKey);
ScanPast(startedAtKey); ScanPast(startedAtKey);
} }
if (run is not null)
{ }
ScanPast(cassetteKey); ScanPast(cassetteKey);
if (!_Data.Substring(_I).Contains(startedKey)) if (!_Data.Substring(_I).Contains(startedKey))
text = string.Empty; text = string.Empty;
@ -445,25 +459,25 @@ public partial class ProcessData : IProcessData
UniqueId = string.Concat("StratusBioRad_", reactor, "_", rds, "_", psn, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff")); UniqueId = string.Concat("StratusBioRad_", reactor, "_", rds, "_", psn, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff"));
} }
#pragma warning disable IDE0060 private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, Run? run, string dataText)
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad, string receivedData)
#pragma warning restore IDE0060
{ {
if (fileRead is null)
throw new ArgumentNullException(nameof(fileRead));
_I = 0; _I = 0;
_Data = string.Empty; _Data = string.Empty;
List<Detail> details = new(); List<Detail> details = new();
if (string.IsNullOrEmpty(receivedData)) if (string.IsNullOrEmpty(dataText))
receivedData = File.ReadAllText(logistics.ReportFullPath); dataText = File.ReadAllText(logistics.ReportFullPath);
_Log.Debug($"****ParseData - Source file contents:"); _Log.Debug($"****ParseData - Source file contents:");
_Log.Debug(receivedData); _Log.Debug(dataText);
List<string> moveFiles = new(); List<string> moveFiles = new();
string directoryName = Path.GetDirectoryName(logistics.ReportFullPath);
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
string directoryName = Path.GetDirectoryName(logistics.ReportFullPath) ?? throw new Exception();
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", logistics.Sequence, "*"), SearchOption.TopDirectoryOnly)); moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", logistics.Sequence, "*"), SearchOption.TopDirectoryOnly));
moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", fileNameWithoutExtension.Split('_').Last(), "*"), SearchOption.TopDirectoryOnly)); moveFiles.AddRange(Directory.GetFiles(directoryName, string.Concat(originalDataBioRad, "*", fileNameWithoutExtension.Split('_').Last(), "*"), SearchOption.TopDirectoryOnly));
foreach (string moveFile in moveFiles.Distinct()) foreach (string moveFile in moveFiles.Distinct())
fileInfoCollection.Add(new FileInfo(moveFile)); fileInfoCollection.Add(new FileInfo(moveFile));
if (!string.IsNullOrEmpty(receivedData)) if (!string.IsNullOrEmpty(dataText))
{ {
int i; int i;
int num; int num;
@ -472,11 +486,13 @@ public partial class ProcessData : IProcessData
int num1 = 0; int num1 = 0;
Detail detail; Detail detail;
string recipe; string recipe;
string nextLine;
_I = 0; _I = 0;
_Data = receivedData; _Data = dataText;
Set(logistics); Set(logistics, run);
nextLine = PeekNextLine();
string cassette = "Cassette"; string cassette = "Cassette";
if (PeekNextLine().Contains("Wafer")) if (nextLine.Contains("Wafer"))
{ {
_Log.Debug("****ProcessData Contains Wafer"); _Log.Debug("****ProcessData Contains Wafer");
while (!PeekNextLine().Contains(cassette)) while (!PeekNextLine().Contains(cassette))
@ -507,7 +523,8 @@ public partial class ProcessData : IProcessData
} }
detail.Recipe = recipe; detail.Recipe = recipe;
_ = GetToEOL(); _ = GetToEOL();
if (PeekNextLine().Contains("Thickness")) nextLine = PeekNextLine();
if (nextLine.Contains("Thickness"))
{ {
ScanPast("1 - "); ScanPast("1 - ");
num = Convert.ToInt32(GetToken()); num = Convert.ToInt32(GetToken());
@ -526,7 +543,8 @@ public partial class ProcessData : IProcessData
} }
} }
_ = GetToEOL(); _ = GetToEOL();
if (PeekNextLine().Contains("Thickness")) nextLine = PeekNextLine();
if (nextLine.Contains("Thickness"))
{ {
ScanPast("11 - "); ScanPast("11 - ");
num = Convert.ToInt32(GetToken()); num = Convert.ToInt32(GetToken());
@ -559,13 +577,20 @@ public partial class ProcessData : IProcessData
_Log.Debug("****ProcessData Removing stdDev"); _Log.Debug("****ProcessData Removing stdDev");
detail.StdDev = detail.StdDev.Remove(detail.StdDev.Length - 1, 1); detail.StdDev = detail.StdDev.Remove(detail.StdDev.Length - 1, 1);
} }
detail.UniqueId = string.Concat("_Wafer-", detail.Wafer, "_Slot-", detail.Slot, "_Point-", detail.Position); detail.UniqueId = string.Concat("_Wafer-", detail.Wafer, "_Slot-", detail.Slot);
details.Add(detail); details.Add(detail);
if (PeekNextLine().Contains(cassette)) nextLine = PeekNextLine();
if (nextLine.Contains(cassette))
{
_ = GetToEOL(); _ = GetToEOL();
if (PeekNextLine().Contains(cassette)) nextLine = PeekNextLine();
}
if (nextLine.Contains(cassette))
{
_ = GetToEOL(); _ = GetToEOL();
if (PeekNextLine().Contains("Process failed")) nextLine = PeekNextLine();
}
if (nextLine.Contains("Process failed"))
_ = GetToEOL(); _ = GetToEOL();
} }
} }
@ -584,7 +609,7 @@ public partial class ProcessData : IProcessData
StdDev = StdDev.Remove(StdDev.Length - 1, 1); StdDev = StdDev.Remove(StdDev.Length - 1, 1);
} }
} }
if (receivedData.Contains("------------- Process failed -------------")) if (dataText.Contains("------------- Process failed -------------"))
details.Add(new()); details.Add(new());
} }
StringBuilder stringBuilder = new(); StringBuilder stringBuilder = new();
@ -605,28 +630,42 @@ public partial class ProcessData : IProcessData
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1); _ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
detail.Thickness = stringBuilder.ToString(); detail.Thickness = stringBuilder.ToString();
_ = stringBuilder.Clear(); _ = stringBuilder.Clear();
foreach (Point point in detail.Points) }
_ = stringBuilder.Append(point.Position).Append(','); if (details.Count != 2
if (stringBuilder.Length > 0) || details[0].Slot != "1"
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1); || details[1].Slot != "25"
detail.Position = stringBuilder.ToString(); || string.IsNullOrEmpty(details[0].Thickness)
|| string.IsNullOrEmpty(details[1].Thickness)
|| !decimal.TryParse(details[0].Thickness, out decimal thick01)
|| !decimal.TryParse(details[1].Thickness, out decimal thick25)
|| (thick01 == 0 && thick25 == 0))
{
ThicknessSlotOne = string.Empty;
ThicknessSlotTwentyFive = string.Empty;
DeltaThicknessSlotsOneAndTwentyFive = string.Empty;
PercentDeltaThicknessSlotsOneAndTwentyFive = string.Empty;
}
else
{
ThicknessSlotOne = details[0].Thickness;
ThicknessSlotTwentyFive = details[1].Thickness;
DeltaThicknessSlotsOneAndTwentyFive = (thick01 - thick25).ToString();
// https://www.calculatorsoup.com/calculators/algebra/percent-difference-calculator.php
PercentDeltaThicknessSlotsOneAndTwentyFive = $"{Math.Abs(thick01 - thick25) / ((thick01 + thick25) / 2) * 100:0.000}";
} }
fileInfoCollection.Add(logistics.FileInfo); fileInfoCollection.Add(logistics.FileInfo);
_Details.AddRange(details); _Details.AddRange(details);
} }
#nullable enable
internal static List<Description> GetDescriptions(JsonElement[] jsonElements) internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
{ {
List<Description> results = new(); List<Description> results = new();
Description? description; Description? description;
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
foreach (JsonElement jsonElement in jsonElements) foreach (JsonElement jsonElement in jsonElements)
{ {
if (jsonElement.ValueKind != JsonValueKind.Object) if (jsonElement.ValueKind != JsonValueKind.Object)
throw new Exception(); throw new Exception();
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions); description = JsonSerializer.Deserialize(jsonElement.ToString(), DescriptionSourceGenerationContext.Default.Description);
if (description is null) if (description is null)
continue; continue;
results.Add(description); results.Add(description);

View File

@ -0,0 +1,59 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.Stratus;
#nullable enable
internal class Row
{
public Row(Run run, int index, int i, int j)
{
Index = index;
//
Batch = run.Header.Batch;
Cassette = run.Header.Cassette;
DateTime = run.Header.DateTime;
//
Destination = run.Wafers[i].Destination;
Mean = run.Wafers[i].Mean;
PassFail = run.Wafers[i].PassFail;
Recipe = run.Wafers[i].Recipe;
Reference = run.Wafers[i].Reference;
Site = run.Wafers[i].Sites[j];
Slot = run.Wafers[i].Slot;
Source = run.Wafers[i].Source;
StdDev = run.Wafers[i].StdDev;
Text = run.Wafers[i].Text;
//
GradeMean = run.Grade.MeanThickness;
GradeStdDev = run.Grade.StdDev;
}
public int Index { get; }
//
public string Batch { get; }
public string Cassette { get; }
public string DateTime { get; }
//
public string Destination { get; }
public string Mean { get; }
public string PassFail { get; }
public string Recipe { get; }
public string Reference { get; }
public string Site { get; }
public string Slot { get; }
public string Source { get; }
public string StdDev { get; }
public string Text { get; }
//
public string GradeMean { get; }
public string GradeStdDev { get; }
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Row))]
internal partial class StratusRowSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,66 @@
using Adaptation.Shared;
using System.Collections.ObjectModel;
using System.IO;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.Stratus;
#nullable enable
internal class Run
{
public Run(Header header, ReadOnlyCollection<Wafer> wafers, Grade grade)
{
Header = header;
Wafers = wafers;
Grade = grade;
}
public Header Header { get; }
public ReadOnlyCollection<Wafer> Wafers { get; }
public Grade Grade { get; }
internal static Run? Get(Logistics logistics)
{
Run? result;
Constant constant = new();
int[] i = new int[] { 0 };
string text = File.ReadAllText(logistics.ReportFullPath);
Header? header = Header.Get(text, constant, i);
if (header is null)
result = null;
else
{
ReadOnlyCollection<string> groups = Wafer.GetGroups(text, constant, i);
if (groups.Count == 0)
result = null;
else
{
Grade? grade = Grade.Get(constant, groups);
if (grade is null)
result = null;
else
{
ReadOnlyCollection<Wafer> wafers = Wafer.Get(constant, groups);
if (wafers.Count == 0 && grade.MeanThickness != "0")
result = null;
else
{
result = new(header, wafers, grade);
// WriteJson(logistics, fileInfoCollection, result);
// WriteCommaSeparatedValues(logistics, result);
}
}
}
}
return result;
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Run))]
internal partial class StratusRunSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,234 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Adaptation.FileHandlers.Stratus;
#nullable enable
public class Wafer
{
public Wafer(string destination, string mean, string passFail, string recipe, string reference, ReadOnlyCollection<string> sites, string slot, string source, string stdDev, string waferText)
{
Destination = destination;
Mean = mean;
PassFail = passFail;
Recipe = recipe;
Reference = reference;
Sites = sites;
Slot = slot;
Source = source;
StdDev = stdDev;
Text = waferText;
}
public string Destination { get; }
public string Mean { get; }
public string PassFail { get; }
public string Recipe { get; }
public string Reference { get; }
public ReadOnlyCollection<string> Sites { get; }
public string Slot { get; }
public string Source { get; }
public string StdDev { get; }
public string Text { get; }
internal static string GetToken(string text, int[] i)
{
while (true)
{
if (i[0] >= text.Length || !IsNullOrWhiteSpace(text.Substring(i[0], 1)))
break;
i[0]++;
}
int num = i[0];
while (true)
{
if (num >= text.Length || IsNullOrWhiteSpace(text.Substring(num, 1)))
break;
num++;
}
string str = text.Substring(i[0], num - i[0]);
i[0] = num;
return str.Trim();
}
internal static bool IsNullOrWhiteSpace(string search)
{
bool flag;
int num = 0;
while (true)
{
if (num >= search.Length)
{
flag = true;
break;
}
else if (char.IsWhiteSpace(search[num]))
num++;
else
{
flag = false;
break;
}
}
return flag;
}
internal static string PeekNextLine(string text, int[] i)
{
int num = i[0];
string toEOL = Header.GetToEOL(text, i);
i[0] = num;
return toEOL;
}
internal static ReadOnlyCollection<string> GetGroups(string text, Constant constant, int[] i)
{
List<string> results = new();
string[] lines = text.Substring(i[0]).Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (lines.Length > 0)
{
List<string> group = new();
foreach (string line in lines)
{
if (string.IsNullOrEmpty(line.Trim()))
continue;
group.Add(line);
if (line.StartsWith(constant.Destination)
|| line.Contains(constant.ProcessFailed)
|| line.StartsWith(constant.WaferParentheses) && line.Contains(constant.IsPut))
{
results.Add(string.Join(Environment.NewLine, group));
group.Clear();
}
}
results.Add(string.Join(Environment.NewLine, group));
}
return results.AsReadOnly();
}
internal static ReadOnlyCollection<Wafer> Get(Constant constant, ReadOnlyCollection<string> groups)
{
List<Wafer> results = new();
string mean;
string slot;
Wafer wafer;
string recipe;
string source;
string stdDev;
string nextLine;
string passFail;
string reference;
string thickness;
string waferText;
string destination;
List<string> sites;
int[] j = new int[] { 0 };
foreach (string groupText in groups)
{
j[0] = 0;
sites = new();
if (groupText.Contains(constant.ProcessFailed))
{
mean = string.Empty;
slot = string.Empty;
recipe = string.Empty;
source = string.Empty;
stdDev = string.Empty;
passFail = string.Empty;
reference = string.Empty;
waferText = string.Empty;
destination = string.Empty;
}
else if (groupText.Contains(constant.Reference))
{
mean = string.Empty;
slot = string.Empty;
recipe = string.Empty;
stdDev = string.Empty;
passFail = string.Empty;
waferText = string.Empty;
Header.ScanPast(groupText, j, constant.Reference);
reference = Header.GetToEOL(groupText, j);
Header.ScanPast(groupText, j, constant.Source);
source = Header.GetToEOL(groupText, j).Trim();
Header.ScanPast(groupText, j, constant.Destination);
destination = Header.GetToEOL(groupText, j).Trim();
}
else
{
if (!groupText.Contains(constant.Wafer))
continue;
Header.ScanPast(groupText, j, constant.Wafer);
waferText = Header.GetToEOL(groupText, j);
if (waferText.EndsWith("."))
waferText = waferText.Remove(waferText.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Slot);
slot = Header.GetToEOL(groupText, j);
Header.ScanPast(groupText, j, constant.Recipe);
recipe = Header.GetToEOL(groupText, j);
if (recipe.EndsWith("."))
recipe = recipe.Remove(recipe.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Thickness);
_ = GetToken(groupText, j);
nextLine = PeekNextLine(groupText, j);
if (nextLine.Contains(constant.OneHypen))
{
Header.ScanPast(groupText, j, constant.OneHypen);
_ = GetToken(groupText, j);
}
for (int k = 0; k < 100; k++)
{
nextLine = PeekNextLine(groupText, j);
if (nextLine.Contains("Slot"))
break;
if (string.IsNullOrEmpty(nextLine))
{
_ = Header.GetToEOL(groupText, j);
continue;
}
thickness = GetToken(groupText, j);
if (thickness == constant.Thickness)
{
_ = GetToken(groupText, j);
continue;
}
sites.Add(thickness);
}
Header.ScanPast(groupText, j, constant.Slot);
_ = GetToken(groupText, j);
passFail = GetToken(groupText, j);
if (passFail.EndsWith("."))
passFail = passFail.Remove(passFail.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Mean);
mean = GetToken(groupText, j);
if (mean.EndsWith(","))
mean = mean.Remove(mean.Length - 1, 1);
Header.ScanPast(groupText, j, constant.STDD);
stdDev = Header.GetToEOL(groupText, j);
if (stdDev.EndsWith("."))
stdDev = stdDev.Remove(stdDev.Length - 1, 1);
reference = string.Empty;
Header.ScanPast(groupText, j, constant.Source);
source = Header.GetToEOL(groupText, j).Trim();
Header.ScanPast(groupText, j, constant.Destination);
destination = Header.GetToEOL(groupText, j).Trim();
}
wafer = new(destination: destination,
mean: mean,
passFail: passFail,
recipe: recipe,
reference: reference,
sites: sites.AsReadOnly(),
slot: slot,
source: source,
stdDev: stdDev,
waferText: waferText);
results.Add(wafer);
}
return results.AsReadOnly();
}
}

View File

@ -0,0 +1,26 @@
namespace Adaptation.FileHandlers.txt;
internal class Constant
{
public string Mean { get; } = "Mean";
public string Slot { get; } = "Slot";
public string STDD { get; } = "STDD";
public string Batch { get; } = "Batch";
public string Wafer { get; } = "Wafer";
public string OneHypen { get; } = "1 - ";
public string Recipe { get; } = "Recipe";
public string Source { get; } = "Source:";
public string Started { get; } = "started";
public string Cassette { get; } = "Cassette";
public string Finished { get; } = "finished.";
public string Reference { get; } = "Reference";
public string StartedAt { get; } = "started at";
public string Thickness { get; } = "Thickness,";
public string Destination { get; } = "Destination:";
public string IsPut { get; } = "is put to the slot";
public string WaferParentheses { get; } = "Wafer (";
public string IsTaken { get; } = "is taken from the slot";
public string ProcessFailed { get; } = "- Process failed -";
}

View File

@ -5,6 +5,7 @@ using Adaptation.Shared.Duplicator;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
@ -16,7 +17,7 @@ public class FileRead : Shared.FileRead, IFileRead
private long? _TickOffset; private long? _TickOffset;
private readonly string _OriginalDataBioRad; private readonly string _OriginalDataBioRad;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{ {
_MinFileLength = 10; _MinFileLength = 10;
@ -29,7 +30,8 @@ public class FileRead : Shared.FileRead, IFileRead
if (_IsDuplicator) if (_IsDuplicator)
throw new Exception(cellInstanceConnectionName); throw new Exception(cellInstanceConnectionName);
_OriginalDataBioRad = "OriginalDataBioRad_"; _OriginalDataBioRad = "OriginalDataBioRad_";
NestExistingFiles(_FileConnectorConfiguration); if (_IsEAFHosted)
NestExistingFiles(_FileConnectorConfiguration);
} }
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults); void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
@ -97,10 +99,14 @@ public class FileRead : Shared.FileRead, IFileRead
return results; return results;
} }
#nullable enable
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{ {
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>()); if (dateTime == DateTime.MinValue)
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks; throw new ArgumentNullException(nameof(dateTime));
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true); _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotID(_Logistics.MID); SetFileParameterLotID(_Logistics.MID);
FileInfo fileInfo = new(reportFullPath); FileInfo fileInfo = new(reportFullPath);
@ -108,13 +114,23 @@ public class FileRead : Shared.FileRead, IFileRead
results.Item4.Add(fileInfo); results.Item4.Add(fileInfo);
else else
{ {
try
{
ReadOnlyCollection<Run>? runs = Run.Get(_TickOffset.Value, _Logistics, results.Item4);
// if (run is null)
// throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
if (runs.Count == 0)
{ }
}
catch (Exception)
{ }
bool isBioRad; bool isBioRad;
string dataText; string dataText;
string cassetteID; string cassetteID;
string fileNameTemp; string fileNameTemp;
string tupleFileName; string tupleFileName;
DateTime cassetteDateTime; DateTime cassetteDateTime;
string directoryName = Path.GetDirectoryName(reportFullPath); string directoryName = Path.GetDirectoryName(reportFullPath) ?? throw new Exception();
string sequenceDirectoryName = Path.Combine(directoryName, _Logistics.Sequence.ToString()); string sequenceDirectoryName = Path.Combine(directoryName, _Logistics.Sequence.ToString());
string originalDataBioRad = Path.Combine(directoryName, $"{_OriginalDataBioRad}{_Logistics.Sequence}.txt"); string originalDataBioRad = Path.Combine(directoryName, $"{_OriginalDataBioRad}{_Logistics.Sequence}.txt");
IProcessData iProcessData = new ProcessData(this, _Logistics, _TickOffset.Value, results.Item4, _OriginalDataBioRad); IProcessData iProcessData = new ProcessData(this, _Logistics, _TickOffset.Value, results.Item4, _OriginalDataBioRad);

View File

@ -0,0 +1,48 @@
using System.Collections.ObjectModel;
namespace Adaptation.FileHandlers.txt;
#nullable enable
public class Grade
{
public Grade(string meanThickness, string stdDev)
{
MeanThickness = meanThickness;
StdDev = stdDev;
}
public string MeanThickness { get; }
public string StdDev { get; }
internal static Grade? Get(Constant constant, ReadOnlyCollection<string> groups)
{
Grade? result;
string? mean = null;
string? stdDev = null;
int[] j = new int[] { 0 };
foreach (string groupText in groups)
{
if (!groupText.Contains(constant.Finished))
continue;
mean = string.Empty;
stdDev = string.Empty;
Header.ScanPast(groupText, j, constant.Mean);
mean = Wafer.GetToken(groupText, j);
if (mean.EndsWith(","))
mean = mean.Remove(mean.Length - 1, 1);
Header.ScanPast(groupText, j, constant.STDD);
stdDev = Wafer.GetToken(groupText, j);
if (stdDev.EndsWith(","))
stdDev = stdDev.Remove(stdDev.Length - 1, 1);
}
if (mean is null || stdDev is null)
result = null;
else
result = new(meanThickness: mean,
stdDev: stdDev);
return result;
}
}

View File

@ -0,0 +1,96 @@
using System;
namespace Adaptation.FileHandlers.txt;
#nullable enable
public class Header
{
public Header(string batch, string cassette, string dateTime)
{
Batch = batch;
Cassette = cassette;
DateTime = dateTime;
}
public string Batch { get; }
public string Cassette { get; }
public string DateTime { get; }
internal static string GetBefore(string text, int[] i, string search)
{
string str;
string str1;
int num = text.IndexOf(search, i[0]);
if (num <= -1)
{
str = text.Substring(i[0]);
i[0] = text.Length;
str1 = str.Trim();
}
else
{
str = text.Substring(i[0], num - i[0]);
i[0] = num + search.Length;
str1 = str.Trim();
}
return str1;
}
internal static string GetToEOL(string text, int[] i)
{
string result;
if (text.IndexOf("\n", i[0]) > -1)
result = GetBefore(text, i, "\n");
else
result = GetBefore(text, i, Environment.NewLine);
return result;
}
private static string GetToText(string text, int[] i, string search) =>
text.Substring(i[0], text.IndexOf(search, i[0]) - i[0]).Trim();
internal static void ScanPast(string text, int[] i, string search)
{
int num = text.IndexOf(search, i[0]);
if (num <= -1)
i[0] = text.Length;
else
i[0] = num + search.Length;
}
internal static Header Get(string text, Constant constant, int[] i)
{
Header? result;
string batch;
if (!text.Contains(constant.Batch) || !text.Contains(constant.Started))
batch = string.Empty;
else
{
for (int z = 0; z < int.MaxValue; z++)
{
ScanPast(text, i, constant.Batch);
if (!text.Substring(i[0]).Contains(constant.Batch))
break;
}
batch = GetToText(text, i, constant.Started);
ScanPast(text, i, constant.StartedAt);
}
ScanPast(text, i, constant.Cassette);
string cassette;
if (!text.Substring(i[0]).Contains(constant.Started))
cassette = string.Empty;
else
cassette = GetToText(text, i, constant.Started);
ScanPast(text, i, constant.StartedAt);
string dateTime = GetToEOL(text, i);
if (dateTime.EndsWith("."))
dateTime = dateTime.Remove(dateTime.Length - 1, 1);
result = new(batch: batch,
cassette: cassette,
dateTime: dateTime);
return result;
}
}

View File

@ -23,10 +23,9 @@ public partial class ProcessData : IProcessData
List<object> Shared.Properties.IProcessData.Details => _Details; List<object> Shared.Properties.IProcessData.Details => _Details;
public ProcessData(IFileRead fileRead, Logistics logistics, long tickOffset, List<FileInfo> fileInfoCollection, string originalDataBioRad) internal ProcessData(IFileRead fileRead, Logistics logistics, long tickOffset, List<FileInfo> fileInfoCollection, string originalDataBioRad)
{ {
JobID = logistics.JobID; JobID = logistics.JobID;
fileInfoCollection.Clear();
_Details = new List<object>(); _Details = new List<object>();
MesEntity = logistics.MesEntity; MesEntity = logistics.MesEntity;
_Log = LogManager.GetLogger(typeof(ProcessData)); _Log = LogManager.GetLogger(typeof(ProcessData));
@ -52,13 +51,19 @@ public partial class ProcessData : IProcessData
if (description.Test != (int)tests[i]) if (description.Test != (int)tests[i])
throw new Exception(); throw new Exception();
} }
FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json");
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json); File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
return results; return results;
} }
#nullable enable
private List<Tuple<string, bool, DateTime, string>> Parse(IFileRead fileRead, Logistics logistics, long tickOffset, List<FileInfo> fileInfoCollection, string originalDataBioRad) private List<Tuple<string, bool, DateTime, string>> Parse(IFileRead fileRead, Logistics logistics, long tickOffset, List<FileInfo> fileInfoCollection, string originalDataBioRad)
{ {
List<Tuple<string, bool, DateTime, string>> results = new(); List<Tuple<string, bool, DateTime, string>> results = new();
@ -224,7 +229,8 @@ public partial class ProcessData : IProcessData
} }
else else
{ {
processData = new Stratus.ProcessData(fileRead, logistics, fileInfoCollection, originalDataBioRad, dataText: dataText); Stratus.Run? complete = null;
processData = new Stratus.ProcessData(fileRead, logistics, fileInfoCollection, originalDataBioRad, complete, dataText: dataText);
iProcessData = processData; iProcessData = processData;
if (iProcessData.Details.Count == 0) if (iProcessData.Details.Count == 0)
_Log.Warn("No Details!"); _Log.Warn("No Details!");

View File

@ -0,0 +1,59 @@
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
#nullable enable
internal class Row
{
public Row(Run run, int index, int i, int j)
{
Index = index;
//
Batch = run.Header.Batch;
Cassette = run.Header.Cassette;
DateTime = run.Header.DateTime;
//
Destination = run.Wafers[i].Destination;
Mean = run.Wafers[i].Mean;
PassFail = run.Wafers[i].PassFail;
Recipe = run.Wafers[i].Recipe;
Reference = run.Wafers[i].Reference;
Site = run.Wafers[i].Sites[j];
Slot = run.Wafers[i].Slot;
Source = run.Wafers[i].Source;
StdDev = run.Wafers[i].StdDev;
Text = run.Wafers[i].Text;
//
GradeMean = run.Grade.MeanThickness;
GradeStdDev = run.Grade.StdDev;
}
public int Index { get; }
//
public string Batch { get; }
public string Cassette { get; }
public string DateTime { get; }
//
public string Destination { get; }
public string Mean { get; }
public string PassFail { get; }
public string Recipe { get; }
public string Reference { get; }
public string Site { get; }
public string Slot { get; }
public string Source { get; }
public string StdDev { get; }
public string Text { get; }
//
public string GradeMean { get; }
public string GradeStdDev { get; }
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Row))]
internal partial class RowSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,185 @@
using Adaptation.Shared;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.FileHandlers.txt;
#nullable enable
internal class Run
{
public Run(Header header, ReadOnlyCollection<Wafer> wafers, Grade grade)
{
Header = header;
Wafers = wafers;
Grade = grade;
}
public Header Header { get; }
public ReadOnlyCollection<Wafer> Wafers { get; }
public Grade Grade { get; }
private static void WriteJson(Logistics logistics, List<FileInfo> _, int r, Run result)
{
FileInfo fileInfo = new($"{logistics.ReportFullPath}-{r}.run.json");
string json = JsonSerializer.Serialize(result, RunSourceGenerationContext.Default.Run);
File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
// Can't add until old parse is removed // fileInfoCollection.Add(fileInfo);
}
private static ReadOnlyCollection<string> GetLines(Logistics logistics, JsonElement[]? jsonElements)
{
List<string> results = new();
int columns = 0;
StringBuilder stringBuilder = new();
results.Add($"\"Count\",{jsonElements?.Length}");
results.Add($"\"{nameof(logistics.Sequence)}\",\"{logistics.Sequence}\"");
results.Add($"\"{nameof(logistics.MesEntity)}\",\"{logistics.MesEntity}\"");
string dateTimeFromSequence = logistics.DateTimeFromSequence.ToString("MM/dd/yyyy hh:mm:ss tt");
for (int i = 0; i < jsonElements?.Length;)
{
_ = stringBuilder.Append('"').Append(nameof(logistics.DateTimeFromSequence)).Append('"').Append(',');
foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject())
{
columns += 1;
_ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append(',');
}
break;
}
if (jsonElements?.Length != 0)
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
results.Add(stringBuilder.ToString());
for (int i = 0; i < jsonElements?.Length; i++)
{
_ = stringBuilder.Clear();
_ = stringBuilder.Append('"').Append(dateTimeFromSequence).Append('"').Append(',');
foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject())
{
if (jsonProperty.Value.ValueKind == JsonValueKind.Object)
_ = stringBuilder.Append(',');
else if (jsonProperty.Value.ValueKind != JsonValueKind.String)
_ = stringBuilder.Append(jsonProperty.Value).Append(',');
else
_ = stringBuilder.Append('"').Append(jsonProperty.Value).Append('"').Append(',');
}
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
results.Add(stringBuilder.ToString());
}
return results.AsReadOnly();
}
private static void WriteCommaSeparatedValues(Logistics logistics, int r, Run run)
{
List<Row> results = new();
Row row;
int index = 0;
for (int w = 0; w < run.Wafers.Count; w++)
{
for (int s = 0; s < run.Wafers[w].Sites.Count; s++)
{
row = new(run, index, w, s);
results.Add(row);
index += 1;
}
}
string json = JsonSerializer.Serialize(results);
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
ReadOnlyCollection<string> lines = GetLines(logistics, jsonElements);
File.WriteAllText($"{logistics.ReportFullPath}-{r}.csv", string.Join(Environment.NewLine, lines));
}
private static ReadOnlyCollection<string> GetRuns(Constant constant, string text)
{
List<string> results = new();
string check;
List<string> collection = new();
List<string> lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.None).ToList();
lines.Add($"{constant.Batch}{constant.Started}");
foreach (string line in lines)
{
if (line.StartsWith(constant.Batch) && line.Contains(constant.Started))
{
check = string.Join(Environment.NewLine, collection);
if (check.Contains(constant.Finished))
results.Add(check);
collection.Clear();
}
collection.Add(line);
}
return results.AsReadOnly();
}
private static ReadOnlyCollection<Run> GetRuns(Logistics logistics)
{
List<Run> results = new();
int[] i;
Constant constant = new();
string allText = File.ReadAllText(logistics.ReportFullPath);
string[] segments = allText.Split(new string[] { constant.Finished }, StringSplitOptions.None);
if (segments.Length > 1)
{
Run run;
ReadOnlyCollection<string> runs = GetRuns(constant, allText);
foreach (string text in runs)
{
i = new int[] { 0 };
Header? header = Header.Get(text, constant, i);
if (header is null)
continue;
else
{
ReadOnlyCollection<string> groups = Wafer.GetGroups(text, constant, i);
if (groups.Count == 0)
continue;
else
{
Grade? grade = Grade.Get(constant, groups);
if (grade is null)
continue;
else
{
ReadOnlyCollection<Wafer> wafers = Wafer.Get(constant, groups);
if (wafers.Count == 0 && grade.MeanThickness != "0")
continue;
else
{
run = new(header, wafers, grade);
results.Add(run);
}
}
}
}
}
}
return results.AsReadOnly();
}
internal static ReadOnlyCollection<Run> Get(long tickOffset, Logistics logistics, List<FileInfo> fileInfoCollection)
{
ReadOnlyCollection<Run> results = GetRuns(logistics);
DateTime afterCheck = new(File.GetLastWriteTime(logistics.ReportFullPath).Ticks + tickOffset);
if (logistics.DateTimeFromSequence != afterCheck)
results = new(new List<Run>());
for (int i = 0; i < results.Count; i++)
{
WriteJson(logistics, fileInfoCollection, i, results[i]);
WriteCommaSeparatedValues(logistics, i, results[i]);
}
return results;
}
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(Run))]
internal partial class RunSourceGenerationContext : JsonSerializerContext
{
}

View File

@ -0,0 +1,266 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Adaptation.FileHandlers.txt;
#nullable enable
public class Wafer
{
public Wafer(string destination, string mean, string passFail, string recipe, string reference, ReadOnlyCollection<string> sites, string slot, string source, string stdDev, string waferText)
{
Destination = destination;
Mean = mean;
PassFail = passFail;
Recipe = recipe;
Reference = reference;
Sites = sites;
Slot = slot;
Source = source;
StdDev = stdDev;
Text = waferText;
}
public string Destination { get; }
public string Mean { get; }
public string PassFail { get; }
public string Recipe { get; }
public string Reference { get; }
public ReadOnlyCollection<string> Sites { get; }
public string Slot { get; }
public string Source { get; }
public string StdDev { get; }
public string Text { get; }
internal static string GetToken(string text, int[] i)
{
while (true)
{
if (i[0] >= text.Length || !IsNullOrWhiteSpace(text.Substring(i[0], 1)))
break;
i[0]++;
}
int num = i[0];
while (true)
{
if (num >= text.Length || IsNullOrWhiteSpace(text.Substring(num, 1)))
break;
num++;
}
string str = text.Substring(i[0], num - i[0]);
i[0] = num;
return str.Trim();
}
internal static bool IsNullOrWhiteSpace(string search)
{
bool flag;
int num = 0;
while (true)
{
if (num >= search.Length)
{
flag = true;
break;
}
else if (char.IsWhiteSpace(search[num]))
num++;
else
{
flag = false;
break;
}
}
return flag;
}
internal static string PeekNextLine(string text, int[] i)
{
int num = i[0];
string toEOL = Header.GetToEOL(text, i);
i[0] = num;
return toEOL;
}
internal static ReadOnlyCollection<string> GetGroups(string text, Constant constant, int[] i)
{
List<string> results = new();
string[] lines = text.Substring(i[0]).Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (lines.Length > 0)
{
List<string> group = new();
foreach (string line in lines)
{
if (string.IsNullOrEmpty(line.Trim()))
continue;
group.Add(line);
if (line.StartsWith(constant.Destination)
|| line.Contains(constant.ProcessFailed)
|| line.StartsWith(constant.WaferParentheses) && line.Contains(constant.IsPut))
{
results.Add(string.Join(Environment.NewLine, group));
group.Clear();
}
}
results.Add(string.Join(Environment.NewLine, group));
}
return results.AsReadOnly();
}
internal static ReadOnlyCollection<Wafer> Get(Constant constant, ReadOnlyCollection<string> groups)
{
List<Wafer> results = new();
string mean;
string slot;
Wafer wafer;
string recipe;
string source;
string stdDev;
string nextLine;
string passFail;
string reference;
string thickness;
string waferText;
string destination;
List<string> sites;
int[] j = new int[] { 0 };
foreach (string groupText in groups)
{
j[0] = 0;
sites = new();
if (groupText.Contains(constant.ProcessFailed))
{
mean = string.Empty;
slot = string.Empty;
recipe = string.Empty;
source = string.Empty;
stdDev = string.Empty;
passFail = string.Empty;
reference = string.Empty;
waferText = string.Empty;
destination = string.Empty;
}
else if (groupText.Contains(constant.Reference))
{
mean = string.Empty;
slot = string.Empty;
recipe = string.Empty;
stdDev = string.Empty;
passFail = string.Empty;
waferText = string.Empty;
if (!groupText.Contains(constant.IsTaken))
source = string.Empty;
else
{
Header.ScanPast(groupText, j, constant.IsTaken);
source = Header.GetToEOL(groupText, j).Trim();
}
Header.ScanPast(groupText, j, constant.Reference);
reference = Header.GetToEOL(groupText, j);
if (groupText.Contains(constant.Destination))
{
Header.ScanPast(groupText, j, constant.Source);
source = Header.GetToEOL(groupText, j).Trim();
Header.ScanPast(groupText, j, constant.Destination);
destination = Header.GetToEOL(groupText, j).Trim();
}
else
{
Header.ScanPast(groupText, j, constant.IsPut);
destination = Header.GetToEOL(groupText, j).Trim();
}
}
else
{
if (!groupText.Contains(constant.Wafer))
continue;
if (!groupText.Contains(constant.IsTaken))
source = string.Empty;
else
{
Header.ScanPast(groupText, j, constant.IsTaken);
source = Header.GetToEOL(groupText, j).Trim();
}
Header.ScanPast(groupText, j, constant.Wafer);
waferText = Header.GetToEOL(groupText, j);
if (waferText.EndsWith("."))
waferText = waferText.Remove(waferText.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Slot);
slot = Header.GetToEOL(groupText, j);
Header.ScanPast(groupText, j, constant.Recipe);
recipe = Header.GetToEOL(groupText, j);
if (recipe.EndsWith("."))
recipe = recipe.Remove(recipe.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Thickness);
_ = GetToken(groupText, j);
nextLine = PeekNextLine(groupText, j);
if (nextLine.Contains(constant.OneHypen))
{
Header.ScanPast(groupText, j, constant.OneHypen);
_ = GetToken(groupText, j);
}
for (int k = 0; k < 100; k++)
{
nextLine = PeekNextLine(groupText, j);
if (nextLine.Contains("Slot"))
break;
if (string.IsNullOrEmpty(nextLine))
{
_ = Header.GetToEOL(groupText, j);
continue;
}
thickness = GetToken(groupText, j);
if (thickness == constant.Thickness)
{
_ = GetToken(groupText, j);
continue;
}
sites.Add(thickness);
}
Header.ScanPast(groupText, j, constant.Slot);
_ = GetToken(groupText, j);
passFail = GetToken(groupText, j);
if (passFail.EndsWith("."))
passFail = passFail.Remove(passFail.Length - 1, 1);
Header.ScanPast(groupText, j, constant.Mean);
mean = GetToken(groupText, j);
if (mean.EndsWith(","))
mean = mean.Remove(mean.Length - 1, 1);
Header.ScanPast(groupText, j, constant.STDD);
stdDev = Header.GetToEOL(groupText, j);
if (stdDev.EndsWith("."))
stdDev = stdDev.Remove(stdDev.Length - 1, 1);
reference = string.Empty;
if (groupText.Contains(constant.Destination))
{
Header.ScanPast(groupText, j, constant.Source);
source = Header.GetToEOL(groupText, j).Trim();
Header.ScanPast(groupText, j, constant.Destination);
destination = Header.GetToEOL(groupText, j).Trim();
}
else
{
Header.ScanPast(groupText, j, constant.IsTaken);
source = Header.GetToEOL(groupText, j).Trim();
Header.ScanPast(groupText, j, constant.IsPut);
destination = Header.GetToEOL(groupText, j).Trim();
}
}
wafer = new(destination: destination,
mean: mean,
passFail: passFail,
recipe: recipe,
reference: reference,
sites: sites.AsReadOnly(),
slot: slot,
source: source,
stdDev: stdDev,
waferText: waferText);
results.Add(wafer);
}
return results.AsReadOnly();
}
}

View File

@ -226,9 +226,9 @@ public class MonIn : IMonIn, IDisposable
{ {
StringBuilder stringBuilder = new(); StringBuilder stringBuilder = new();
if (string.IsNullOrEmpty(subresource)) if (string.IsNullOrEmpty(subresource))
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
else else
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim());
return stringBuilder.ToString(); return stringBuilder.ToString();
} }
@ -247,14 +247,14 @@ public class MonIn : IMonIn, IDisposable
if (string.IsNullOrEmpty(subresource)) if (string.IsNullOrEmpty(subresource))
{ {
if (unit.Equals(string.Empty) && !interval.HasValue) if (unit.Equals(string.Empty) && !interval.HasValue)
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim());
else else
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
} }
else if (unit.Equals(string.Empty) && !interval.HasValue) else if (unit.Equals(string.Empty) && !interval.HasValue)
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim());
else else
_ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim()); _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : "now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : string.Empty, unit.Trim());
return stringBuilder.ToString(); return stringBuilder.ToString();
} }

View File

@ -1,190 +1 @@
trigger: # dotnet nuget push --source https://tfs.intra.infineon.com/tfs/FactoryIntegration/fccf8303-9cf7-4788-a9e0-4042541503fa/_packaging/EAF-Mesa-Integration/nuget/v3/index.json --api-key az D:\vsts-agent-win-x64-2.210.1-eaf\nuget\infineon.mesa.pdf.text.stripper.4.8.0.1.nupkg
branches:
include:
- development
paths:
include:
- "Adaptation/*"
pool:
name: eaf
demands: MET08THFTIRSTRATUS-Development
steps:
- script: |
set coreVersion=net7.0
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
displayName: CoreVersion
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: |
set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
displayName: NugetSource
- script: |
set gitCommit=$(Build.SourceVersion)
set gitCommitSeven=%gitCommit:~0,7%
echo %gitCommitSeven%
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
echo $(GitCommitSeven)
displayName: GitCommitSeven
- script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(Configuration)
echo $(NugetSource)
echo $(GitCommitSeven)
REM echo $(pipelinePassword)
displayName: "Echo Check"
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Nuget Clear"
enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- task: CopyFiles@2
displayName: "Copy Files to: - GhostPCL"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: "Copy Files to: - LincPDFC"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: "Copy Files to: - PDF-Text-Stripper"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"
inputs:
teamProject: "Mesa_FI"
workItemType: Bug
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
assignedTo: "$(Build.RequestedForId)"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Publish"
enabled: false
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"'
displayName: "MSBuild Restore"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- task: CopyFiles@2
displayName: 'Copy Files to: D:\Framework4.8'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: 'Copy Files to: Local D EAF Deployment Storage'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Tests"
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: false

View File

@ -35,7 +35,7 @@
<RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08THFTIRSTRATUS" /> <RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08THFTIRSTRATUS" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" /> <PackageReference Include="coverlet.collector" Version="6.0.3" />
<PackageReference Include="FFMpegCore" Version="5.1.0" /> <PackageReference Include="FFMpegCore" Version="5.1.0" />
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -44,41 +44,39 @@
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Instances" Version="3.0.0" /> <PackageReference Include="Instances" Version="3.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" /> <PackageReference Include="log4net" Version="3.0.3"></PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.5.1" /> <PackageReference Include="Microsoft.Win32.SystemEvents" Version="9.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.5.1" /> <PackageReference Include="MSTest.TestAdapter" Version="3.7.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.7.0" />
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="RoboSharp" Version="1.5.3" /> <PackageReference Include="RoboSharp" Version="1.6.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" /> <PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" /> <PackageReference Include="System.Data.OleDb" Version="9.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> <PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" /> <PackageReference Include="System.Drawing.Common" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" /> <PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="Tesseract" Version="5.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.2"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" />
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" /> <PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="Tesseract" Version="5.2.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="appsettings.json"> <None Include="appsettings.json">

View File

@ -1,3 +1,9 @@
# D:
# cd D:\EAF-Mesa-Integration
# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa003-meseafsvc --work _work --runAsService --auth negotiate --userName infineon\phares
# D:
# cd D:\EAF-Mesa-Integration
# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa07ec-ecmeseaf --work _work --runAsService --auth negotiate --userName infineon\phares
trigger: trigger:
branches: branches:
include: include:
@ -6,180 +12,273 @@ trigger:
include: include:
- "Adaptation/*" - "Adaptation/*"
pool: stages:
name: eaf - stage: DevServer
demands: MET08THFTIRSTRATUS displayName: DevServer
steps: pool:
- script: | name: EAF Mesa Integration
set coreVersion=net7.0 demands: MET08THFTIRSTRATUS-Development
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
displayName: CoreVersion
- script: | variables:
set configuration=Release coreVersion: "net8.0"
echo %configuration% nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: | jobs:
set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget - job: SetupEnvironment
echo %nugetSource% steps:
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource% - script: |
echo $(NugetSource) echo $(Build.BuildId)
displayName: NugetSource echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(NugetSource)
displayName: "Echo Check"
- script: | - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
set gitCommit=$(Build.SourceVersion) displayName: "Nuget Clear"
set gitCommitSeven=%gitCommit:~0,7% enabled: false
echo %gitCommitSeven%
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
echo $(GitCommitSeven)
displayName: GitCommitSeven
- script: | - script: |
echo $(Build.BuildId) "C:\program files\dotnet\dotnet.exe" user-secrets init
echo $(Build.Reason) "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
echo $(Build.Repository.Id) "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
echo $(Build.Repository.Name) "C:\program files\dotnet\dotnet.exe" user-secrets list
echo $(Build.SourceVersion) workingDirectory: Adaptation
echo $(CoreVersion) displayName: "Safe storage of app secrets - Adaptation"
echo $(Configuration)
echo $(NugetSource)
echo $(GitCommitSeven)
REM echo $(pipelinePassword)
displayName: "Echo Check"
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear' - job: BuildDebug
displayName: "Nuget Clear" dependsOn:
enabled: false - SetupEnvironment
steps:
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: | - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
"C:\program files\dotnet\dotnet.exe" user-secrets init workingDirectory: Adaptation
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)" displayName: "Core Build - Adaptation"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- task: CopyFiles@2 - job: BuildRelease
displayName: "Copy Files to: - GhostPCL" dependsOn:
inputs: - SetupEnvironment
Contents: '*' steps:
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64' - script: |
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64' set configuration=Release
OverWrite: true echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- task: CopyFiles@2 - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "Copy Files to: - LincPDFC" displayName: "MSBuild Restore"
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
- task: CopyFiles@2 - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: "Copy Files to: - PDF-Text-Stripper" displayName: MSBuild
inputs:
Contents: '*'
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
OverWrite: true
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)' - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
workingDirectory: Adaptation displayName: MSBuild
displayName: "Core Build - Adaptation"
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } - script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)" displayName: "Commit Id"
displayName: "PowerShell Script"
continueOnError: true
- script: "dotnet test --configuration $(Configuration)" - task: CopyFiles@2
workingDirectory: Adaptation displayName: 'Copy Files to: D:\EAF'
displayName: "Core Test" inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
enabled: true
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)' - job: TestDebug
displayName: "Move Results" dependsOn:
- SetupEnvironment
- BuildDebug
- BuildRelease
steps:
- script: |
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: '"C:\program files\dotnet\dotnet.exe" tool restore' - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: Adaptation workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "Tool Restore" displayName: "PowerShell Script"
enabled: false continueOnError: true
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark' - script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation workingDirectory: Adaptation
displayName: "Report Generator" displayName: "Core Test"
enabled: false
- task: PublishTestResults@2 - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Publish Test Results **/*.trx" displayName: "Move Results"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2 - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
displayName: "Publish Test Results */coverage.cobertura.xml" workingDirectory: Adaptation
inputs: displayName: "Tool Restore"
testResultsFormat: VSTest enabled: false
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1 - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
displayName: "Create work item" workingDirectory: Adaptation
inputs: displayName: "Report Generator"
teamProject: "Mesa_FI" enabled: false
workItemType: Bug
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
assignedTo: "$(Build.RequestedForId)"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)' - task: PublishTestResults@2
workingDirectory: Adaptation displayName: "Publish Test Results **/*.trx"
displayName: "Core Publish" inputs:
enabled: false testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"' - task: PublishTestResults@2
displayName: "MSBuild Restore" displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8' - script: |
displayName: MSBuild "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt' - script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Commit Id" displayName: "Force Fail"
enabled: false
- task: CopyFiles@2 - stage: ProductionServer
displayName: 'Copy Files to: D:\Framework4.8' displayName: ProductionServer
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
- task: CopyFiles@2 pool:
displayName: 'Copy Files to: Local D EAF Deployment Storage' name: EAF Mesa Integration
inputs: demands: MET08THFTIRSTRATUS
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
- script: | variables:
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) coreVersion: "net8.0"
workingDirectory: Adaptation nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
displayName: "Core Clean - Tests"
- script: | jobs:
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration) - job: SetupEnvironment
workingDirectory: Adaptation steps:
displayName: "Core Clean - Adaptation" - script: |
echo $(Build.BuildId)
echo $(Build.Reason)
echo $(Build.Repository.Id)
echo $(Build.Repository.Name)
echo $(Build.SourceVersion)
echo $(CoreVersion)
echo $(NugetSource)
displayName: "Echo Check"
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt' - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
displayName: "Force Fail" displayName: "Nuget Clear"
enabled: false enabled: false
- script: |
"C:\program files\dotnet\dotnet.exe" user-secrets init
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
"C:\program files\dotnet\dotnet.exe" user-secrets list
workingDirectory: Adaptation
displayName: "Safe storage of app secrets - Adaptation"
- job: BuildRelease
dependsOn:
- SetupEnvironment
steps:
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
displayName: "MSBuild Restore"
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
displayName: MSBuild
- script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
displayName: "Commit Id"
- task: CopyFiles@2
displayName: 'Copy Files to: D:\EAF'
inputs:
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
workingDirectory: Adaptation
displayName: "Core Build - Adaptation"
- job: TestRelease
dependsOn:
- SetupEnvironment
- BuildRelease
steps:
- script: |
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo $(Configuration)
displayName: Configuration
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
displayName: "PowerShell Script"
continueOnError: true
- script: "dotnet test --configuration $(Configuration)"
workingDirectory: Adaptation
displayName: "Core Test"
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
displayName: "Move Results"
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
workingDirectory: Adaptation
displayName: "Tool Restore"
enabled: false
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
workingDirectory: Adaptation
displayName: "Report Generator"
enabled: false
- task: PublishTestResults@2
displayName: "Publish Test Results **/*.trx"
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- script: |
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
workingDirectory: Adaptation
displayName: "Core Clean - Adaptation"
- script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
displayName: "Force Fail"
enabled: true

View File

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.Shared.Duplicator; namespace Adaptation.Shared.Duplicator;
@ -178,4 +179,16 @@ public class Description : IDescription, Properties.IDescription
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Description))]
internal partial class SharedDescriptionSourceGenerationContext : JsonSerializerContext
{
}
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
[JsonSerializable(typeof(Description[]))]
internal partial class SharedDescriptionArraySourceGenerationContext : JsonSerializerContext
{
} }

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,9 @@ public class Logistics : ILogistics
public long Sequence => _Sequence; public long Sequence => _Sequence;
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence; public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
private static string DefaultMesEntity(DateTime dateTime) =>
string.Concat(dateTime.Ticks, "_MES_ENTITY");
public Logistics(IFileRead fileRead) public Logistics(IFileRead fileRead)
{ {
DateTime dateTime = DateTime.Now; DateTime dateTime = DateTime.Now;
@ -84,13 +87,13 @@ public class Logistics : ILogistics
_Logistics2 = new List<Logistics2>(); _Logistics2 = new List<Logistics2>();
} }
public Logistics(string reportFullPath, string logistics) internal Logistics(string reportFullPath, ProcessDataStandardFormat processDataStandardFormat)
{ {
string key; string key;
DateTime dateTime; DateTime dateTime;
string[] segments; string[] segments;
_FileInfo = new(reportFullPath); _FileInfo = new(reportFullPath);
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); _Logistics1 = processDataStandardFormat.Logistics.ToList();
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1")) if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
{ {
_NullData = null; _NullData = null;
@ -190,8 +193,6 @@ public class Logistics : ILogistics
} }
} }
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
internal void Update(string mid, string processJobID) internal void Update(string mid, string processJobID)
{ {
_MID = mid; _MID = mid;

View File

@ -6,23 +6,25 @@ public partial class WS
public class Attachment public class Attachment
{ {
public string SubGroupId { get; set; } #nullable enable
public long HeaderId { get; set; }
public string HeaderIdDirectory { get; set; }
public string UniqueId { get; set; }
public string DestinationFileName { get; set; }
public string SourceFileName { get; set; }
public string AttachmentId { get; set; }
public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName) public long HeaderId { get; set; }
public string UniqueId { get; set; }
public string SubGroupId { get; set; }
public string AttachmentId { get; set; }
public string SourceFileName { get; set; }
public string HeaderIdDirectory { get; set; }
public string DestinationFileName { get; set; }
public Attachment(Results? results, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
{ {
SubGroupId = subGroupId;
HeaderId = headerId;
HeaderIdDirectory = headerIdDirectory;
UniqueId = uniqueId; UniqueId = uniqueId;
DestinationFileName = destinationFileName;
SourceFileName = sourceFileName; SourceFileName = sourceFileName;
HeaderIdDirectory = headerIdDirectory;
DestinationFileName = destinationFileName;
AttachmentId = System.Guid.NewGuid().ToString(); AttachmentId = System.Guid.NewGuid().ToString();
HeaderId = results?.HeaderId is null ? -1 : results.HeaderId.Value;
SubGroupId = results?.SubgroupId is null ? string.Empty : results.SubgroupId.Value.ToString();
} }
} }

View File

@ -1,27 +1,75 @@
using System.Collections.Generic; using System;
using System.Collections.Generic;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization;
namespace Adaptation.Shared.Metrology; namespace Adaptation.Shared.Metrology;
public partial class WS public partial class WS
{ {
// this class represents the response from the Inbound API endpoint
public class Results public class Results
{ {
// true or false if data was written to the database
public bool Success { get; set; }
// if true, contains ID of the Header record in the database #nullable enable
public long HeaderID { get; set; }
// if false, this collection will contain a list of errors [JsonConstructor]
public List<string> Errors { get; set; } public Results(List<string>? errors,
long? headerId,
long? subgroupId,
bool? success,
List<string>? warnings)
{
Errors = errors;
Success = success;
HeaderId = headerId;
Warnings = warnings;
SubgroupId = subgroupId;
}
// this collection will contain a list of warnings, they will not prevent data from being saved [JsonPropertyName("errors")] public List<string>? Errors { get; set; }
public List<string> Warnings { get; set; } [JsonPropertyName("headerID")] public long? HeaderId { get; set; }
[JsonPropertyName("subgroupId")] public long? SubgroupId { get; set; }
[JsonPropertyName("success")] public bool? Success { get; set; }
[JsonPropertyName("warnings")] public List<string>? Warnings { get; set; }
public override string ToString()
{
string result = JsonSerializer.Serialize(this, ResultsSourceGenerationContext.Default.Results);
return result;
}
internal static Results Get(Results results, long? subgroupId) =>
new(results.Errors, results.HeaderId, subgroupId, results.Success, results.Warnings);
internal static Results Get(string resultsJson, Exception e)
{
Results results;
Exception? exception = e;
List<string> errors = new();
StringBuilder stringBuilder = new();
while (exception is not null)
{
_ = stringBuilder.AppendLine(exception.Message);
exception = exception.InnerException;
}
errors.Add(resultsJson);
errors.Add(stringBuilder.ToString());
results = new(errors: errors,
headerId: null,
subgroupId: null,
success: false,
warnings: new());
return results;
}
// this is just a helper function to make displaying the results easier
public override string ToString() => JsonSerializer.Serialize(this, GetType());
} }
}
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(WS.Results))]
internal partial class ResultsSourceGenerationContext : JsonSerializerContext
{
} }

View File

@ -10,9 +10,11 @@ namespace Adaptation.Shared.Metrology;
public partial class WS public partial class WS
{ {
#nullable enable
public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120) public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120)
{ {
Results results = new(); Results? wsResults = null;
string resultsJson = string.Empty; string resultsJson = string.Empty;
try try
{ {
@ -30,29 +32,20 @@ public partial class WS
}; };
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); wsResults = JsonSerializer.Deserialize(resultsJson, ResultsSourceGenerationContext.Default.Results);
string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}"); if (wsResults is null)
throw new NullReferenceException(nameof(wsResults));
string checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}");
if (!Directory.Exists(checkDirectory)) if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory); _ = Directory.CreateDirectory(checkDirectory);
File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json); File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json);
} }
if (!results.Success) if (wsResults.Success is null || !wsResults.Success.Value)
results.Errors.Add(results.ToString()); wsResults.Errors?.Add(wsResults.ToString());
} }
catch (Exception e) catch (Exception e)
{ { wsResults ??= Results.Get(resultsJson, e); }
Exception exception = e; return new(resultsJson, wsResults);
StringBuilder stringBuilder = new();
while (exception is not null)
{
_ = stringBuilder.AppendLine(exception.Message);
exception = exception.InnerException;
}
results.Errors ??= new List<string>();
results.Errors.Add(resultsJson);
results.Errors.Add(stringBuilder.ToString());
}
return new(resultsJson, results);
} }
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60) public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
@ -69,16 +62,20 @@ public partial class WS
} }
} }
public static void AttachFiles(string url, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null) public static void AttachFiles(string url, List<Attachment>? headerAttachments = null, List<Attachment>? dataAttachments = null)
{ {
string directory; string directory;
try try
{ {
string? directoryName;
if (headerAttachments is not null) if (headerAttachments is not null)
{ {
foreach (Attachment attachment in headerAttachments) foreach (Attachment attachment in headerAttachments)
{ {
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception(); directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory);
if (string.IsNullOrEmpty(directoryName))
continue;
directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory)) if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory); _ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
@ -88,7 +85,10 @@ public partial class WS
{ {
foreach (Attachment attachment in dataAttachments) foreach (Attachment attachment in dataAttachments)
{ {
directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception(); directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data"));
if (string.IsNullOrEmpty(directoryName))
continue;
directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory)) if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory); _ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
@ -108,7 +108,7 @@ public partial class WS
} }
catch (Exception e) catch (Exception e)
{ {
Exception exception = e; Exception? exception = e;
StringBuilder stringBuilder = new(); StringBuilder stringBuilder = new();
while (exception is not null) while (exception is not null)
{ {

View File

@ -0,0 +1 @@


File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
using System.Collections.ObjectModel;
using System.Linq;
namespace Adaptation.Shared;
public class ProcessDataStandardFormatMapping
{
public ReadOnlyCollection<int> ColumnIndices { get; private set; }
public ReadOnlyCollection<string> NewColumnNames { get; private set; }
public ReadOnlyCollection<string> OldColumnNames { get; private set; }
public ProcessDataStandardFormatMapping(ReadOnlyCollection<int> columnIndices,
ReadOnlyCollection<string> newColumnNames,
ReadOnlyCollection<string> oldColumnNames)
{
ColumnIndices = columnIndices;
NewColumnNames = newColumnNames;
OldColumnNames = oldColumnNames;
}
internal static ProcessDataStandardFormatMapping Get(string processDataStandardFormatMappingOldColumnNames, string processDataStandardFormatMappingNewColumnNames, string processDataStandardFormatMappingColumnIndices)
{
ProcessDataStandardFormatMapping result;
ReadOnlyCollection<string> newColumnNames = new(processDataStandardFormatMappingNewColumnNames.Split(','));
ReadOnlyCollection<string> oldColumnNames = new(processDataStandardFormatMappingOldColumnNames.Split(','));
ReadOnlyCollection<int> columnIndices = new(processDataStandardFormatMappingColumnIndices.Split(',').Select(int.Parse).ToArray());
result = new(columnIndices: columnIndices,
newColumnNames: newColumnNames,
oldColumnNames: oldColumnNames);
return result;
}
}

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -0,0 +1,63 @@
#if v2_58_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass]
public class BIORAD4_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD4_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__BIORAD4_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -1,4 +1,4 @@
#if v2_56_0 #if v2_58_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass] [TestClass]
public class BIORAD4 : EAFLoggingUnitTesting public class BIORAD4 : EAFLoggingUnitTesting
@ -48,9 +48,11 @@ public class BIORAD4 : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose(); EAFLoggingUnitTesting?.Dispose();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt() public void Production__v2_58_0__BIORAD4__txt()
{ {
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -59,9 +61,11 @@ public class BIORAD4 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus() public void Production__v2_58_0__BIORAD4__Stratus()
{ {
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -70,9 +74,11 @@ public class BIORAD4 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__QS408M() public void Production__v2_58_0__BIORAD4__QS408M()
{ {
string check = "DetailDataBioRad_*.txt"; string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -0,0 +1,63 @@
#if v2_58_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass]
public class BIORAD5_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__BIORAD5_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -1,4 +1,4 @@
#if v2_56_0 #if v2_58_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass] [TestClass]
public class BIORAD5 : EAFLoggingUnitTesting public class BIORAD5 : EAFLoggingUnitTesting
@ -48,9 +48,11 @@ public class BIORAD5 : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose(); EAFLoggingUnitTesting?.Dispose();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__txt() public void Production__v2_58_0__BIORAD5__txt()
{ {
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -59,9 +61,11 @@ public class BIORAD5 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__Stratus() public void Production__v2_58_0__BIORAD5__Stratus()
{ {
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -70,9 +74,11 @@ public class BIORAD5 : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__QS408M() public void Production__v2_58_0__BIORAD5__QS408M()
{ {
string check = "DetailDataBioRad_*.txt"; string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -1,4 +1,4 @@
#if v2_56_0 #if v2_58_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_58_0;
[TestClass] [TestClass]
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
@ -48,9 +48,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting?.Dispose(); EAFLoggingUnitTesting?.Dispose();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__MoveMatchingFiles() public void Production__v2_58_0__MET08THFTIRSTRATUS__MoveMatchingFiles()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -59,9 +61,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -70,9 +74,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__IQSSi() public void Production__v2_58_0__MET08THFTIRSTRATUS__IQSSi()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -81,9 +87,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__OpenInsight() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -92,9 +100,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -103,9 +113,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__APC() public void Production__v2_58_0__MET08THFTIRSTRATUS__APC()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -114,9 +126,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__SPaCe() public void Production__v2_58_0__MET08THFTIRSTRATUS__SPaCe()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -125,9 +139,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__Processed() public void Production__v2_58_0__MET08THFTIRSTRATUS__Processed()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -136,9 +152,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__Archive() public void Production__v2_58_0__MET08THFTIRSTRATUS__Archive()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -147,9 +165,11 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__MET08THFTIRSTRATUS__Dummy() public void Production__v2_58_0__MET08THFTIRSTRATUS__Dummy()
{ {
string check = "637738592809956919.zip"; string check = "637738592809956919.zip";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -0,0 +1,63 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class BIORAD4_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD4_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__BIORAD4_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,93 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class BIORAD4 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4 EAFLoggingUnitTesting { get; private set; }
static BIORAD4() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__txt()
{
string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__Stratus()
{
string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__QS408M()
{
string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
Assert.IsTrue(fileNameAndJson[1].Contains(check));
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,63 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class BIORAD5_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__BIORAD5_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,93 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class BIORAD5 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5 EAFLoggingUnitTesting { get; private set; }
static BIORAD5() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__txt()
{
string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__Stratus()
{
string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__QS408M()
{
string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
Assert.IsTrue(fileNameAndJson[1].Contains(check));
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,182 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; }
static MET08THFTIRSTRATUS() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MET08THFTIRSTRATUS() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public MET08THFTIRSTRATUS(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Dummy()
{
string check = "637738592809956919.zip";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,63 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
[TestClass]
public class BIORAD4_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD4_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_60_0__BIORAD4_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,93 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
[TestClass]
public class BIORAD4 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4 EAFLoggingUnitTesting { get; private set; }
static BIORAD4() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt()
{
string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus()
{
string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__QS408M()
{
string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
Assert.IsTrue(fileNameAndJson[1].Contains(check));
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,63 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
[TestClass]
public class BIORAD5_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_60_0__BIORAD5_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,93 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
[TestClass]
public class BIORAD5 : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5 EAFLoggingUnitTesting { get; private set; }
static BIORAD5() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__txt()
{
string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__Stratus()
{
string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__QS408M()
{
string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);
Assert.IsTrue(fileNameAndJson[1].Contains(check));
File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,182 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_60_0;
[TestClass]
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; }
static MET08THFTIRSTRATUS() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MET08THFTIRSTRATUS() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public MET08THFTIRSTRATUS(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Dummy()
{
string check = "637738592809956919.zip";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -0,0 +1,63 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_61_1;
[TestClass]
public class BIORAD4_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD4_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD4_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD4_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD4_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD4_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_61_1__BIORAD4_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_61_1;
[TestClass] [TestClass]
public class BIORAD4 : EAFLoggingUnitTesting public class BIORAD4 : EAFLoggingUnitTesting
@ -52,7 +52,7 @@ public class BIORAD4 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt() public void Production__v2_61_1__BIORAD4__txt()
{ {
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -65,7 +65,7 @@ public class BIORAD4 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus() public void Production__v2_61_1__BIORAD4__Stratus()
{ {
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -78,7 +78,7 @@ public class BIORAD4 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__QS408M() public void Production__v2_61_1__BIORAD4__QS408M()
{ {
string check = "DetailDataBioRad_*.txt"; string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -0,0 +1,63 @@
#if true
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_61_1;
[TestClass]
public class BIORAD5_EQPT : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static BIORAD5_EQPT EAFLoggingUnitTesting { get; private set; }
static BIORAD5_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BIORAD5_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public BIORAD5_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new BIORAD5_EQPT(testContext);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
}
[ClassCleanup()]
public static void ClassCleanup()
{
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
EAFLoggingUnitTesting?.Dispose();
}
[Ignore]
[TestMethod]
public void Production__v2_61_1__BIORAD5_EQPT__DownloadTXTFile()
{
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
}
#endif

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_61_1;
[TestClass] [TestClass]
public class BIORAD5 : EAFLoggingUnitTesting public class BIORAD5 : EAFLoggingUnitTesting
@ -52,7 +52,7 @@ public class BIORAD5 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__txt() public void Production__v2_61_1__BIORAD5__txt()
{ {
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -65,7 +65,7 @@ public class BIORAD5 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__Stratus() public void Production__v2_61_1__BIORAD5__Stratus()
{ {
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -78,7 +78,7 @@ public class BIORAD5 : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__QS408M() public void Production__v2_61_1__BIORAD5__QS408M()
{ {
string check = "DetailDataBioRad_*.txt"; string check = "DetailDataBioRad_*.txt";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; namespace Adaptation._Tests.CreateSelfDescription.Production.v2_61_1;
[TestClass] [TestClass]
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
@ -52,7 +52,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__MoveMatchingFiles() public void Production__v2_61_1__MET08THFTIRSTRATUS__MoveMatchingFiles()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -65,7 +65,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -78,7 +78,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__IQSSi() public void Production__v2_61_1__MET08THFTIRSTRATUS__IQSSi()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -91,7 +91,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight() public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -104,7 +104,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -117,7 +117,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__APC() public void Production__v2_61_1__MET08THFTIRSTRATUS__APC()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -130,7 +130,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__SPaCe() public void Production__v2_61_1__MET08THFTIRSTRATUS__SPaCe()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -143,7 +143,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Processed() public void Production__v2_61_1__MET08THFTIRSTRATUS__Processed()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -156,7 +156,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Archive() public void Production__v2_61_1__MET08THFTIRSTRATUS__Archive()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
@ -169,7 +169,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Dummy() public void Production__v2_61_1__MET08THFTIRSTRATUS__Dummy()
{ {
string check = "637738592809956919.zip"; string check = "637738592809956919.zip";
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -191,5 +191,37 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__BIORAD4__Stratus638613924531133783__14()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_57_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__BIORAD4__Stratus638675062726795419__T()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_57_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
} }
#endif #endif

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_57_0; namespace Adaptation._Tests.Extract.Production.v2_57_0;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@ -1,4 +1,4 @@
#if true #if v2_57_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;

View File

@ -0,0 +1,44 @@
#if v2_58_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass]
public class BIORAD4_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_58_0.BIORAD4_EQPT _BIORAD4_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_58_0.BIORAD4_EQPT.ClassInitialize(testContext);
_BIORAD4_EQPT = CreateSelfDescription.Production.v2_58_0.BIORAD4_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__BIORAD4_EQPT__DownloadTXTFile() => _BIORAD4_EQPT.Production__v2_58_0__BIORAD4_EQPT__DownloadTXTFile();
[Ignore]
[TestMethod]
public void Production__v2_58_0__BIORAD4_EQPT__DownloadTXTFile638574038162800870__First()
{
bool validatePDSF = false;
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
_BIORAD4_EQPT.Production__v2_58_0__BIORAD4_EQPT__DownloadTXTFile();
string[] variables = _BIORAD4_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
_ = _BIORAD4_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < short.MaxValue; i++)
Thread.Sleep(500);
}
}
#endif

View File

@ -1,4 +1,4 @@
#if true #if v2_58_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +6,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_57_0; namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass] [TestClass]
public class BIORAD4 public class BIORAD4
@ -15,30 +15,30 @@ public class BIORAD4
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_57_0.BIORAD4 _BIORAD4; private static CreateSelfDescription.Production.v2_58_0.BIORAD4 _BIORAD4;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_57_0.BIORAD4.ClassInitialize(testContext); CreateSelfDescription.Production.v2_58_0.BIORAD4.ClassInitialize(testContext);
_BIORAD4 = CreateSelfDescription.Staging.v2_57_0.BIORAD4.EAFLoggingUnitTesting; _BIORAD4 = CreateSelfDescription.Production.v2_58_0.BIORAD4.EAFLoggingUnitTesting;
} }
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt() => _BIORAD4.Staging__v2_57_0__BIORAD4__txt(); public void Production__v2_58_0__BIORAD4__txt() => _BIORAD4.Production__v2_58_0__BIORAD4__txt();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt637730081979221342__Normal() public void Production__v2_58_0__BIORAD4__txt637730081979221342__Normal()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__txt(); _BIORAD4.Production__v2_58_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -50,11 +50,11 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt637818036815840307__ProcessFailed() public void Production__v2_58_0__BIORAD4__txt637818036815840307__ProcessFailed()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__txt(); _BIORAD4.Production__v2_58_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -66,11 +66,11 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt637746296480404920__Failure() public void Production__v2_58_0__BIORAD4__txt637746296480404920__Failure()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__txt(); _BIORAD4.Production__v2_58_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -82,11 +82,11 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__txt638187028378748930__THigh() public void Production__v2_58_0__BIORAD4__txt638187028378748930__THigh()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__txt(); _BIORAD4.Production__v2_58_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -98,17 +98,17 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus() => _BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); public void Production__v2_58_0__BIORAD4__Stratus() => _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus637730081979221342__RDS() public void Production__v2_58_0__BIORAD4__Stratus637730081979221342__RDS()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -120,11 +120,11 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus637730081979221342__1TRDS() public void Production__v2_58_0__BIORAD4__Stratus637730081979221342__1TRDS()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -136,12 +136,12 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS() public void Production__v2_58_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -157,11 +157,11 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus637818036815840307__ProcessFailed() public void Production__v2_58_0__BIORAD4__Stratus637818036815840307__ProcessFailed()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -173,17 +173,49 @@ public class BIORAD4
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__QS408M() => _BIORAD4.Staging__v2_57_0__BIORAD4__QS408M(); public void Production__v2_58_0__BIORAD4__QS408M() => _BIORAD4.Production__v2_58_0__BIORAD4__QS408M();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD4__Stratus638010209430211312__MissingRecipe() public void Production__v2_58_0__BIORAD4__Stratus638010209430211312__MissingRecipe()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_57_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__BIORAD4__Stratus638613924531133783__14()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_58_0__BIORAD4__Stratus638675062726795419__T()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_58_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);

View File

@ -0,0 +1,27 @@
#if v2_58_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass]
public class BIORAD5_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_58_0.BIORAD5_EQPT _BIORAD5_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_58_0.BIORAD5_EQPT.ClassInitialize(testContext);
_BIORAD5_EQPT = CreateSelfDescription.Production.v2_58_0.BIORAD5_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_58_0__BIORAD5_EQPT__DownloadTXTFile() => _BIORAD5_EQPT.Production__v2_58_0__BIORAD5_EQPT__DownloadTXTFile();
}
#endif

View File

@ -1,4 +1,4 @@
#if true #if v2_58_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +6,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_57_0; namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass] [TestClass]
public class BIORAD5 public class BIORAD5
@ -15,13 +15,13 @@ public class BIORAD5
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_57_0.BIORAD5 _BIORAD5; private static CreateSelfDescription.Production.v2_58_0.BIORAD5 _BIORAD5;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_57_0.BIORAD5.ClassInitialize(testContext); CreateSelfDescription.Production.v2_58_0.BIORAD5.ClassInitialize(testContext);
_BIORAD5 = CreateSelfDescription.Staging.v2_57_0.BIORAD5.EAFLoggingUnitTesting; _BIORAD5 = CreateSelfDescription.Production.v2_58_0.BIORAD5.EAFLoggingUnitTesting;
} }
private static void NonThrowTryCatch() private static void NonThrowTryCatch()
@ -35,17 +35,17 @@ public class BIORAD5
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__txt() => _BIORAD5.Staging__v2_57_0__BIORAD5__txt(); public void Production__v2_58_0__BIORAD5__txt() => _BIORAD5.Production__v2_58_0__BIORAD5__txt();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__txt638221788953480284__MorePoints() public void Production__v2_58_0__BIORAD5__txt638221788953480284__MorePoints()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD5.Staging__v2_57_0__BIORAD5__txt(); _BIORAD5.Production__v2_58_0__BIORAD5__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -58,18 +58,18 @@ public class BIORAD5
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__Stratus() => _BIORAD5.Staging__v2_57_0__BIORAD5__Stratus(); public void Production__v2_58_0__BIORAD5__Stratus() => _BIORAD5.Production__v2_58_0__BIORAD5__Stratus();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS() public void Production__v2_58_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Staging__v2_57_0__BIORAD5__Stratus(); _BIORAD5.Production__v2_58_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -86,12 +86,12 @@ public class BIORAD5
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__Stratus637805172599370243__Why() public void Production__v2_58_0__BIORAD5__Stratus637805172599370243__Why()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Staging__v2_57_0__BIORAD5__Stratus(); _BIORAD5.Production__v2_58_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -108,7 +108,7 @@ public class BIORAD5
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__BIORAD5__QS408M() => _BIORAD5.Staging__v2_57_0__BIORAD5__QS408M(); public void Production__v2_58_0__BIORAD5__QS408M() => _BIORAD5.Production__v2_58_0__BIORAD5__QS408M();
} }
#endif #endif

View File

@ -1,4 +1,4 @@
#if true #if v2_58_0
using Adaptation._Tests.Shared; using Adaptation._Tests.Shared;
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
@ -6,7 +6,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_57_0; namespace Adaptation._Tests.Extract.Production.v2_58_0;
[TestClass] [TestClass]
public class MET08THFTIRSTRATUS public class MET08THFTIRSTRATUS
@ -15,47 +15,47 @@ public class MET08THFTIRSTRATUS
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_57_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS; private static CreateSelfDescription.Production.v2_58_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_57_0.MET08THFTIRSTRATUS.ClassInitialize(testContext); CreateSelfDescription.Production.v2_58_0.MET08THFTIRSTRATUS.ClassInitialize(testContext);
_MET08THFTIRSTRATUS = CreateSelfDescription.Staging.v2_57_0.MET08THFTIRSTRATUS.EAFLoggingUnitTesting; _MET08THFTIRSTRATUS = CreateSelfDescription.Production.v2_58_0.MET08THFTIRSTRATUS.EAFLoggingUnitTesting;
} }
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__MoveMatchingFiles(); public void Production__v2_58_0__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__MoveMatchingFiles();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer(); public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__IQSSi(); public void Production__v2_58_0__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__IQSSi();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight(); public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
_MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight(); _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod(); MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
@ -66,10 +66,10 @@ public class MET08THFTIRSTRATUS
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
_MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight(); _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod(); MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
@ -80,12 +80,12 @@ public class MET08THFTIRSTRATUS
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
bool validatePDSF = false; bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsight(); _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsight();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead); Logistics logistics = new(fileRead);
@ -96,18 +96,18 @@ public class MET08THFTIRSTRATUS
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments(); public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal() public void Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal()
{ {
string check = "*.pdsf"; string check = "*.pdsf";
bool validatePDSF = false; bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments(); _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead); Logistics logistics = new(fileRead);
@ -118,31 +118,31 @@ public class MET08THFTIRSTRATUS
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__APC(); public void Production__v2_58_0__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__APC();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__SPaCe(); public void Production__v2_58_0__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__SPaCe();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__Processed(); public void Production__v2_58_0__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__Processed();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__Archive(); public void Production__v2_58_0__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__Archive();
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif
[TestMethod] [TestMethod]
public void Staging__v2_57_0__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Staging__v2_57_0__MET08THFTIRSTRATUS__Dummy(); public void Production__v2_58_0__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Production__v2_58_0__MET08THFTIRSTRATUS__Dummy();
} }
#endif #endif

View File

@ -0,0 +1,44 @@
#if v2_59_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class BIORAD4_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.BIORAD4_EQPT _BIORAD4_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.BIORAD4_EQPT.ClassInitialize(testContext);
_BIORAD4_EQPT = CreateSelfDescription.Production.v2_59_0.BIORAD4_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__BIORAD4_EQPT__DownloadTXTFile() => _BIORAD4_EQPT.Production__v2_59_0__BIORAD4_EQPT__DownloadTXTFile();
[Ignore]
[TestMethod]
public void Production__v2_59_0__BIORAD4_EQPT__DownloadTXTFile638574038162800870__First()
{
bool validatePDSF = false;
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
_BIORAD4_EQPT.Production__v2_59_0__BIORAD4_EQPT__DownloadTXTFile();
string[] variables = _BIORAD4_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
_ = _BIORAD4_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < short.MaxValue; i++)
Thread.Sleep(500);
}
}
#endif

View File

@ -1,4 +1,4 @@
#if v2_56_0 #if v2_59_0
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +6,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_56_0; namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass] [TestClass]
public class BIORAD4 public class BIORAD4
@ -15,26 +15,30 @@ public class BIORAD4
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.BIORAD4 _BIORAD4; private static CreateSelfDescription.Production.v2_59_0.BIORAD4 _BIORAD4;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_56_0.BIORAD4.ClassInitialize(testContext); CreateSelfDescription.Production.v2_59_0.BIORAD4.ClassInitialize(testContext);
_BIORAD4 = CreateSelfDescription.Staging.v2_56_0.BIORAD4.EAFLoggingUnitTesting; _BIORAD4 = CreateSelfDescription.Production.v2_59_0.BIORAD4.EAFLoggingUnitTesting;
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt() => _BIORAD4.Staging__v2_56_0__BIORAD4__txt(); public void Production__v2_59_0__BIORAD4__txt() => _BIORAD4.Production__v2_59_0__BIORAD4__txt();
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt637730081979221342__Normal() public void Production__v2_59_0__BIORAD4__txt638763379187800166__Partial()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__txt(); _BIORAD4.Production__v2_59_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -42,13 +46,15 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt637818036815840307__ProcessFailed() public void Production__v2_59_0__BIORAD4__txt637730081979221342__Normal()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__txt(); _BIORAD4.Production__v2_59_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -56,13 +62,15 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt637746296480404920__Failure() public void Production__v2_59_0__BIORAD4__txt637818036815840307__ProcessFailed()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__txt(); _BIORAD4.Production__v2_59_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -70,13 +78,15 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__txt638187028378748930__THigh() public void Production__v2_59_0__BIORAD4__txt637746296480404920__Failure()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__txt(); _BIORAD4.Production__v2_59_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -84,17 +94,37 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus() => _BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); public void Production__v2_59_0__BIORAD4__txt638187028378748930__THigh()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_59_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus637730081979221342__RDS() public void Production__v2_59_0__BIORAD4__Stratus() => _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__Stratus637730081979221342__RDS()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -102,13 +132,15 @@ public class BIORAD4
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus637730081979221342__1TRDS() public void Production__v2_59_0__BIORAD4__Stratus637730081979221342__1TRDS()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -116,32 +148,36 @@ public class BIORAD4
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS() public void Production__v2_59_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead); Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus637818036815840307__ProcessFailed() public void Production__v2_59_0__BIORAD4__Stratus637818036815840307__ProcessFailed()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -149,17 +185,53 @@ public class BIORAD4
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__QS408M() => _BIORAD4.Staging__v2_56_0__BIORAD4__QS408M(); public void Production__v2_59_0__BIORAD4__QS408M() => _BIORAD4.Production__v2_59_0__BIORAD4__QS408M();
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD4__Stratus638010209430211312__MissingRecipe() public void Production__v2_59_0__BIORAD4__Stratus638010209430211312__MissingRecipe()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Staging__v2_56_0__BIORAD4__Stratus(); _BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__Stratus638613924531133783__14()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD4__Stratus638675062726795419__T()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_59_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);

View File

@ -0,0 +1,27 @@
#if v2_59_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class BIORAD5_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.BIORAD5_EQPT _BIORAD5_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.BIORAD5_EQPT.ClassInitialize(testContext);
_BIORAD5_EQPT = CreateSelfDescription.Production.v2_59_0.BIORAD5_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_59_0__BIORAD5_EQPT__DownloadTXTFile() => _BIORAD5_EQPT.Production__v2_59_0__BIORAD5_EQPT__DownloadTXTFile();
}
#endif

View File

@ -0,0 +1,114 @@
#if v2_59_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class BIORAD5
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.BIORAD5 _BIORAD5;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.BIORAD5.ClassInitialize(testContext);
_BIORAD5 = CreateSelfDescription.Production.v2_59_0.BIORAD5.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__txt() => _BIORAD5.Production__v2_59_0__BIORAD5__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__txt638221788953480284__MorePoints()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD5.Production__v2_59_0__BIORAD5__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__Stratus() => _BIORAD5.Production__v2_59_0__BIORAD5__Stratus();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Production__v2_59_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__Stratus637805172599370243__Why()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Production__v2_59_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__BIORAD5__QS408M() => _BIORAD5.Production__v2_59_0__BIORAD5__QS408M();
}
#endif

View File

@ -0,0 +1,162 @@
#if v2_59_0
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class MET08THFTIRSTRATUS
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_59_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_59_0.MET08THFTIRSTRATUS.ClassInitialize(testContext);
_MET08THFTIRSTRATUS = CreateSelfDescription.Production.v2_59_0.MET08THFTIRSTRATUS.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__MoveMatchingFiles638014829236768048__Normal()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__MoveMatchingFiles();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsight();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_59_0__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Production__v2_59_0__MET08THFTIRSTRATUS__Dummy();
}
#endif

View File

@ -0,0 +1,44 @@
#if v2_60_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Production.v2_60_0;
[TestClass]
public class BIORAD4_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_60_0.BIORAD4_EQPT _BIORAD4_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_60_0.BIORAD4_EQPT.ClassInitialize(testContext);
_BIORAD4_EQPT = CreateSelfDescription.Production.v2_60_0.BIORAD4_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_60_0__BIORAD4_EQPT__DownloadTXTFile() => _BIORAD4_EQPT.Production__v2_60_0__BIORAD4_EQPT__DownloadTXTFile();
[Ignore]
[TestMethod]
public void Production__v2_60_0__BIORAD4_EQPT__DownloadTXTFile638574038162800870__First()
{
bool validatePDSF = false;
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
_BIORAD4_EQPT.Production__v2_60_0__BIORAD4_EQPT__DownloadTXTFile();
string[] variables = _BIORAD4_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
_ = _BIORAD4_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < short.MaxValue; i++)
Thread.Sleep(500);
}
}
#endif

View File

@ -0,0 +1,243 @@
#if v2_60_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_60_0;
[TestClass]
public class BIORAD4
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_60_0.BIORAD4 _BIORAD4;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_60_0.BIORAD4.ClassInitialize(testContext);
_BIORAD4 = CreateSelfDescription.Production.v2_60_0.BIORAD4.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt() => _BIORAD4.Production__v2_60_0__BIORAD4__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt638763379187800166__Partial()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt637730081979221342__Normal()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt637818036815840307__ProcessFailed()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt637746296480404920__Failure()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__txt638187028378748930__THigh()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus() => _BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus637730081979221342__RDS()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus637730081979221342__1TRDS()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus637733400573863329__ReactorAndRDS()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus637818036815840307__ProcessFailed()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__QS408M() => _BIORAD4.Production__v2_60_0__BIORAD4__QS408M();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus638010209430211312__MissingRecipe()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus638613924531133783__14()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD4__Stratus638675062726795419__T()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_60_0__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
}
#endif

View File

@ -0,0 +1,27 @@
#if v2_60_0
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_60_0;
[TestClass]
public class BIORAD5_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_60_0.BIORAD5_EQPT _BIORAD5_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_60_0.BIORAD5_EQPT.ClassInitialize(testContext);
_BIORAD5_EQPT = CreateSelfDescription.Production.v2_60_0.BIORAD5_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_60_0__BIORAD5_EQPT__DownloadTXTFile() => _BIORAD5_EQPT.Production__v2_60_0__BIORAD5_EQPT__DownloadTXTFile();
}
#endif

View File

@ -0,0 +1,114 @@
#if v2_60_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_60_0;
[TestClass]
public class BIORAD5
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_60_0.BIORAD5 _BIORAD5;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_60_0.BIORAD5.ClassInitialize(testContext);
_BIORAD5 = CreateSelfDescription.Production.v2_60_0.BIORAD5.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__txt() => _BIORAD5.Production__v2_60_0__BIORAD5__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__txt638221788953480284__MorePoints()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD5.Production__v2_60_0__BIORAD5__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__Stratus() => _BIORAD5.Production__v2_60_0__BIORAD5__Stratus();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Production__v2_60_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__Stratus637805172599370243__Why()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Production__v2_60_0__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD5__QS408M() => _BIORAD5.Production__v2_60_0__BIORAD5__QS408M();
}
#endif

View File

@ -0,0 +1,164 @@
#if v2_60_0
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_60_0;
[TestClass]
public class MET08THFTIRSTRATUS
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_60_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_60_0.MET08THFTIRSTRATUS.ClassInitialize(testContext);
_MET08THFTIRSTRATUS = CreateSelfDescription.Production.v2_60_0.MET08THFTIRSTRATUS.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__MoveMatchingFiles638918243047505986__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__MoveMatchingFiles();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsight();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Production__v2_60_0__MET08THFTIRSTRATUS__Dummy();
}
#endif

View File

@ -0,0 +1,44 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass]
public class BIORAD4_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_61_1.BIORAD4_EQPT _BIORAD4_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_61_1.BIORAD4_EQPT.ClassInitialize(testContext);
_BIORAD4_EQPT = CreateSelfDescription.Production.v2_61_1.BIORAD4_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_61_1__BIORAD4_EQPT__DownloadTXTFile() => _BIORAD4_EQPT.Production__v2_61_1__BIORAD4_EQPT__DownloadTXTFile();
[Ignore]
[TestMethod]
public void Production__v2_61_1__BIORAD4_EQPT__DownloadTXTFile638574038162800870__First()
{
bool validatePDSF = false;
string check = "DataBioRad.txt";
MethodBase methodBase = new StackFrame().GetMethod();
_BIORAD4_EQPT.Production__v2_61_1__BIORAD4_EQPT__DownloadTXTFile();
string[] variables = _BIORAD4_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
_ = _BIORAD4_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
for (int i = 0; i < short.MaxValue; i++)
Thread.Sleep(500);
}
}
#endif

View File

@ -0,0 +1,259 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass]
public class BIORAD4
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_61_1.BIORAD4 _BIORAD4;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_61_1.BIORAD4.ClassInitialize(testContext);
_BIORAD4 = CreateSelfDescription.Production.v2_61_1.BIORAD4.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt() => _BIORAD4.Production__v2_61_1__BIORAD4__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt638763379187800166__Partial()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt637730081979221342__Normal()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt637818036815840307__ProcessFailed()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt637746296480404920__Failure()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__txt638187028378748930__THigh()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus() => _BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus637730081979221342__RDS()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus637730081979221342__1TRDS()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus637733400573863329__ReactorAndRDS()
{
DateTime dateTime;
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus637818036815840307__ProcessFailed()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__QS408M() => _BIORAD4.Production__v2_61_1__BIORAD4__QS408M();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus638010209430211312__MissingRecipe()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus638613924531133783__14()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus638675062726795419__T()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__BIORAD4__Stratus638960114557838333__Zero()
{
bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt";
_BIORAD4.Production__v2_61_1__BIORAD4__Stratus();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
}
#endif

View File

@ -0,0 +1,27 @@
#if true
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass]
public class BIORAD5_EQPT
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_61_1.BIORAD5_EQPT _BIORAD5_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_61_1.BIORAD5_EQPT.ClassInitialize(testContext);
_BIORAD5_EQPT = CreateSelfDescription.Production.v2_61_1.BIORAD5_EQPT.EAFLoggingUnitTesting;
}
[Ignore]
[TestMethod]
public void Production__v2_61_1__BIORAD5_EQPT__DownloadTXTFile() => _BIORAD5_EQPT.Production__v2_61_1__BIORAD5_EQPT__DownloadTXTFile();
}
#endif

View File

@ -1,4 +1,4 @@
#if v2_56_0 #if true
using Adaptation.Shared; using Adaptation.Shared;
using Adaptation.Shared.Methods; using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -6,7 +6,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
namespace Adaptation._Tests.Extract.Staging.v2_56_0; namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass] [TestClass]
public class BIORAD5 public class BIORAD5
@ -15,13 +15,13 @@ public class BIORAD5
#pragma warning disable CA2254 #pragma warning disable CA2254
#pragma warning disable IDE0060 #pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_56_0.BIORAD5 _BIORAD5; private static CreateSelfDescription.Production.v2_61_1.BIORAD5 _BIORAD5;
[ClassInitialize] [ClassInitialize]
public static void ClassInitialize(TestContext testContext) public static void ClassInitialize(TestContext testContext)
{ {
CreateSelfDescription.Staging.v2_56_0.BIORAD5.ClassInitialize(testContext); CreateSelfDescription.Production.v2_61_1.BIORAD5.ClassInitialize(testContext);
_BIORAD5 = CreateSelfDescription.Staging.v2_56_0.BIORAD5.EAFLoggingUnitTesting; _BIORAD5 = CreateSelfDescription.Production.v2_61_1.BIORAD5.EAFLoggingUnitTesting;
} }
private static void NonThrowTryCatch() private static void NonThrowTryCatch()
@ -31,17 +31,21 @@ public class BIORAD5
catch (Exception) { } catch (Exception) { }
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__txt() => _BIORAD5.Staging__v2_56_0__BIORAD5__txt(); public void Production__v2_61_1__BIORAD5__txt() => _BIORAD5.Production__v2_61_1__BIORAD5__txt();
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__txt638221788953480284__MorePoints() public void Production__v2_61_1__BIORAD5__txt638221788953480284__MorePoints()
{ {
bool validatePDSF = false; bool validatePDSF = false;
string check = "*DataBioRad.txt"; string check = "*DataBioRad.txt";
_BIORAD5.Staging__v2_56_0__BIORAD5__txt(); _BIORAD5.Production__v2_61_1__BIORAD5__txt();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
@ -50,53 +54,61 @@ public class BIORAD5
NonThrowTryCatch(); NonThrowTryCatch();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__Stratus() => _BIORAD5.Staging__v2_56_0__BIORAD5__Stratus(); public void Production__v2_61_1__BIORAD5__Stratus() => _BIORAD5.Production__v2_61_1__BIORAD5__Stratus();
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__Stratus637738592809956919__ReactorAndRDS() public void Production__v2_61_1__BIORAD5__Stratus637738592809956919__ReactorAndRDS()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Staging__v2_56_0__BIORAD5__Stratus(); _BIORAD5.Production__v2_61_1__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead); Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch(); NonThrowTryCatch();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__Stratus637805172599370243__Why() public void Production__v2_61_1__BIORAD5__Stratus637805172599370243__Why()
{ {
DateTime dateTime; DateTime dateTime;
bool validatePDSF = false; bool validatePDSF = false;
string check = "CassetteDataBioRad_*.txt"; string check = "CassetteDataBioRad_*.txt";
_BIORAD5.Staging__v2_56_0__BIORAD5__Stratus(); _BIORAD5.Production__v2_61_1__BIORAD5__Stratus();
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead); Logistics logistics = new(fileRead);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty);
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39");
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
NonThrowTryCatch(); NonThrowTryCatch();
} }
#if DEBUG
[Ignore] [Ignore]
#endif
[TestMethod] [TestMethod]
public void Staging__v2_56_0__BIORAD5__QS408M() => _BIORAD5.Staging__v2_56_0__BIORAD5__QS408M(); public void Production__v2_61_1__BIORAD5__QS408M() => _BIORAD5.Production__v2_61_1__BIORAD5__QS408M();
} }
#endif #endif

View File

@ -0,0 +1,162 @@
#if true
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Diagnostics;
using System.Reflection;
namespace Adaptation._Tests.Extract.Production.v2_61_1;
[TestClass]
public class MET08THFTIRSTRATUS
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_61_1.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_61_1.MET08THFTIRSTRATUS.ClassInitialize(testContext);
_MET08THFTIRSTRATUS = CreateSelfDescription.Production.v2_61_1.MET08THFTIRSTRATUS.EAFLoggingUnitTesting;
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__MoveMatchingFiles();
[Ignore]
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__MoveMatchingFiles638918243047505986__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__MoveMatchingFiles();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO()
{
string check = "*.pdsf";
_MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight();
MethodBase method = new StackFrame().GetMethod();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check);
_ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract();
AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsight();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments638131299562362655__Normal()
{
string check = "*.pdsf";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments();
string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_61_1__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Production__v2_61_1__MET08THFTIRSTRATUS__Dummy();
}
#endif

View File

@ -41,7 +41,7 @@ public class BIORAD4
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check);
_ = Shared.AdaptationTesting.GetLogisticsColumnsAndBody(variables[2], variables[4]); _ = Shared.AdaptationTesting.GetProcessData(variables[2], variables[4]);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract(); _ = fileRead.ReExtract();
@ -59,7 +59,7 @@ public class BIORAD4
MethodBase methodBase = new StackFrame().GetMethod(); MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check);
_ = Shared.AdaptationTesting.GetLogisticsColumnsAndBody(variables[2], variables[4]); _ = Shared.AdaptationTesting.GetProcessData(variables[2], variables[4]);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract(); _ = fileRead.ReExtract();

Some files were not shown because too many files have changed in this diff Show More