From 6a63632bc7424147f63c9d033f3ead39656758da Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Wed, 30 Nov 2022 12:49:52 -0700 Subject: [PATCH] v2.47.0 - Read to test IQS query - better date --- Adaptation/.editorconfig | 4 +- Adaptation/FileHandlers/APC/FileRead.cs | 8 +- Adaptation/FileHandlers/IQSSi/FileRead.cs | 14 +- .../FileHandlers/OpenInsight/FileRead.cs | 19 +- .../FileHandlers/OpenInsight/FromIQS.cs | 104 ++++++++++ Adaptation/FileHandlers/SPaCe/FileRead.cs | 8 +- Adaptation/FileHandlers/pcl/Description.cs | 4 +- Adaptation/FileHandlers/pcl/FileRead.cs | 4 +- Adaptation/FileHandlers/pcl/ProcessData.cs | 9 +- Adaptation/MET08DDUPSFS6420.Tests.csproj | 12 +- Adaptation/Shared/Duplicator/Description.cs | 3 + Adaptation/Shared/FileRead.cs | 48 +++-- Adaptation/Shared/Logistics.cs | 4 +- Adaptation/Shared/Metrology/ScopeInfo.cs | 2 +- Adaptation/Shared/Metrology/WS.cs | 3 +- .../Shared/ProcessDataStandardFormat.cs | 9 +- Adaptation/Shared/Properties/IDescription.cs | 1 + .../Staging/v2.36.3/TENCOR1.cs | 9 +- .../Staging/v2.39.0/MET08DDUPSFS6420.cs | 9 +- .../Staging/v2.39.0/TENCOR1.cs | 9 +- .../Staging/v2.39.0/TENCOR2.cs | 9 +- .../Staging/v2.39.0/TENCOR3-EQPT.cs | 9 +- .../Staging/v2.39.0/TENCOR3.cs | 9 +- .../Staging/v2.43.0/MET08DDUPSFS6420.cs | 9 +- .../Staging/v2.43.4/MET08DDUPSFS6420.cs | 9 +- .../Staging/v2.43.4/TENCOR1.cs | 9 +- .../Staging/v2.43.4/TENCOR2.cs | 9 +- .../Staging/v2.43.4/TENCOR3.cs | 9 +- .../Staging/v2.47.1/MET08DDUPSFS6420.cs | 180 ++++++++++++++++++ .../Staging/v2.47.1/TENCOR1.cs | 63 ++++++ .../Staging/v2.47.1/TENCOR2.cs | 63 ++++++ .../Staging/v2.47.1/TENCOR3.cs | 63 ++++++ .../_Tests/Extract/Staging/v2.43.4/TENCOR1.cs | 3 + .../_Tests/Extract/Staging/v2.43.4/TENCOR2.cs | 3 + .../_Tests/Extract/Staging/v2.43.4/TENCOR3.cs | 3 + .../Staging/v2.47.1/MET08DDUPSFS6420.cs | 115 +++++++++++ .../_Tests/Extract/Staging/v2.47.1/TENCOR1.cs | 49 +++++ .../_Tests/Extract/Staging/v2.47.1/TENCOR2.cs | 49 +++++ .../_Tests/Extract/Staging/v2.47.1/TENCOR3.cs | 49 +++++ Adaptation/_Tests/Shared/AdaptationTesting.cs | 12 +- Adaptation/_Tests/Shared/UnitTesting.cs | 3 +- Adaptation/_Tests/Static/pcl.cs | 19 +- Adaptation/appsettings.Development.json | 12 +- Adaptation/appsettings.json | 12 +- Adaptation/package.json | 33 ++-- MET08DDUPSFS6420.csproj | 1 + Properties/AssemblyInfo.cs | 4 +- Shared/Logistics.cs | 4 +- 48 files changed, 913 insertions(+), 182 deletions(-) create mode 100644 Adaptation/FileHandlers/OpenInsight/FromIQS.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08DDUPSFS6420.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR1.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR2.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR3.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.47.1/MET08DDUPSFS6420.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR1.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR2.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR3.cs diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig index 2220133..b84fca4 100644 --- a/Adaptation/.editorconfig +++ b/Adaptation/.editorconfig @@ -80,9 +80,11 @@ dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array al 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.IDE0001.severity = warning # IDE0001: Simplify name +dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed +dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049) dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case @@ -215,7 +217,7 @@ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity dotnet_style_parentheses_in_other_operators = never_if_unnecessary dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity dotnet_style_predefined_type_for_locals_parameters_members = true -dotnet_style_predefined_type_for_member_access = true +dotnet_style_predefined_type_for_member_access = true:warning dotnet_style_prefer_auto_properties = true:warning dotnet_style_prefer_compound_assignment = true:warning dotnet_style_prefer_conditional_expression_over_assignment = false diff --git a/Adaptation/FileHandlers/APC/FileRead.cs b/Adaptation/FileHandlers/APC/FileRead.cs index 9bff0b2..516a83f 100644 --- a/Adaptation/FileHandlers/APC/FileRead.cs +++ b/Adaptation/FileHandlers/APC/FileRead.cs @@ -103,10 +103,10 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void FileCopy(string reportFullPath, DateTime dateTime) + private void FileCopy(string reportFullPath, DateTime dateTime, List descriptions) where T : Shared.Properties.IDescription { bool isDummyRun = false; - List<(Shared.Properties.IScopeInfo, string)> tuples = new(); + List<(Shared.Properties.IScopeInfo, string)> collection = new(); string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; string fileNameAfterUnderscoreSplit = GetFileNameAfterUnderscoreSplit(reportFullPath); string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, fileNameAfterUnderscoreSplit); @@ -114,7 +114,7 @@ public class FileRead : Shared.FileRead, IFileRead _ = Directory.CreateDirectory(duplicateDirectory); string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); File.Copy(reportFullPath, duplicateFile, overwrite: true); - WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); + WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); } private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) @@ -127,7 +127,7 @@ public class FileRead : Shared.FileRead, IFileRead List descriptions = GetDuplicatorDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - FileCopy(reportFullPath, dateTime); + FileCopy(reportFullPath, dateTime, descriptions); results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); return results; } diff --git a/Adaptation/FileHandlers/IQSSi/FileRead.cs b/Adaptation/FileHandlers/IQSSi/FileRead.cs index b219107..315ce1e 100644 --- a/Adaptation/FileHandlers/IQSSi/FileRead.cs +++ b/Adaptation/FileHandlers/IQSSi/FileRead.cs @@ -110,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead private void SaveIQSFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) { bool isDummyRun = false; - List<(Shared.Properties.IScopeInfo, string)> tuples = new(); + List<(Shared.Properties.IScopeInfo, string)> collection = new(); string lines = OpenInsight.FileRead.GetLines(_Logistics, descriptions); string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); @@ -121,16 +121,16 @@ public class FileRead : Shared.FileRead, IFileRead { ScopeInfo scopeInfo = new(tests[0], _IQSFile); if (!string.IsNullOrEmpty(lines)) - tuples.Add(new(scopeInfo, lines)); + collection.Add(new(scopeInfo, lines)); } - WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); + WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); } - private void FileCopy(string reportFullPath, DateTime dateTime) + private void FileCopy(string reportFullPath, DateTime dateTime, List descriptions) where T : Shared.Properties.IDescription { bool isDummyRun = false; string successDirectory = string.Empty; - List<(Shared.Properties.IScopeInfo, string)> tuples = new(); + List<(Shared.Properties.IScopeInfo, string)> collection = new(); string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); if (!Directory.Exists(duplicateDirectory)) _ = Directory.CreateDirectory(duplicateDirectory); @@ -148,7 +148,7 @@ public class FileRead : Shared.FileRead, IFileRead .Replace("%\t", "\t") .Replace("]\t", "\t"); File.WriteAllText(duplicateFile, lines); - WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); + WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); } private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) @@ -166,7 +166,7 @@ public class FileRead : Shared.FileRead, IFileRead if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) SaveIQSFile(reportFullPath, dateTime, descriptions, tests); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - FileCopy(reportFullPath, dateTime); + FileCopy(reportFullPath, dateTime, descriptions); return results; } diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index edb698c..3c2b7bc 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -16,6 +16,7 @@ namespace Adaptation.FileHandlers.OpenInsight; public class FileRead : Shared.FileRead, IFileRead { + private readonly string _IqsConnectionString; private readonly string _OpenInsightFilePattern; public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : @@ -30,6 +31,7 @@ public class FileRead : Shared.FileRead, IFileRead throw new Exception(cellInstanceConnectionName); if (!_IsDuplicator) throw new Exception(cellInstanceConnectionName); + _IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString"); _OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern"); } @@ -231,8 +233,7 @@ public class FileRead : Shared.FileRead, IFileRead private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) { bool isDummyRun = false; - string lines = GetLines(_Logistics, descriptions); - List<(Shared.Properties.IScopeInfo, string)> tuples = new(); + List<(Shared.Properties.IScopeInfo, string)> collection = new(); string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation); if (parentParent.Contains(_CellInstanceName)) @@ -241,13 +242,19 @@ public class FileRead : Shared.FileRead, IFileRead if (!Directory.Exists(duplicateDirectory)) _ = Directory.CreateDirectory(duplicateDirectory); string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); - if (tests.Any()) + if (descriptions.Any() && tests.Any()) { - ScopeInfo scopeInfo = new(tests[0], _OpenInsightFilePattern); + string lines = GetLines(_Logistics, descriptions); + ; if (!string.IsNullOrEmpty(lines)) - tuples.Add(new(scopeInfo, lines)); + collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines)); + _ = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0]); + // string commandText = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0]); + // if (!string.IsNullOrEmpty(commandText)) + // collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), commandText)); } - WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); + if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) + WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); } private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) diff --git a/Adaptation/FileHandlers/OpenInsight/FromIQS.cs b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs new file mode 100644 index 0000000..bfbb888 --- /dev/null +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -0,0 +1,104 @@ +using Adaptation.Shared; +using System; +using System.Data.SqlClient; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Text.Json; + +namespace Adaptation.FileHandlers.OpenInsight; + +public class FromIQS +{ + +#nullable enable + + private static string GetCommandText(Logistics logistics, pcl.Description description, string dateTime, string? sid) + { + StringBuilder result = new(); + _ = result + .AppendLine(" select ") + .AppendLine(" se.f_sgrp se_sgrp, ") + .AppendLine(" se.f_sgtm se_sgtm, ") + .AppendLine(" se.f_tsno se_tsno, ") + .AppendLine(" se.f_val se_val, ") + .AppendLine(" rd.f_name rd_name, ") + .AppendLine(" jd.f_name jd_name, ") + .AppendLine(" pl.f_name pl_name, ") + .AppendLine(" pd.f_name pd_name, ") + .AppendLine(" td.f_test td_test, ") + .AppendLine(" td.f_name td_name ") + .AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ") + .AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ") + .AppendLine(" on se.f_prcs = rd.f_prcs ") + .AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ") + .AppendLine(" on se.f_job = jd.f_job ") + .AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ") + .AppendLine(" on se.f_lot = pl.f_lot ") + .AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ") + .AppendLine(" on se.f_part = pd.f_part ") + .AppendLine(" join [spcepiworld].[dbo].[test_dat] td ") + .AppendLine(" on se.f_test = td.f_test ") + .AppendLine(" where se.f_flag = 0 "); + if (!string.IsNullOrEmpty(sid)) + _ = result.Append(" and se.f_sgrp = ").Append(sid).AppendLine(" "); + _ = result + .Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ") + .Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ") + .AppendLine(" and jd.f_name in ('TENCOR1', 'TENCOR2', 'TENCOR3') ") + .Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ") + .Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' ") + .Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ") + .AppendLine(" for json path "); + return result.ToString(); + } + + private static StringBuilder GetForJsonPath(string connectionString, string commandText) + { + StringBuilder stringBuilder = new(); + using (SqlConnection sqlConnection = new(connectionString)) + { + sqlConnection.Open(); + using SqlCommand sqlCommand = new(commandText, sqlConnection); + SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.SequentialAccess); + while (sqlDataReader.Read()) + _ = stringBuilder.Append(sqlDataReader.GetString(0)); + } + return stringBuilder; + } + + internal static string GetCommandText(string connectionString, Logistics logistics, pcl.Description description) + { + string result; + string dateTime; + string dateFormat = pcl.Description.GetDateFormat(); + if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) + dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss"); + else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed)) + dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss"); + else + dateTime = logistics.DateTimeFromSequence.ToString("yyyy-MM-dd HH:mm:ss"); + string commandText = GetCommandText(logistics, description, dateTime, sid: null); + StringBuilder stringBuilder = GetForJsonPath(connectionString, commandText); + if (stringBuilder.Length == 0) + result = commandText; + else + { + JsonElement[]? jsonElements = JsonSerializer.Deserialize(stringBuilder.ToString()); + if (jsonElements is null || !jsonElements.Any() || jsonElements[0].ValueKind != JsonValueKind.Object) + result = commandText; + else + { + JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray(); + if (!jsonProperties.Any() || jsonProperties[0].Name != "se_sgrp") + result = commandText; + else + result = GetCommandText(logistics, description, dateTime, sid: jsonProperties[0].Value.ToString()); + } + } + return result; + } + +#nullable disable + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/SPaCe/FileRead.cs b/Adaptation/FileHandlers/SPaCe/FileRead.cs index 15a6c20..a6c47a1 100644 --- a/Adaptation/FileHandlers/SPaCe/FileRead.cs +++ b/Adaptation/FileHandlers/SPaCe/FileRead.cs @@ -103,15 +103,15 @@ public class FileRead : Shared.FileRead, IFileRead return results; } - private void FileCopy(string reportFullPath, DateTime dateTime) + private void FileCopy(string reportFullPath, DateTime dateTime, List descriptions) where T : Shared.Properties.IDescription { bool isDummyRun = false; string successDirectory = string.Empty; - List<(Shared.Properties.IScopeInfo, string)> tuples = new(); + List<(Shared.Properties.IScopeInfo, string)> collection = new(); string duplicateDirectory = _FileConnectorConfiguration.TargetFileLocation; string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); File.Copy(reportFullPath, duplicateFile, overwrite: true); - WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); + WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile); } private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) @@ -126,7 +126,7 @@ public class FileRead : Shared.FileRead, IFileRead List descriptions = GetDuplicatorDescriptions(jsonElements); Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) - FileCopy(reportFullPath, dateTime); + FileCopy(reportFullPath, dateTime, descriptions); results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); return results; } diff --git a/Adaptation/FileHandlers/pcl/Description.cs b/Adaptation/FileHandlers/pcl/Description.cs index 501da60..dcaa395 100644 --- a/Adaptation/FileHandlers/pcl/Description.cs +++ b/Adaptation/FileHandlers/pcl/Description.cs @@ -300,7 +300,7 @@ public class Description : IDescription, Shared.Properties.IDescription ProcessJobID = logistics.ProcessJobID, MID = logistics.MID, // - Date = processData.Date, + Date = processData.Date.ToString(GetDateFormat()), Employee = processData.Employee, Lot = processData.Lot, PSN = processData.PSN, @@ -490,4 +490,6 @@ public class Description : IDescription, Shared.Properties.IDescription return result; } + internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; + } \ No newline at end of file diff --git a/Adaptation/FileHandlers/pcl/FileRead.cs b/Adaptation/FileHandlers/pcl/FileRead.cs index 7257d21..4603b30 100644 --- a/Adaptation/FileHandlers/pcl/FileRead.cs +++ b/Adaptation/FileHandlers/pcl/FileRead.cs @@ -14,6 +14,7 @@ namespace Adaptation.FileHandlers.pcl; public class FileRead : Shared.FileRead, IFileRead { + private long? _TickOffset; private readonly string _GhostPCLFileName; public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : @@ -101,7 +102,8 @@ public class FileRead : Shared.FileRead, IFileRead private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) { Tuple> results = new(string.Empty, null, null, new List()); - _Logistics = new Logistics(this, reportFullPath, useSplitForMID: true); + _TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks; + _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true); SetFileParameterLotIDToLogisticsMID(); if (_Logistics.FileInfo.Length < _MinFileLength) results.Item4.Add(_Logistics.FileInfo); diff --git a/Adaptation/FileHandlers/pcl/ProcessData.cs b/Adaptation/FileHandlers/pcl/ProcessData.cs index 1530fa1..0107cb9 100644 --- a/Adaptation/FileHandlers/pcl/ProcessData.cs +++ b/Adaptation/FileHandlers/pcl/ProcessData.cs @@ -32,7 +32,7 @@ public class ProcessData : IProcessData public string AreaTotalMax { get; set; } public string AreaTotalMin { get; set; } public string AreaTotalStdDev { get; set; } - public string Date { get; set; } + public DateTime Date { get; set; } public string Employee { get; set; } public string HazeAverageAvg { get; set; } public string HazeAverageMax { get; set; } @@ -408,7 +408,8 @@ public class ProcessData : IProcessData _I = 0; _Data = pages[headerFileName]; ScanPast("Date:"); - Date = GetToEOL(); + string dateTime = GetToEOL(); + Date = DateTime.Parse(dateTime); Set(logistics); // determine number of wafers and their slot numbers _Log.Debug(_Data.Substring(_I)); @@ -744,10 +745,6 @@ public class ProcessData : IProcessData File.WriteAllLines(missingSlotsFile, missingSlots); sourceFiles.Add(missingSlotsFile); } - Date = DateTime.Parse(Date).ToString(); - //Equipment data is wrong!!! - Date = DateTime.Now.ToString(); - //Equipment data is wrong!!! //for (int i = 0; i < dataFiles.Count; i++) // dataFiles[i].Date = DateTime.Parse(dataFiles[i].Date).ToString(); foreach (string sourceFile in sourceFiles) diff --git a/Adaptation/MET08DDUPSFS6420.Tests.csproj b/Adaptation/MET08DDUPSFS6420.Tests.csproj index 2e6174c..7c51f23 100644 --- a/Adaptation/MET08DDUPSFS6420.Tests.csproj +++ b/Adaptation/MET08DDUPSFS6420.Tests.csproj @@ -39,11 +39,11 @@ - + - + @@ -51,11 +51,11 @@ - + - + - + @@ -65,7 +65,7 @@ - + diff --git a/Adaptation/Shared/Duplicator/Description.cs b/Adaptation/Shared/Duplicator/Description.cs index abbb7a4..ee456bf 100644 --- a/Adaptation/Shared/Duplicator/Description.cs +++ b/Adaptation/Shared/Duplicator/Description.cs @@ -12,6 +12,7 @@ public class Description : IDescription, Properties.IDescription public int Test { get; set; } public int Count { get; set; } public int Index { get; set; } + public string RDS { get; set; } // public string EventName { get; set; } public string NullData { get; set; } @@ -139,4 +140,6 @@ public class Description : IDescription, Properties.IDescription return result; } + internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; + } \ No newline at end of file diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 9e02131..d55fa16 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -260,24 +260,23 @@ public class FileRead : Properties.IFileRead return results; } - protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory) + protected static string GetTupleFile(Logistics logistics, List descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory) where T : Properties.IDescription { string result; string rds; string dateValue; - string datePlaceholder; - string[] segments = logistics.MID.Split('-'); - if (segments.Length < 2) - rds = "%RDS%"; + string rdsPlaceholder = "%RDS%"; + if (!descriptions.Any() || string.IsNullOrEmpty(descriptions[0].RDS)) + rds = logistics.MID; else - rds = segments[1]; - segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); + rds = descriptions[0].RDS; + string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); if (segments.Length == 0) - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace("%RDS%", rds)); + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds)); else { - datePlaceholder = "%DateTime%"; segments = segments[1].Split('%'); + string datePlaceholder = "%DateTime%"; dateValue = logistics.DateTimeFromSequence.ToString(segments[0]); foreach (string segment in scopeInfo.FileName.Split('%')) { @@ -285,18 +284,19 @@ public class FileRead : Properties.IFileRead continue; datePlaceholder = string.Concat('%', segment, '%'); } - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace("%RDS%", rds).Replace(datePlaceholder, dateValue)); + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(datePlaceholder, dateValue)); } if (result.Contains('%')) throw new Exception("Placeholder exists!"); return result; } - protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> tuples) + protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, List descriptions, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> collection) where T : Properties.IDescription { bool check; long preWait; string tupleFile; + string tupleFileName = string.Empty; List duplicateFiles = new(); StringBuilder stringBuilder = new(); List consumedFileIndices = new(); @@ -306,20 +306,22 @@ public class FileRead : Properties.IFileRead preWait = dateTime.AddMilliseconds(1234).Ticks; else preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; - if (!tuples.Any()) + if (!collection.Any()) duplicateFiles.Add(duplicateFile); string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath)); - foreach ((Properties.IScopeInfo scopeInfo, string text) in tuples) + foreach ((Properties.IScopeInfo scopeInfo, string text) in collection) { if (scopeInfo.FileName.StartsWith(@"\")) tupleFile = scopeInfo.FileName; else if (!scopeInfo.FileName.Contains('%')) tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc"); else - tupleFile = GetTupleFile(logistics, scopeInfo, duplicateDirectory); + tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory); + tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0]; duplicateFiles.Add(tupleFile); - File.WriteAllText(tupleFile, text); + if (_IsEAFHosted) + File.WriteAllText(tupleFile, text); } for (short i = 0; i < short.MaxValue; i++) { @@ -340,7 +342,17 @@ public class FileRead : Properties.IFileRead for (int i = 0; i < duplicateFiles.Count; i++) { if (!File.Exists(duplicateFiles[i])) - consumedFileIndices.Add(i); + { + if (string.IsNullOrEmpty(tupleFileName)) + consumedFileIndices.Add(i); + else if (duplicateFiles.All(l => Path.GetFileNameWithoutExtension(l).Split('.')[0] == tupleFileName)) + { + for (int j = 0; j < duplicateFiles.Count; j++) + consumedFileIndices.Add(j); + } + else + consumedFileIndices.Add(i); + } } if (consumedFileIndices.Count == duplicateFiles.Count) break; @@ -599,10 +611,10 @@ public class FileRead : Properties.IFileRead } } - protected void WaitForFileConsumption(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> tuples, string duplicateFile) + protected void WaitForFileConsumption(DateTime dateTime, List descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription { if (!isDummyRun && _IsEAFHosted) - WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples); + WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection); else { long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks; diff --git a/Adaptation/Shared/Logistics.cs b/Adaptation/Shared/Logistics.cs index 38ed83c..a6ca882 100644 --- a/Adaptation/Shared/Logistics.cs +++ b/Adaptation/Shared/Logistics.cs @@ -51,7 +51,7 @@ public class Logistics : ILogistics _Logistics2 = new List(); } - public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) + public Logistics(IFileRead fileRead, long tickOffset, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) { if (string.IsNullOrEmpty(fileRead.CellInstanceName)) throw new Exception(); @@ -59,7 +59,7 @@ public class Logistics : ILogistics throw new Exception(); _NullData = fileRead.NullData; _FileInfo = new(reportFullPath); - DateTime dateTime = _FileInfo.LastWriteTime; + DateTime dateTime = new(_FileInfo.LastWriteTime.Ticks + tickOffset); if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value) dateTime = dateTime.AddTicks(-1); _JobID = fileRead.CellInstanceName; diff --git a/Adaptation/Shared/Metrology/ScopeInfo.cs b/Adaptation/Shared/Metrology/ScopeInfo.cs index 2de909e..539bd09 100644 --- a/Adaptation/Shared/Metrology/ScopeInfo.cs +++ b/Adaptation/Shared/Metrology/ScopeInfo.cs @@ -16,7 +16,7 @@ public class ScopeInfo : Properties.IScopeInfo public string QueryFilter { get; private set; } public string FileNameWithoutExtension { get; private set; } - public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "") + public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "", string extraExtension = "") { Enum = test; Test = test; diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs index b892219..12f261b 100644 --- a/Adaptation/Shared/Metrology/WS.cs +++ b/Adaptation/Shared/Metrology/WS.cs @@ -44,8 +44,7 @@ public partial class WS _ = stringBuilder.AppendLine(exception.Message); exception = exception.InnerException; } - if (results.Errors is null) - results.Errors = new List(); + results.Errors ??= new List(); results.Errors.Add(stringBuilder.ToString()); } return new(resultsJson, results); diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index 9dcdb0a..b256f0f 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -91,8 +91,7 @@ public class ProcessDataStandardFormat string segment; List body = new(); StringBuilder logistics = new(); - if (lines is null) - lines = File.ReadAllLines(reportFullPath); + lines ??= File.ReadAllLines(reportFullPath); string[] segments; if (lines.Length < 7) segments = Array.Empty(); @@ -276,8 +275,7 @@ public class ProcessDataStandardFormat public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List names, Dictionary> keyValuePairs, string dateFormat, string timeFormat, List pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List ignoreParameterNames = null) { StringBuilder result = new(); - if (ignoreParameterNames is null) - ignoreParameterNames = new List(); + ignoreParameterNames ??= new List(); if (useDateTimeFromSequence && !string.IsNullOrEmpty(format)) throw new Exception(); else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format)) @@ -357,8 +355,7 @@ public class ProcessDataStandardFormat if (string.IsNullOrEmpty(lines[i])) continue; segments = lines[i].Split(inputSeparator); - if (currentGroup is null) - currentGroup = segments.Length; + currentGroup ??= segments.Length; if (segments.Length != currentGroup) { currentGroup = segments.Length; diff --git a/Adaptation/Shared/Properties/IDescription.cs b/Adaptation/Shared/Properties/IDescription.cs index 93e6de5..1166e17 100644 --- a/Adaptation/Shared/Properties/IDescription.cs +++ b/Adaptation/Shared/Properties/IDescription.cs @@ -6,5 +6,6 @@ public interface IDescription int Test { get; } int Count { get; } int Index { get; } + string RDS { get; } } \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/TENCOR1.cs index a7eaf3c..1fcc8af 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/TENCOR1.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/TENCOR1.cs @@ -31,8 +31,7 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR1(testContext); + EAFLoggingUnitTesting ??= new TENCOR1(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08DDUPSFS6420.cs index de03ada..794acc3 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08DDUPSFS6420.cs @@ -33,8 +33,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08DDUPSFS6420(testContext); + EAFLoggingUnitTesting ??= new MET08DDUPSFS6420(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -44,10 +43,8 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR1.cs index b98cec5..58b5d72 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR1.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR1.cs @@ -30,8 +30,7 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR1(testContext); + EAFLoggingUnitTesting ??= new TENCOR1(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -41,10 +40,8 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR2.cs index 622b655..00a5750 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR2.cs @@ -30,8 +30,7 @@ public class TENCOR2 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR2(testContext); + EAFLoggingUnitTesting ??= new TENCOR2(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -41,10 +40,8 @@ public class TENCOR2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3-EQPT.cs index f27e96c..c1ac17e 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3-EQPT.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3-EQPT.cs @@ -31,8 +31,7 @@ public class TENCOR3_EQPT : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR3_EQPT(testContext); + EAFLoggingUnitTesting ??= new TENCOR3_EQPT(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class TENCOR3_EQPT : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3.cs index cb07f6e..271bffc 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/TENCOR3.cs @@ -31,8 +31,7 @@ public class TENCOR3 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR3(testContext); + EAFLoggingUnitTesting ??= new TENCOR3(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class TENCOR3 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08DDUPSFS6420.cs index 5499e4b..b7e8ad1 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08DDUPSFS6420.cs @@ -31,8 +31,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08DDUPSFS6420(testContext); + EAFLoggingUnitTesting ??= new MET08DDUPSFS6420(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08DDUPSFS6420.cs index 7adeb5a..548b58e 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08DDUPSFS6420.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/MET08DDUPSFS6420.cs @@ -33,8 +33,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08DDUPSFS6420(testContext); + EAFLoggingUnitTesting ??= new MET08DDUPSFS6420(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -44,10 +43,8 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR1.cs index ba4ae3c..90c9d2e 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR1.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR1.cs @@ -33,8 +33,7 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR1(testContext); + EAFLoggingUnitTesting ??= new TENCOR1(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -44,10 +43,8 @@ public class TENCOR1 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR2.cs index 24bef18..eeba618 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR2.cs @@ -33,8 +33,7 @@ public class TENCOR2 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR2(testContext); + EAFLoggingUnitTesting ??= new TENCOR2(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -44,10 +43,8 @@ public class TENCOR2 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR3.cs index d38bc3d..6860524 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.4/TENCOR3.cs @@ -33,8 +33,7 @@ public class TENCOR3 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new TENCOR3(testContext); + EAFLoggingUnitTesting ??= new TENCOR3(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -44,10 +43,8 @@ public class TENCOR3 : EAFLoggingUnitTesting [ClassCleanup()] public static void ClassCleanup() { - if (EAFLoggingUnitTesting.Logger is not null) - EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (EAFLoggingUnitTesting is not null) - EAFLoggingUnitTesting.Dispose(); + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); } #if true diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08DDUPSFS6420.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08DDUPSFS6420.cs new file mode 100644 index 0000000..b2a74f5 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08DDUPSFS6420.cs @@ -0,0 +1,180 @@ +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.Staging.v2_47_1; + +[TestClass] +public class MET08DDUPSFS6420 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08DDUPSFS6420 EAFLoggingUnitTesting { get; private set; } + + static MET08DDUPSFS6420() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public MET08DDUPSFS6420() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08DDUPSFS6420(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08DDUPSFS6420(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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__Dummy() + { + string check = "637400762024374000.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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR1.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR1.cs new file mode 100644 index 0000000..697cf2c --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR1.cs @@ -0,0 +1,63 @@ +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.Staging.v2_47_1; + +[TestClass] +public class TENCOR1 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR1 EAFLoggingUnitTesting { get; private set; } + + static TENCOR1() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR1() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR1(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR1(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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR1__pcl() + { + string check = "*.pcl"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR2.cs new file mode 100644 index 0000000..cfdbba3 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR2.cs @@ -0,0 +1,63 @@ +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.Staging.v2_47_1; + +[TestClass] +public class TENCOR2 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR2 EAFLoggingUnitTesting { get; private set; } + + static TENCOR2() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR2() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR2(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR2(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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR2__pcl() + { + string check = "*.pcl"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR3.cs new file mode 100644 index 0000000..b988adc --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/TENCOR3.cs @@ -0,0 +1,63 @@ +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.Staging.v2_47_1; + +[TestClass] +public class TENCOR3 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static TENCOR3 EAFLoggingUnitTesting { get; private set; } + + static TENCOR3() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy"; + + public TENCOR3() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public TENCOR3(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new TENCOR3(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 true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR3__pcl() + { + string check = "*.pcl"; + 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")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR1.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR1.cs index d3d7564..9a1c9f0 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR1.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR1.cs @@ -29,6 +29,9 @@ public class TENCOR1 [TestMethod] public void Staging__v2_43_4__TENCOR1__pcl() => _TENCOR1.Staging__v2_43_4__TENCOR1__pcl(); +#if true + [Ignore] +#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_43_4__TENCOR1__pcl637955518212649513__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR2.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR2.cs index e153389..8cfa1eb 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR2.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR2.cs @@ -29,6 +29,9 @@ public class TENCOR2 [TestMethod] public void Staging__v2_43_4__TENCOR2__pcl() => _TENCOR2.Staging__v2_43_4__TENCOR2__pcl(); +#if true + [Ignore] +#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_43_4__TENCOR2__pcl637955534973701250__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR3.cs b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR3.cs index cc39a5e..c1f23e1 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.43.4/TENCOR3.cs @@ -29,6 +29,9 @@ public class TENCOR3 [TestMethod] public void Staging__v2_43_4__TENCOR3__pcl() => _TENCOR3.Staging__v2_43_4__TENCOR3__pcl(); +#if true + [Ignore] +#endif [TestMethod] [ExpectedException(typeof(MissingMethodException))] public void Staging__v2_43_4__TENCOR3__pcl637955520360305921__Normal() diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08DDUPSFS6420.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08DDUPSFS6420.cs new file mode 100644 index 0000000..9ead710 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08DDUPSFS6420.cs @@ -0,0 +1,115 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_47_1; + +[TestClass] +public class MET08DDUPSFS6420 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.MET08DDUPSFS6420 _MET08DDUPSFS6420; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.MET08DDUPSFS6420.ClassInitialize(testContext); + _MET08DDUPSFS6420 = CreateSelfDescription.Staging.v2_47_1.MET08DDUPSFS6420.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__MoveMatchingFiles() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__MoveMatchingFiles(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal() + { + string check = "~IsXToOpenInsightMetrologyViewer"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer(); + string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _MET08DDUPSFS6420.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__IQSSi() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__IQSSi(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight638052163299572098__IqsSql() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight(); + string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08DDUPSFS6420.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__APC() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__APC(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__SPaCe() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__SPaCe(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__Processed() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__Processed(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__Archive() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__Archive(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08DDUPSFS6420__Dummy() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__Dummy(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR1.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR1.cs new file mode 100644 index 0000000..fa9a0b2 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR1.cs @@ -0,0 +1,49 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_47_1; + +[TestClass] +public class TENCOR1 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.TENCOR1 _TENCOR1; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.TENCOR1.ClassInitialize(testContext); + _TENCOR1 = CreateSelfDescription.Staging.v2_47_1.TENCOR1.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR1__pcl() => _TENCOR1.Staging__v2_47_1__TENCOR1__pcl(); + +#if true + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_47_1__TENCOR1__pcl637955518212649513__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR1.Staging__v2_47_1__TENCOR1__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR1.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR1.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR2.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR2.cs new file mode 100644 index 0000000..7619049 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR2.cs @@ -0,0 +1,49 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_47_1; + +[TestClass] +public class TENCOR2 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.TENCOR2 _TENCOR2; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.TENCOR2.ClassInitialize(testContext); + _TENCOR2 = CreateSelfDescription.Staging.v2_47_1.TENCOR2.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR2__pcl() => _TENCOR2.Staging__v2_47_1__TENCOR2__pcl(); + +#if true + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_47_1__TENCOR2__pcl637955534973701250__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR2.Staging__v2_47_1__TENCOR2__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR3.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR3.cs new file mode 100644 index 0000000..0820312 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/TENCOR3.cs @@ -0,0 +1,49 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_47_1; + +[TestClass] +public class TENCOR3 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.TENCOR3 _TENCOR3; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.TENCOR3.ClassInitialize(testContext); + _TENCOR3 = CreateSelfDescription.Staging.v2_47_1.TENCOR3.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__TENCOR3__pcl() => _TENCOR3.Staging__v2_47_1__TENCOR3__pcl(); + +#if true + [Ignore] +#endif + [TestMethod] + [ExpectedException(typeof(MissingMethodException))] + public void Staging__v2_47_1__TENCOR3__pcl637955520360305921__Normal() + { + string check = "*.pcl"; + bool validatePDSF = false; + _TENCOR3.Staging__v2_47_1__TENCOR3__pcl(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _TENCOR3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); + IFileRead fileRead = _TENCOR3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index 7e7c8cc..c011f8e 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -621,14 +621,10 @@ public class AdaptationTesting : ISMTP result = JsonSerializer.Deserialize(json, jsonSerializerOptions); if (string.IsNullOrEmpty(result.SourceFileFilter)) result.SourceFileFilter = string.Empty; - if (result.ErrorTargetFileLocation is null) - result.ErrorTargetFileLocation = string.Empty; - if (result.SourceFileLocation is null) - result.SourceFileLocation = string.Empty; - if (result.TargetFileLocation is null) - result.TargetFileLocation = string.Empty; - if (result.FolderAgeCheckIndividualSubFolders is null) - result.FolderAgeCheckIndividualSubFolders = false; + result.ErrorTargetFileLocation ??= string.Empty; + result.SourceFileLocation ??= string.Empty; + result.TargetFileLocation ??= string.Empty; + result.FolderAgeCheckIndividualSubFolders ??= false; result.ConnectionSettings = new List(); result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList(); if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null) diff --git a/Adaptation/_Tests/Shared/UnitTesting.cs b/Adaptation/_Tests/Shared/UnitTesting.cs index 28df790..38cf36f 100644 --- a/Adaptation/_Tests/Shared/UnitTesting.cs +++ b/Adaptation/_Tests/Shared/UnitTesting.cs @@ -55,8 +55,7 @@ public class UnitTesting _IsEnvironment = new IsEnvironment(testCategory); } } - if (_IsEnvironment is null) - _IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); + _IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); } } diff --git a/Adaptation/_Tests/Static/pcl.cs b/Adaptation/_Tests/Static/pcl.cs index 4b11598..799fb52 100644 --- a/Adaptation/_Tests/Static/pcl.cs +++ b/Adaptation/_Tests/Static/pcl.cs @@ -27,19 +27,20 @@ public class PCL : LoggingUnitTesting, IDisposable } [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - if (LoggingUnitTesting is null) - LoggingUnitTesting = new PCL(testContext); - } + public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new PCL(testContext); [ClassCleanup()] public static void ClassCleanup() { - if (LoggingUnitTesting.Logger is not null) - LoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (LoggingUnitTesting is not null) - LoggingUnitTesting.Dispose(); + LoggingUnitTesting.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Dispose(); + } + + [TestMethod] + public void TestDateTime() + { + DateTime dateTime = DateTime.Now; + Assert.IsTrue(dateTime.ToString("MM/dd/yyyy hh:mm:ss tt") == dateTime.ToString()); } [TestMethod] diff --git a/Adaptation/appsettings.Development.json b/Adaptation/appsettings.Development.json index 923c216..f7e0b36 100644 --- a/Adaptation/appsettings.Development.json +++ b/Adaptation/appsettings.Development.json @@ -59,7 +59,7 @@ "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" }, { - "Use": true, + "Use": false, "Letter": "k", "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", "User": "INFINEON\\MESGaNEAF", @@ -80,35 +80,35 @@ "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" }, { - "Use": true, + "Use": false, "Letter": "n", "Share": "\\\\10.95.154.22\\C", "User": "10.95.154.22\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "o", "Share": "\\\\10.95.154.16\\Aixtron", "User": "10.95.154.16\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "p", "Share": "\\\\10.95.154.15\\Aixtron", "User": "10.95.154.15\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "q", "Share": "\\\\10.95.154.21\\Data", "User": "10.95.154.21\\XRD04Admin", "Password": "v1NOsEOCvbnhzKabspPcCQ==" }, { - "Use": true, + "Use": false, "Letter": "r", "Share": "\\\\10.95.154.23\\Data", "User": "\"10.95.154.23\\infineon us\"", diff --git a/Adaptation/appsettings.json b/Adaptation/appsettings.json index bfeb1ac..d15d437 100644 --- a/Adaptation/appsettings.json +++ b/Adaptation/appsettings.json @@ -59,7 +59,7 @@ "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" }, { - "Use": true, + "Use": false, "Letter": "k", "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", "User": "INFINEON\\MESGaNEAF", @@ -80,35 +80,35 @@ "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" }, { - "Use": true, + "Use": false, "Letter": "n", "Share": "\\\\10.95.154.22\\C", "User": "10.95.154.22\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "o", "Share": "\\\\10.95.154.16\\Aixtron", "User": "10.95.154.16\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "p", "Share": "\\\\10.95.154.15\\Aixtron", "User": "10.95.154.15\\Aixtron", "Password": "DYVBOr2HJdB7KOhd/IFhLA==" }, { - "Use": true, + "Use": false, "Letter": "q", "Share": "\\\\10.95.154.21\\Data", "User": "10.95.154.21\\XRD04Admin", "Password": "v1NOsEOCvbnhzKabspPcCQ==" }, { - "Use": true, + "Use": false, "Letter": "r", "Share": "\\\\10.95.154.23\\Data", "User": "\"10.95.154.23\\infineon us\"", diff --git a/Adaptation/package.json b/Adaptation/package.json index 6c3a831..960960f 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -1,21 +1,22 @@ { "scripts": { - "AA-CreateSelfDescription.Staging.v2_43_4-TENCOR1_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR1_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "AB-CreateSelfDescription.Staging.v2_43_4-TENCOR2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR2_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "AC-CreateSelfDescription.Staging.v2_43_4-TENCOR3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR3_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "BA-CreateSelfDescription.Staging.v2_43_4-TENCOR1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR1\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "BB-CreateSelfDescription.Staging.v2_43_4-TENCOR2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR2\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "BC-CreateSelfDescription.Staging.v2_43_4-TENCOR3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~TENCOR3\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "CA-CreateSelfDescription.Staging.v2_43_4-MET08DDUPSFS6420": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~MET08DDUPSFS6420\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "EA-Extract.Staging.v2_43_4-TENCOR1_EQPT-Staging__v2_43_4__TENCOR1_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR1_EQPT & Name~Staging__v2_43_4__TENCOR1_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "EB-Extract.Staging.v2_43_4-TENCOR2_EQPT-Staging__v2_43_4__TENCOR2_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR2_EQPT & Name~Staging__v2_43_4__TENCOR2_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "EC-Extract.Staging.v2_43_4-TENCOR3_EQPT-Staging__v2_43_4__TENCOR3_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR3_EQPT & Name~Staging__v2_43_4__TENCOR3_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "FA-Extract.Staging.v2_43_4-TENCOR1-Staging__v2_43_4__TENCOR1__pcl637955518212649513__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR1 & Name~Staging__v2_43_4__TENCOR1__pcl637955518212649513__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "FB-Extract.Staging.v2_43_4-TENCOR2-Staging__v2_43_4__TENCOR2__pcl637955534973701250__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR2 & Name~Staging__v2_43_4__TENCOR2__pcl637955534973701250__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "FC-Extract.Staging.v2_43_4-TENCOR3-Staging__v2_43_4__TENCOR3__pcl637955520360305921__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR3 & Name~Staging__v2_43_4__TENCOR3__pcl637955520360305921__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "GA-Extract.Staging.v2_43_4-MET08DDUPSFS6420-Staging__v2_43_4__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~MET08DDUPSFS6420 & Name~Staging__v2_43_4__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "HA-Extract.Staging.v2_43_4-TENCOR1-Staging__v2_43_4__TENCOR1__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~TENCOR1 & Name~Staging__v2_43_4__TENCOR1__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AA-CreateSelfDescription.Staging.v2_47_1-TENCOR1_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR1_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AB-CreateSelfDescription.Staging.v2_47_1-TENCOR2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR2_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AC-CreateSelfDescription.Staging.v2_47_1-TENCOR3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR3_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BA-CreateSelfDescription.Staging.v2_47_1-TENCOR1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR1\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BB-CreateSelfDescription.Staging.v2_47_1-TENCOR2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR2\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BC-CreateSelfDescription.Staging.v2_47_1-TENCOR3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~TENCOR3\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "CA-CreateSelfDescription.Staging.v2_47_1-MET08DDUPSFS6420": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~MET08DDUPSFS6420\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "DA-CreateSelfDescription.Staging.v2_47_1": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EA-Extract.Staging.v2_47_1-TENCOR1_EQPT-Staging__v2_47_1__TENCOR1_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR1_EQPT & Name~Staging__v2_47_1__TENCOR1_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EB-Extract.Staging.v2_47_1-TENCOR2_EQPT-Staging__v2_47_1__TENCOR2_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR2_EQPT & Name~Staging__v2_47_1__TENCOR2_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EC-Extract.Staging.v2_47_1-TENCOR3_EQPT-Staging__v2_47_1__TENCOR3_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR3_EQPT & Name~Staging__v2_47_1__TENCOR3_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FA-Extract.Staging.v2_47_1-TENCOR1-Staging__v2_47_1__TENCOR1__pcl637955518212649513__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR1 & Name~Staging__v2_47_1__TENCOR1__pcl637955518212649513__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FB-Extract.Staging.v2_47_1-TENCOR2-Staging__v2_47_1__TENCOR2__pcl637955534973701250__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR2 & Name~Staging__v2_47_1__TENCOR2__pcl637955534973701250__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FC-Extract.Staging.v2_47_1-TENCOR3-Staging__v2_47_1__TENCOR3__pcl637955520360305921__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR3 & Name~Staging__v2_47_1__TENCOR3__pcl637955520360305921__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "GA-Extract.Staging.v2_47_1-MET08DDUPSFS6420-Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~MET08DDUPSFS6420 & Name~Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "HA-Extract.Staging.v2_47_1-TENCOR1-Staging__v2_47_1__TENCOR1__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~TENCOR1 & Name~Staging__v2_47_1__TENCOR1__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "HB-Extract.Staging.v2_47_1-MET08DDUPSFS6420-Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight638052163299572098__IqsSql": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~MET08DDUPSFS6420 & Name~Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight638052163299572098__IqsSql\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "nuget-clear": "dotnet nuget locals all --clear", "build": "dotnet build --runtime win-x64 --self-contained", diff --git a/MET08DDUPSFS6420.csproj b/MET08DDUPSFS6420.csproj index e82d1da..b346b65 100644 --- a/MET08DDUPSFS6420.csproj +++ b/MET08DDUPSFS6420.csproj @@ -112,6 +112,7 @@ + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 9f9cbb9..8993376 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.47.0.0")] -[assembly: AssemblyFileVersion("2.47.0.0")] +[assembly: AssemblyVersion("2.47.1.0")] +[assembly: AssemblyFileVersion("2.47.1.0")] diff --git a/Shared/Logistics.cs b/Shared/Logistics.cs index 38ed83c..43d66b4 100644 --- a/Shared/Logistics.cs +++ b/Shared/Logistics.cs @@ -51,7 +51,7 @@ public class Logistics : ILogistics _Logistics2 = new List(); } - public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) + public Logistics(IFileRead fileRead, long tickOffset, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) { if (string.IsNullOrEmpty(fileRead.CellInstanceName)) throw new Exception(); @@ -59,7 +59,7 @@ public class Logistics : ILogistics throw new Exception(); _NullData = fileRead.NullData; _FileInfo = new(reportFullPath); - DateTime dateTime = _FileInfo.LastWriteTime; + DateTime dateTime = new (_FileInfo.LastWriteTime.Ticks + tickOffset); if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value) dateTime = dateTime.AddTicks(-1); _JobID = fileRead.CellInstanceName;