diff --git a/Adaptation/.vscode/Reactor.js b/Adaptation/.vscode/Reactor.js new file mode 100644 index 0000000..5aab451 --- /dev/null +++ b/Adaptation/.vscode/Reactor.js @@ -0,0 +1,26 @@ +// (self.length != 0) ? +// self : +// (getContextData('2', 'cds.PROCESS_JOBID', '') == '-') ? +// self : +// getContextData('2', 'cds.PROCESS_JOBID', '') + +getValue(self, self.length, $('dcp.BIORAD4/Stratus/MesEntity', ''), $('dcp.BIORAD4/Stratus/Recipe', ''), getContextData('2', 'cds.PROCESS_JOBID', '')); + +function getValue(value, length, mesEntity, recipe, processJobId) { + if (recipe.toUpperCase() === 'T-LOW') + return mesEntity; + else if (recipe.toUpperCase() === 'T-MID') + return mesEntity; + else if (recipe.toUpperCase() === 'T-HIGH') + return mesEntity; + else if (recipe.toUpperCase() === 'T_LOW') + return mesEntity; + else if (recipe.toUpperCase() === 'T_MID') + return mesEntity; + else if (recipe.toUpperCase() === 'T_HIGH') + return mesEntity; + else if (length !== 0 || processJobId === '-') + return value; + else + return processJobId; +} \ No newline at end of file diff --git a/Adaptation/.vscode/psn.js b/Adaptation/.vscode/psn.js new file mode 100644 index 0000000..0305b3e --- /dev/null +++ b/Adaptation/.vscode/psn.js @@ -0,0 +1,26 @@ +// (self.length != 0) ? +// self : +// (getContextData('2', 'cds.PRODUCT', '') == '-') ? +// self : +// getContextData('2', 'cds.PRODUCT', '') + +getValue(self, self.length, getContextData('2', 'cds.PRODUCT', ''), $('dcp.BIORAD4/Stratus/Recipe', '')); + +function getValue(value, length, product, recipe) { + if (recipe.toUpperCase() === 'T-LOW') + return 'T-Low'; + else if (recipe.toUpperCase() === 'T-MID') + return 'T-Mid'; + else if (recipe.toUpperCase() === 'T-HIGH') + return 'T-High'; + else if (recipe.toUpperCase() === 'T_LOW') + return 'T-Low'; + else if (recipe.toUpperCase() === 'T_MID') + return 'T-Mid'; + else if (recipe.toUpperCase() === 'T_HIGH') + return 'T-High'; + else if (length !== 0 || product === '-') + return value; + else + return product; +} \ No newline at end of file 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/Dummy/FileRead.cs b/Adaptation/FileHandlers/Dummy/FileRead.cs index 7692d3d..35fd460 100644 --- a/Adaptation/FileHandlers/Dummy/FileRead.cs +++ b/Adaptation/FileHandlers/Dummy/FileRead.cs @@ -100,13 +100,21 @@ public class FileRead : Shared.FileRead, IFileRead const string site = "sjc"; string stateName = string.Concat("Dummy_", _EventName); const string monInURL = "http://moninhttp.sjc.infineon.com/input/text"; +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. MonIn monIn = MonIn.GetInstance(monInURL); +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. try { if (warning) { +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() }); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. _ = monIn.SendStatus(site, monARessource, stateName, State.Warning); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. for (int i = 1; i < 12; i++) Thread.Sleep(500); } @@ -129,8 +137,12 @@ public class FileRead : Shared.FileRead, IFileRead foreach (string file in files) File.Move(file, string.Concat(targetFileLocation, file.Substring(inProcessDirectory.Length))); } +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() }); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. _ = monIn.SendStatus(site, monARessource, stateName, State.Ok); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. } catch (Exception exception) { @@ -139,8 +151,12 @@ public class FileRead : Shared.FileRead, IFileRead try { _SMTP.SendHighPriorityEmailMessage(subject, body); } catch (Exception) { } +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace }); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. _ = monIn.SendStatus(site, monARessource, stateName, State.Critical); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. } } diff --git a/Adaptation/FileHandlers/IQSSi/FileRead.cs b/Adaptation/FileHandlers/IQSSi/FileRead.cs index 6bbe58e..a0563cf 100644 --- a/Adaptation/FileHandlers/IQSSi/FileRead.cs +++ b/Adaptation/FileHandlers/IQSSi/FileRead.cs @@ -103,17 +103,17 @@ 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 = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); if (!Directory.Exists(duplicateDirectory)) _ = 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) @@ -128,7 +128,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/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index 98633f4..95d7d18 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"); } @@ -132,8 +134,7 @@ public class FileRead : Shared.FileRead, IFileRead private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List descriptions, Test[] tests) { bool isDummyRun = false; - string lines = GetLines(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)) @@ -142,13 +143,18 @@ 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(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..7a1c169 --- /dev/null +++ b/Adaptation/FileHandlers/OpenInsight/FromIQS.cs @@ -0,0 +1,103 @@ +using Adaptation.Shared; +using System; +using System.Data; +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, Stratus.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 ('BIORAD4', 'BIORAD5') ") + .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(CommandBehavior.SequentialAccess); + while (sqlDataReader.Read()) + _ = stringBuilder.Append(sqlDataReader.GetString(0)); + return stringBuilder; + } + + internal static string GetCommandText(string connectionString, Logistics logistics, Stratus.Description description) + { + string result; + string dateTime; + string dateFormat = Stratus.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/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index 2c6e0ae..c2896d5 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -84,8 +84,7 @@ public class WSRequest detail.Points[i].Thickness = segments[i]; Details.Add(detail); } - if (Date is null) - Date = logistics.DateTimeFromSequence.ToString(); + Date ??= logistics.DateTimeFromSequence.ToString(); if (UniqueId is null && Details.Any()) UniqueId = Details[0].HeaderUniqueId; } 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/Stratus/Description.cs b/Adaptation/FileHandlers/Stratus/Description.cs index 77fbd59..39c08a6 100644 --- a/Adaptation/FileHandlers/Stratus/Description.cs +++ b/Adaptation/FileHandlers/Stratus/Description.cs @@ -192,7 +192,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.Batch, PSN = processData.PSN, @@ -274,4 +274,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/Stratus/FileRead.cs b/Adaptation/FileHandlers/Stratus/FileRead.cs index b5380fb..8257b6f 100644 --- a/Adaptation/FileHandlers/Stratus/FileRead.cs +++ b/Adaptation/FileHandlers/Stratus/FileRead.cs @@ -14,6 +14,7 @@ namespace Adaptation.FileHandlers.Stratus; public class FileRead : Shared.FileRead, IFileRead { + private long? _TickOffset; private readonly string _OriginalDataBioRad; 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) : @@ -99,7 +100,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/Stratus/ProcessData.cs b/Adaptation/FileHandlers/Stratus/ProcessData.cs index 45900d4..2a90967 100644 --- a/Adaptation/FileHandlers/Stratus/ProcessData.cs +++ b/Adaptation/FileHandlers/Stratus/ProcessData.cs @@ -23,7 +23,7 @@ public partial class ProcessData : IProcessData public string MesEntity { get; set; } public string Batch { get; set; } public string Cassette { get; set; } - public string Date { get; set; } + public DateTime Date { get; set; } public string FilePath { get; set; } public string Layer { get; set; } public string MeanThickness { get; set; } @@ -376,12 +376,12 @@ public partial class ProcessData : IProcessData { string psn; string rds; - string date; string text; string zone; string batch; string layer; string title; + DateTime date; string reactor; string cassette; string employee; @@ -411,8 +411,8 @@ public partial class ProcessData : IProcessData string dateTimeText = GetToEOL(); if (dateTimeText.EndsWith(".")) dateTimeText = dateTimeText.Remove(dateTimeText.Length - 1, 1); - DateTime dateTime = GetDateTime(logistics, dateTimeText); - date = dateTime.ToString(); + date = GetDateTime(logistics, dateTimeText); + ; Descriptor descriptor = GetDescriptor(text); cassette = descriptor.Cassette; psn = descriptor.PSN; @@ -573,8 +573,7 @@ public partial class ProcessData : IProcessData { detail.HeaderUniqueId = UniqueId; detail.UniqueId = string.Concat(UniqueId, detail.UniqueId); - if (detail.Points is null) - detail.Points = new List(); + detail.Points ??= new List(); foreach (Point bioRadDetail in detail.Points) { bioRadDetail.HeaderUniqueId = detail.HeaderUniqueId; diff --git a/Adaptation/FileHandlers/txt/FileRead.cs b/Adaptation/FileHandlers/txt/FileRead.cs index ca57999..2707591 100644 --- a/Adaptation/FileHandlers/txt/FileRead.cs +++ b/Adaptation/FileHandlers/txt/FileRead.cs @@ -14,6 +14,7 @@ namespace Adaptation.FileHandlers.txt; public class FileRead : Shared.FileRead, IFileRead { + private long? _TickOffset; private readonly string _OriginalDataBioRad; 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) : @@ -99,7 +100,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: false); + _TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks; + _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true); SetFileParameterLotID(_Logistics.MID); FileInfo fileInfo = new(reportFullPath); if (fileInfo.Length < _MinFileLength) diff --git a/Adaptation/FileHandlers/txt/ProcessData.cs b/Adaptation/FileHandlers/txt/ProcessData.cs index 0f30260..409ef4e 100644 --- a/Adaptation/FileHandlers/txt/ProcessData.cs +++ b/Adaptation/FileHandlers/txt/ProcessData.cs @@ -52,8 +52,7 @@ public partial class ProcessData } // Making sure that the file has been released rawDataFilePtr.Close(); - if (rawDataFilePtr is not null) - rawDataFilePtr.Dispose(); + rawDataFilePtr?.Dispose(); } if (cassetteScanCompleted is null || !cassetteScanCompleted.Value) // Raw source file has an incomplete data set or it only contains a "Process failed" and should not be @@ -456,7 +455,7 @@ public partial class ProcessData cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(count * -1); user = processData.Employee?.ToString() ?? ""; recipe = detail.Recipe?.ToString() ?? ""; - _ = contents.Append("Bio-Rad ").Append("QS400MEPI".PadRight(17)).Append("Recipe: ").Append(recipe.PadRight(25)).AppendLine(processData.Date); + _ = contents.Append("Bio-Rad ").Append("QS400MEPI".PadRight(17)).Append("Recipe: ").Append(recipe.PadRight(25)).AppendLine(processData.Date.ToString(Stratus.Description.GetDateFormat())); _ = contents.Append("operator: ").Append(user.PadRight(22)).Append("batch: BIORAD #").AppendLine(logistics.JobID.Substring(6, 1)); _ = contents.Append("cassette: ").Append("".PadRight(22)).Append("wafer: ").AppendLine(processData.Cassette); _ = contents.AppendLine("--------------------------------------------------------------------------------"); diff --git a/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs b/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs index 6552d47..f198612 100644 --- a/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs +++ b/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs @@ -4,20 +4,26 @@ namespace Infineon.Monitoring.MonA; public interface IMonIn { +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string SendStatus(string site, string resource, string stateName, State state); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string SendStatus( string site, DateTime timeStamp, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string SendStatus( string site, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description); string SendStatus( @@ -25,7 +31,9 @@ public interface IMonIn DateTime timeStamp, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description); string SendStatus( @@ -33,7 +41,9 @@ public interface IMonIn string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string SendStatus( string site, @@ -41,14 +51,18 @@ public interface IMonIn string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string SendStatus( string site, string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description); string SendStatus( @@ -57,7 +71,9 @@ public interface IMonIn string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description); string SendPerformanceMessage( diff --git a/Adaptation/Infineon/Monitoring/MonA/MonIn.cs b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs index e9ffce8..34f234d 100644 --- a/Adaptation/Infineon/Monitoring/MonA/MonIn.cs +++ b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs @@ -6,18 +6,28 @@ using System.Text; namespace Infineon.Monitoring.MonA; +#pragma warning disable CS0436 // The type 'IMonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\IMonIn.cs' conflicts with the imported type 'IMonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\IMonIn.cs'. public class MonIn : IMonIn, IDisposable +#pragma warning restore CS0436 // The type 'IMonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\IMonIn.cs' conflicts with the imported type 'IMonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\IMonIn.cs'. { private static readonly DateTime _Utc1970DateTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); public const string MonInUrl = "http://moninhttp.{0}.infineon.com/input/text"; +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. private static readonly Dictionary _Instances = new(); +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. +#pragma warning disable CS0436 // The type 'ExtWebClient' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs' conflicts with the imported type 'ExtWebClient' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs'. private readonly ExtWebClient _WebClient; +#pragma warning restore CS0436 // The type 'ExtWebClient' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs' conflicts with the imported type 'ExtWebClient' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs'. private readonly string _MonInUrl; private static CultureInfo _CultureInfo; +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text") +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. { +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. MonIn instance; +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. if (_Instances.ContainsKey(url)) { instance = _Instances[url]; @@ -28,7 +38,9 @@ public class MonIn : IMonIn, IDisposable { if (!_Instances.ContainsKey(url)) { +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. instance = new MonIn(url); +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. _Instances.Add(url, instance); } else @@ -40,7 +52,9 @@ public class MonIn : IMonIn, IDisposable private MonIn(string url) { +#pragma warning disable CS0436 // The type 'ExtWebClient' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs' conflicts with the imported type 'ExtWebClient' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs'. _WebClient = new ExtWebClient(); +#pragma warning restore CS0436 // The type 'ExtWebClient' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs' conflicts with the imported type 'ExtWebClient' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\ExtWebClient.cs'. _WebClient.Headers[HttpRequestHeader.ContentType] = "application/text"; _WebClient.Encoding = Encoding.UTF8; _CultureInfo = new CultureInfo("en-US"); @@ -53,20 +67,26 @@ public class MonIn : IMonIn, IDisposable _WebClient.Headers[HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password)); } +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. public string SendStatus(string site, string resource, string stateName, State state) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, string.Empty); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. public string SendStatus( string site, DateTime timeStamp, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, string.Empty); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. public string SendStatus( string site, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, description); public string SendStatus( @@ -74,7 +94,9 @@ public class MonIn : IMonIn, IDisposable DateTime timeStamp, string resource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, description); public string SendStatus( @@ -82,7 +104,9 @@ public class MonIn : IMonIn, IDisposable string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, string.Empty); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. public string SendStatus( string site, @@ -90,14 +114,18 @@ public class MonIn : IMonIn, IDisposable string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state) => SendStatus(site, new DateTime?(timeStamp), resource, subresource, stateName, state, string.Empty); +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. public string SendStatus( string site, string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, description); public string SendStatus( @@ -106,7 +134,9 @@ public class MonIn : IMonIn, IDisposable string resource, string subresource, string stateName, +#pragma warning disable CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. State state, +#pragma warning restore CS0436 // The type 'State' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs' conflicts with the imported type 'State' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\State.cs'. string description) { string statusMessage = CreateStatusMessage(site, timeStamp, resource, subresource, stateName, state.ToString(), description); @@ -276,7 +306,10 @@ public class MonIn : IMonIn, IDisposable public void Dispose() { +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. KeyValuePair keyValuePair = new(); +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. +#pragma warning disable CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. foreach (KeyValuePair instance in _Instances) { if (instance.Value == this) @@ -285,6 +318,7 @@ public class MonIn : IMonIn, IDisposable break; } } +#pragma warning restore CS0436 // The type 'MonIn' in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs' conflicts with the imported type 'MonIn' in 'Infineon.Monitoring.MonA, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\MET08THFTIRSTRATUS\06_SourceCode\MET08THFTIRSTRATUS\Adaptation\Infineon\Monitoring\MonA\MonIn.cs'. _ = _Instances.Remove(keyValuePair.Key); _WebClient?.Dispose(); } diff --git a/Adaptation/MET08THFTIRSTRATUS.Tests.csproj b/Adaptation/MET08THFTIRSTRATUS.Tests.csproj index 4bf27cf..1f22026 100644 --- a/Adaptation/MET08THFTIRSTRATUS.Tests.csproj +++ b/Adaptation/MET08THFTIRSTRATUS.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 06374d3..dd0c860 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.FileHandleWaitTime.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/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD4.cs index cdcdc6d..0b26e46 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD4.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD4.cs @@ -31,8 +31,7 @@ public class BIORAD4 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD4(testContext); + EAFLoggingUnitTesting ??= new BIORAD4(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD4 : 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.36.3/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD5.cs index 03ed3bf..95c3ca7 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD5.cs @@ -31,8 +31,7 @@ public class BIORAD5 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD5(testContext); + EAFLoggingUnitTesting ??= new BIORAD5(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD5 : 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.36.3/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRSTRATUS.cs index 59e0a3f..98f3031 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRSTRATUS.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRSTRATUS.cs @@ -31,8 +31,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08THFTIRSTRATUS(testContext); + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class MET08THFTIRSTRATUS : 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/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD4.cs index 2481e7f..24f56ba 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD4.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD4.cs @@ -31,8 +31,7 @@ public class BIORAD4 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD4(testContext); + EAFLoggingUnitTesting ??= new BIORAD4(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD4 : 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/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD5.cs index c6ede3d..eb93114 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD5.cs @@ -31,8 +31,7 @@ public class BIORAD5 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD5(testContext); + EAFLoggingUnitTesting ??= new BIORAD5(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD5 : 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/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRSTRATUS.cs index 5b411a3..2fe9b6c 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRSTRATUS.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRSTRATUS.cs @@ -31,8 +31,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08THFTIRSTRATUS(testContext); + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class MET08THFTIRSTRATUS : 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/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD4.cs index 486886a..bb5bc2e 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD4.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD4.cs @@ -31,8 +31,7 @@ public class BIORAD4 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD4(testContext); + EAFLoggingUnitTesting ??= new BIORAD4(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD4 : 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/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD5.cs index 4628f80..779c5e6 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/BIORAD5.cs @@ -31,8 +31,7 @@ public class BIORAD5 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD5(testContext); + EAFLoggingUnitTesting ??= new BIORAD5(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD5 : 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/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08THFTIRSTRATUS.cs index 791af76..78b225a 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08THFTIRSTRATUS.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/MET08THFTIRSTRATUS.cs @@ -31,8 +31,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08THFTIRSTRATUS(testContext); + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class MET08THFTIRSTRATUS : 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.0/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD4.cs index c9037b9..87ecef2 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD4.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD4.cs @@ -31,8 +31,7 @@ public class BIORAD4 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD4(testContext); + EAFLoggingUnitTesting ??= new BIORAD4(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD4 : 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.0/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD5.cs index 9edf9ce..d378f9a 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD5.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/BIORAD5.cs @@ -31,8 +31,7 @@ public class BIORAD5 : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new BIORAD5(testContext); + EAFLoggingUnitTesting ??= new BIORAD5(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class BIORAD5 : 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.0/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/MET08THFTIRSTRATUS.cs index 223579d..b3afbdc 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/MET08THFTIRSTRATUS.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.0/MET08THFTIRSTRATUS.cs @@ -31,8 +31,7 @@ public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting [ClassInitialize] public static void ClassInitialize(TestContext testContext) { - if (EAFLoggingUnitTesting is null) - EAFLoggingUnitTesting = new MET08THFTIRSTRATUS(testContext); + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext); EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); @@ -42,10 +41,8 @@ public class MET08THFTIRSTRATUS : 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/BIORAD4.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/BIORAD4.cs new file mode 100644 index 0000000..bdb8cf5 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/BIORAD4.cs @@ -0,0 +1,89 @@ +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 BIORAD4 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD4 EAFLoggingUnitTesting { get; private set; } + + public BIORAD4() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD4(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD4(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__txt() + { + string check = "*DataBioRad.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__Stratus() + { + string check = "CassetteDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__QS408M() + { + string check = "DetailDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/BIORAD5.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/BIORAD5.cs new file mode 100644 index 0000000..e6f77d7 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/BIORAD5.cs @@ -0,0 +1,89 @@ +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 BIORAD5 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static BIORAD5 EAFLoggingUnitTesting { get; private set; } + + public BIORAD5() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD5(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new BIORAD5(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__txt() + { + string check = "*DataBioRad.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__Stratus() + { + string check = "CassetteDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__QS408M() + { + string check = "DetailDataBioRad_*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08THFTIRSTRATUS.cs new file mode 100644 index 0000000..2f98541 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.47.1/MET08THFTIRSTRATUS.cs @@ -0,0 +1,178 @@ +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 MET08THFTIRSTRATUS : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; } + + public MET08THFTIRSTRATUS() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08THFTIRSTRATUS(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new MET08THFTIRSTRATUS(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__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/Extract/Staging/v2.47.0/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/Extract/Staging/v2.47.0/MET08THFTIRSTRATUS.cs index de28922..dfec57b 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.47.0/MET08THFTIRSTRATUS.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.47.0/MET08THFTIRSTRATUS.cs @@ -1,4 +1,7 @@ +using Adaptation._Tests.Shared; using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; namespace Adaptation._Tests.Extract.Staging.v2_47_0; @@ -42,6 +45,34 @@ public class MET08THFTIRSTRATUS [TestMethod] public void Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight(); +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Staging__v2_47_0__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + #if true [Ignore] #endif diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD4.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD4.cs new file mode 100644 index 0000000..5164fce --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD4.cs @@ -0,0 +1,172 @@ +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 BIORAD4 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.BIORAD4 _BIORAD4; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.BIORAD4.ClassInitialize(testContext); + _BIORAD4 = CreateSelfDescription.Staging.v2_47_1.BIORAD4.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__txt() => _BIORAD4.Staging__v2_47_1__BIORAD4__txt(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__txt637730081979221342__Normal() + { + string check = "*DataBioRad.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + + _ = Shared.AdaptationTesting.GetLogisticsColumnsAndBody(variables[2], variables[4]); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__txt637818036815840307__ProcessFailed() + { + string check = "*DataBioRad.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__txt637746296480404920__Failure() + { + string check = "*DataBioRad.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__Stratus() => _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__Stratus637730081979221342__RDS() + { + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.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__BIORAD4__Stratus637730081979221342__1TRDS() + { + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.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__BIORAD4__Stratus637733400573863329__ReactorAndRDS() + { + DateTime dateTime; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__Stratus637818036815840307__ProcessFailed() + { + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__QS408M() => _BIORAD4.Staging__v2_47_1__BIORAD4__QS408M(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD4__Stratus638010209430211312__MissingRecipe() + { + string check = "CassetteDataBioRad_*.txt"; + _BIORAD4.Staging__v2_47_1__BIORAD4__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + _ = fileRead.ReExtract(); + Shared.AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD5.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD5.cs new file mode 100644 index 0000000..b0eab23 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/BIORAD5.cs @@ -0,0 +1,104 @@ +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 BIORAD5 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.BIORAD5 _BIORAD5; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.BIORAD5.ClassInitialize(testContext); + _BIORAD5 = CreateSelfDescription.Staging.v2_47_1.BIORAD5.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__txt() => _BIORAD5.Staging__v2_47_1__BIORAD5__txt(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__txt637805172599370243__Why() + { + DateTime dateTime; + string check = "*DataBioRad.txt"; + _BIORAD5.Staging__v2_47_1__BIORAD5__txt(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__Stratus() => _BIORAD5.Staging__v2_47_1__BIORAD5__Stratus(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__Stratus637738592809956919__ReactorAndRDS() + { + DateTime dateTime; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD5.Staging__v2_47_1__BIORAD5__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__Stratus637805172599370243__Why() + { + DateTime dateTime; + string check = "CassetteDataBioRad_*.txt"; + _BIORAD5.Staging__v2_47_1__BIORAD5__Stratus(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD5.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _BIORAD5.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = FileHandlers.Stratus.ProcessData.GetDateTime(logistics, "11/24/21 08:39"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__BIORAD5__QS408M() => _BIORAD5.Staging__v2_47_1__BIORAD5__QS408M(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08THFTIRSTRATUS.cs b/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08THFTIRSTRATUS.cs new file mode 100644 index 0000000..4e00ac5 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.47.1/MET08THFTIRSTRATUS.cs @@ -0,0 +1,127 @@ +using Adaptation._Tests.Shared; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_47_1; + +[TestClass] +public class MET08THFTIRSTRATUS +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_47_1.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_47_1.MET08THFTIRSTRATUS.ClassInitialize(testContext); + _MET08THFTIRSTRATUS = CreateSelfDescription.Staging.v2_47_1.MET08THFTIRSTRATUS.EAFLoggingUnitTesting; + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__MoveMatchingFiles() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__MoveMatchingFiles(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewer(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__IQSSi() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__IQSSi(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight(); + + [Ignore] + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight638014829236768047__Normal() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight638015284160909324__WO() + { + string check = "*.pdsf"; + _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight(); + MethodBase method = new StackFrame().GetMethod(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(method, check); + _ = _MET08THFTIRSTRATUS.AdaptationTesting.Get(method, variables[2], variables[3], false).ReExtract(); + AdaptationTesting.UpdatePassDirectory(variables[2]); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight(); + string[] variables = _MET08THFTIRSTRATUS.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _MET08THFTIRSTRATUS.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsightMetrologyViewerAttachments(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__APC() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__APC(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__SPaCe() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__SPaCe(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__Processed() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__Processed(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__Archive() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__Archive(); + +#if true + [Ignore] +#endif + [TestMethod] + public void Staging__v2_47_1__MET08THFTIRSTRATUS__Dummy() => _MET08THFTIRSTRATUS.Staging__v2_47_1__MET08THFTIRSTRATUS__Dummy(); + +} \ 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/Stratus.cs b/Adaptation/_Tests/Static/Stratus.cs index 7291e88..0dc1629 100644 --- a/Adaptation/_Tests/Static/Stratus.cs +++ b/Adaptation/_Tests/Static/Stratus.cs @@ -27,19 +27,20 @@ public class Stratus : LoggingUnitTesting, IDisposable } [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - if (LoggingUnitTesting is null) - LoggingUnitTesting = new Stratus(testContext); - } + public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new Stratus(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("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); } [TestMethod] @@ -146,6 +147,13 @@ public class Stratus : LoggingUnitTesting, IDisposable Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); + descriptor = FileHandlers.Stratus.ProcessData.GetDescriptor("171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); + Assert.IsTrue(descriptor.RDS is "171308.1.51"); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); + Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } 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 462ff42..eb19841 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -1,22 +1,23 @@ { "scripts": { - "AA-CreateSelfDescription.Staging.v2_47_0-BIORAD4_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0 & ClassName~BIORAD4_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "AB-CreateSelfDescription.Staging.v2_47_0-BIORAD5_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0 & ClassName~BIORAD5_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "BA-CreateSelfDescription.Staging.v2_47_0-BIORAD4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0 & ClassName~BIORAD4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "BB-CreateSelfDescription.Staging.v2_47_0-BIORAD5": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0 & ClassName~BIORAD5\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "CA-CreateSelfDescription.Staging.v2_47_0-MET08THFTIRSTRATUS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0 & ClassName~MET08THFTIRSTRATUS\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "DA-CreateSelfDescription.Staging.v2_47_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "EA-Extract.Staging.v2_47_0-BIORAD4_EQPT-Staging__v2_47_0__BIORAD4_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4_EQPT & Name~Staging__v2_47_0__BIORAD4_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "EB-Extract.Staging.v2_47_0-BIORAD5_EQPT-Staging__v2_47_0__BIORAD5_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD5_EQPT & Name~Staging__v2_47_0__BIORAD5_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "FA-Extract.Staging.v2_47_0-BIORAD4-Staging__v2_47_0__BIORAD4__RsM643047560320000000__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4 & Name~Staging__v2_47_0__BIORAD4__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "FB-Extract.Staging.v2_47_0-BIORAD5-Staging__v2_47_0__BIORAD5__RsM643047560320000000__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD5 & Name~Staging__v2_47_0__BIORAD5__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "GA-Extract.Staging.v2_47_0-MET08THFTIRSTRATUS-Staging__v2_47_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~MET08THFTIRSTRATUS & Name~Staging__v2_47_0__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "HA-Extract.Staging.v2_47_0-BIORAD4-Staging__v2_47_0__BIORAD4__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4 & Name~Staging__v2_47_0__BIORAD4__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "IA-Extract.Staging.v2_47_0-BIORAD5-Staging__v2_47_0__BIORAD5__txt637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD5 & Name~Staging__v2_47_0__BIORAD5__txt637805172599370243__Why\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "IB-Extract.Staging.v2_47_0-BIORAD5-Staging__v2_47_0__BIORAD5__Stratus637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD5 & Name~Staging__v2_47_0__BIORAD5__Stratus637805172599370243__Why\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "IC-Extract.Staging.v2_47_0-BIORAD4-Staging__v2_47_0__BIORAD4__txt637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4 & Name~Staging__v2_47_0__BIORAD4__txt637818036815840307__ProcessFailed\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "ID-Extract.Staging.v2_47_0-BIORAD4-Staging__v2_47_0__BIORAD4__Stratus637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4 & Name~Staging__v2_47_0__BIORAD4__Stratus637818036815840307__ProcessFailed\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", - "IE-Extract.Staging.v2_47_0-BIORAD4-Staging__v2_47_0__BIORAD4__Stratus638010209430211312__MissingRecipe": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_0 & ClassName~BIORAD4 & Name~Staging__v2_47_0__BIORAD4__Stratus638010209430211312__MissingRecipe\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AA-CreateSelfDescription.Staging.v2_47_1-BIORAD4_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~BIORAD4_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AB-CreateSelfDescription.Staging.v2_47_1-BIORAD5_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~BIORAD5_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BA-CreateSelfDescription.Staging.v2_47_1-BIORAD4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~BIORAD4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BB-CreateSelfDescription.Staging.v2_47_1-BIORAD5": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~BIORAD5\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "CA-CreateSelfDescription.Staging.v2_47_1-MET08THFTIRSTRATUS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1 & ClassName~MET08THFTIRSTRATUS\" -- 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-BIORAD4_EQPT-Staging__v2_47_1__BIORAD4_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4_EQPT & Name~Staging__v2_47_1__BIORAD4_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EB-Extract.Staging.v2_47_1-BIORAD5_EQPT-Staging__v2_47_1__BIORAD5_EQPT__DownloadRsMFile637953072332628623__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD5_EQPT & Name~Staging__v2_47_1__BIORAD5_EQPT__DownloadRsMFile637953072332628623__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FA-Extract.Staging.v2_47_1-BIORAD4-Staging__v2_47_1__BIORAD4__RsM643047560320000000__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4 & Name~Staging__v2_47_1__BIORAD4__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FB-Extract.Staging.v2_47_1-BIORAD5-Staging__v2_47_1__BIORAD5__RsM643047560320000000__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD5 & Name~Staging__v2_47_1__BIORAD5__RsM643047560320000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "GA-Extract.Staging.v2_47_1-MET08THFTIRSTRATUS-Staging__v2_47_1__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~MET08THFTIRSTRATUS & Name~Staging__v2_47_1__MET08THFTIRSTRATUS__MET08THFTIRSTRATUS___637745411457972777__First\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "HA-Extract.Staging.v2_47_1-BIORAD4-Staging__v2_47_1__BIORAD4__pcl637812984345592512__MinFileLength": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4 & Name~Staging__v2_47_1__BIORAD4__pcl637812984345592512__MinFileLength\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "HB-Extract.Staging.v2_47_1-MET08THFTIRSTRATUS-Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~MET08THFTIRSTRATUS & Name~Staging__v2_47_1__MET08THFTIRSTRATUS__OpenInsight638054540026319596__IqsSql\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "IA-Extract.Staging.v2_47_1-BIORAD5-Staging__v2_47_1__BIORAD5__txt637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD5 & Name~Staging__v2_47_1__BIORAD5__txt637805172599370243__Why\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "IB-Extract.Staging.v2_47_1-BIORAD5-Staging__v2_47_1__BIORAD5__Stratus637805172599370243__Why": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD5 & Name~Staging__v2_47_1__BIORAD5__Stratus637805172599370243__Why\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "IC-Extract.Staging.v2_47_1-BIORAD4-Staging__v2_47_1__BIORAD4__txt637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4 & Name~Staging__v2_47_1__BIORAD4__txt637818036815840307__ProcessFailed\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "ID-Extract.Staging.v2_47_1-BIORAD4-Staging__v2_47_1__BIORAD4__Stratus637818036815840307__ProcessFailed": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4 & Name~Staging__v2_47_1__BIORAD4__Stratus637818036815840307__ProcessFailed\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "IE-Extract.Staging.v2_47_1-BIORAD4-Staging__v2_47_1__BIORAD4__Stratus638010209430211312__MissingRecipe": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~BIORAD4 & Name~Staging__v2_47_1__BIORAD4__Stratus638010209430211312__MissingRecipe\" -- 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/FileHandlers/FileRead.cs b/FileHandlers/FileRead.cs index 103c3b5..8ce7e5e 100644 --- a/FileHandlers/FileRead.cs +++ b/FileHandlers/FileRead.cs @@ -107,8 +107,7 @@ public partial class FileRead : FileReaderHandler, ISMTP private void Send(EmailMessage emailMessage) { ISmtp smtp = Backbone.Instance.GetBackboneComponentsOfType().SingleOrDefault(); - if (smtp is not null) - smtp.Send(emailMessage); + smtp?.Send(emailMessage); } void ISMTP.SendLowPriorityEmailMessage(string subject, string body) @@ -212,14 +211,12 @@ public partial class FileRead : FileReaderHandler, ISMTP { if (isErrorFile) { - if (_FilePathGeneratorForError is null) - _FilePathGeneratorForError = new FilePathGenerator(Configuration, reportFullPath, isErrorFile: true); + _FilePathGeneratorForError ??= new FilePathGenerator(Configuration, reportFullPath, isErrorFile: true); filePathGeneratorOriginal = _FilePathGeneratorForError; } else { - if (_FilePathGeneratorForTarget is null) - _FilePathGeneratorForTarget = new FilePathGenerator(Configuration, reportFullPath, isErrorFile: false); + _FilePathGeneratorForTarget ??= new FilePathGenerator(Configuration, reportFullPath, isErrorFile: false); filePathGeneratorOriginal = _FilePathGeneratorForTarget; } result = new FilePathGeneratorInfo(filePathGeneratorOriginal, reportFullPath, isErrorFile, FileParameter); diff --git a/MET08THFTIRSTRATUS.csproj b/MET08THFTIRSTRATUS.csproj index 7512c40..248e546 100644 --- a/MET08THFTIRSTRATUS.csproj +++ b/MET08THFTIRSTRATUS.csproj @@ -106,6 +106,7 @@ + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 45b4596..9786eef 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")] \ No newline at end of file diff --git a/Shared/FilePathGenerator.cs b/Shared/FilePathGenerator.cs index da97777..59736be 100644 --- a/Shared/FilePathGenerator.cs +++ b/Shared/FilePathGenerator.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; using Ifx.Eaf.EquipmentConnector.File.Component; using Ifx.Eaf.EquipmentConnector.File.Configuration; +using System.Collections.Generic; namespace Shared; @@ -17,4 +17,4 @@ public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FileP public string GetSubFolderPath() => SubFolderPath; -} +} \ No newline at end of file diff --git a/Shared/FilePathGeneratorInfo.cs b/Shared/FilePathGeneratorInfo.cs index 8d5e287..a1b73b8 100644 --- a/Shared/FilePathGeneratorInfo.cs +++ b/Shared/FilePathGeneratorInfo.cs @@ -60,4 +60,4 @@ public class FilePathGeneratorInfo } } -} +} \ No newline at end of file diff --git a/Shared/Mapper.cs b/Shared/Mapper.cs index fe5c923..33cfa85 100644 --- a/Shared/Mapper.cs +++ b/Shared/Mapper.cs @@ -1,6 +1,6 @@ -using System.Collections.Generic; using Eaf.Management.ConfigurationData.CellAutomation; using Ifx.Eaf.EquipmentConnector.File.Configuration; +using System.Collections.Generic; namespace Shared; @@ -71,4 +71,4 @@ public static class Mapper return results; } -} +} \ No newline at end of file