Compare commits
	
		
			2 Commits
		
	
	
		
			5e1e8f2364
			...
			2b21f30797
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2b21f30797 | |||
| dd342eb236 | 
							
								
								
									
										2
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							| @ -4,7 +4,7 @@ | |||||||
|       "name": ".NET Core Attach", |       "name": ".NET Core Attach", | ||||||
|       "type": "coreclr", |       "type": "coreclr", | ||||||
|       "request": "attach", |       "request": "attach", | ||||||
|       "processId": 6456 |       "processId": 21452 | ||||||
|     } |     } | ||||||
|   ] |   ] | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							| @ -86,6 +86,18 @@ | |||||||
|             ], |             ], | ||||||
|             "problemMatcher": "$msCompile" |             "problemMatcher": "$msCompile" | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |             "label": "Project", | ||||||
|  |             "type": "shell", | ||||||
|  |             "command": "code ../MET08RESIMAPCDE.csproj", | ||||||
|  |             "problemMatcher": [] | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |             "label": "Git Config", | ||||||
|  |             "type": "shell", | ||||||
|  |             "command": "code ../.git/config", | ||||||
|  |             "problemMatcher": [] | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|             "label": "Kanbn Console", |             "label": "Kanbn Console", | ||||||
|             "type": "npm", |             "type": "npm", | ||||||
|  | |||||||
| @ -22,7 +22,6 @@ public class CellInstanceConnectionName | |||||||
|             nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|             nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|             nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|             nameof(txt) => new txt.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |  | ||||||
|             nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|             nameof(RsM) => new RsM.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(RsM) => new RsM.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|             nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), |             nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), | ||||||
|  | |||||||
| @ -113,11 +113,11 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         return results; |         return results; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     internal static string GetLines(Logistics logistics, List<txt.Description> descriptions) |     internal static string GetLines(Logistics logistics, List<RsM.Description> descriptions) | ||||||
|     { |     { | ||||||
|         StringBuilder results = new(); |         StringBuilder results = new(); | ||||||
|         char del = '\t'; |         char del = '\t'; | ||||||
|         txt.Description x = descriptions[0]; |         RsM.Description x = descriptions[0]; | ||||||
|         _ = results.Append(x.UniqueId).Append(del). |         _ = results.Append(x.UniqueId).Append(del). | ||||||
|             Append(x.Run).Append(del). |             Append(x.Run).Append(del). | ||||||
|             Append(x.Date).Append(del). |             Append(x.Date).Append(del). | ||||||
| @ -140,7 +140,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|             Append(x.Avg).Append(del). |             Append(x.Avg).Append(del). | ||||||
|             Append(x.StdDev).Append(del). |             Append(x.StdDev).Append(del). | ||||||
|             Append(x.SemiRadial); |             Append(x.SemiRadial); | ||||||
|         foreach (txt.Description description in descriptions) |         foreach (RsM.Description description in descriptions) | ||||||
|             _ = results.Append(del).Append(description.Pt). |             _ = results.Append(del).Append(description.Pt). | ||||||
|                         Append(del).Append(description.R). |                         Append(del).Append(description.R). | ||||||
|                         Append(del).Append(description.T). |                         Append(del).Append(description.T). | ||||||
| @ -149,7 +149,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         return results.ToString(); |         return results.ToString(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<txt.Description> descriptions, Test[] tests) |     private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<RsM.Description> descriptions, Test[] tests) | ||||||
|     { |     { | ||||||
|         bool isDummyRun = false; |         bool isDummyRun = false; | ||||||
|         List<(Shared.Properties.IScopeInfo, string)> collection = new(); |         List<(Shared.Properties.IScopeInfo, string)> collection = new(); | ||||||
| @ -204,7 +204,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         _Logistics = new Logistics(reportFullPath, pdsf.Item1); |         _Logistics = new Logistics(reportFullPath, pdsf.Item1); | ||||||
|         SetFileParameterLotIDToLogisticsMID(); |         SetFileParameterLotIDToLogisticsMID(); | ||||||
|         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); |         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); | ||||||
|         List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements); |         List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements); | ||||||
|         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); |         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); | ||||||
|         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) |         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) | ||||||
|             SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests); |             SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests); | ||||||
|  | |||||||
| @ -128,7 +128,7 @@ public class FromIQS | |||||||
|         return string.Join(Environment.NewLine, results); |         return string.Join(Environment.NewLine, results); | ||||||
|     } // cSpell:restore |     } // cSpell:restore | ||||||
|  |  | ||||||
|     private static string GetCommandText(Logistics logistics, txt.Description description, string dateTime, long? subGroupId) |     private static string GetCommandText(Logistics logistics, RsM.Description description, string dateTime, long? subGroupId) | ||||||
|     { // cSpell:disable |     { // cSpell:disable | ||||||
|         List<string> results = new(); |         List<string> results = new(); | ||||||
|         results.Add(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val "); |         results.Add(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val "); | ||||||
| @ -251,14 +251,14 @@ public class FromIQS | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, txt.Description description, long breakAfter, long preWait) |     internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, RsM.Description description, long breakAfter, long preWait) | ||||||
|     { |     { | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         int? count = null; |         int? count = null; | ||||||
|         string commandText; |         string commandText; | ||||||
|         long? result = null; |         long? result = null; | ||||||
|         StringBuilder stringBuilder; |         StringBuilder stringBuilder; | ||||||
|         string dateFormat = txt.Description.GetDateFormat(); |         string dateFormat = RsM.Description.GetDateFormat(); | ||||||
|         if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) |         if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) | ||||||
|             dateTime = dateTimeParsed; |             dateTime = dateTimeParsed; | ||||||
|         else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed)) |         else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed)) | ||||||
| @ -325,7 +325,7 @@ public class FromIQS | |||||||
|         return new(result, count, commandText); |         return new(result, count, commandText); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private static string GetJson(Logistics logistics, string logisticLines, txt.Description description) |     private static string GetJson(Logistics logistics, string logisticLines, RsM.Description description) | ||||||
|     { |     { | ||||||
|         string result; |         string result; | ||||||
|         StringBuilder stringBuilder = new(); |         StringBuilder stringBuilder = new(); | ||||||
| @ -376,7 +376,7 @@ public class FromIQS | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, string logisticLines, txt.Description description, string lines, long? subGroupId, string weekOfYear) |     internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, string logisticLines, RsM.Description description, string lines, long? subGroupId, string weekOfYear) | ||||||
|     { |     { | ||||||
|         string checkFile; |         string checkFile; | ||||||
|         string fileName = Path.GetFileName(reportFullPath); |         string fileName = Path.GetFileName(reportFullPath); | ||||||
|  | |||||||
| @ -110,7 +110,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         return results; |         return results; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void SendData(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions) |     private void SendData(string reportFullPath, DateTime dateTime, List<RsM.Description> descriptions) | ||||||
|     { |     { | ||||||
|         string checkDirectory; |         string checkDirectory; | ||||||
|         WSRequest wsRequest = new(this, _Logistics, descriptions); |         WSRequest wsRequest = new(this, _Logistics, descriptions); | ||||||
| @ -143,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         _Logistics = new Logistics(reportFullPath, pdsf.Item1); |         _Logistics = new Logistics(reportFullPath, pdsf.Item1); | ||||||
|         SetFileParameterLotIDToLogisticsMID(); |         SetFileParameterLotIDToLogisticsMID(); | ||||||
|         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); |         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); | ||||||
|         List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements); |         List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements); | ||||||
|         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); |         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); | ||||||
|         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) |         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) | ||||||
|             SendData(reportFullPath, dateTime, descriptions); |             SendData(reportFullPath, dateTime, descriptions); | ||||||
|  | |||||||
| @ -41,18 +41,18 @@ public class WSRequest | |||||||
|     public string Temp { get; set; } |     public string Temp { get; set; } | ||||||
|     public string UniqueId { get; set; } |     public string UniqueId { get; set; } | ||||||
|     public string Zone { get; set; } |     public string Zone { get; set; } | ||||||
|     public List<txt.Detail> Details { get; protected set; } |     public List<RsM.Detail> Details { get; protected set; } | ||||||
|  |  | ||||||
|     [Obsolete("For json")] public WSRequest() { } |     [Obsolete("For json")] public WSRequest() { } | ||||||
|  |  | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
|     internal WSRequest(IFileRead fileRead, Logistics logistics, List<txt.Description> descriptions, string processDataStandardFormat = null) |     internal WSRequest(IFileRead fileRead, Logistics logistics, List<RsM.Description> descriptions, string processDataStandardFormat = null) | ||||||
| #pragma warning restore IDE0060 | #pragma warning restore IDE0060 | ||||||
|     { |     { | ||||||
|         Id = -1; |         Id = -1; | ||||||
|         CellName = logistics.MesEntity; |         CellName = logistics.MesEntity; | ||||||
|         Details = new List<txt.Detail>(); |         Details = new List<RsM.Detail>(); | ||||||
|         if (descriptions[0] is not txt.Description x) |         if (descriptions[0] is not RsM.Description x) | ||||||
|             throw new Exception(); |             throw new Exception(); | ||||||
|         //Header |         //Header | ||||||
|         { |         { | ||||||
| @ -80,10 +80,10 @@ public class WSRequest | |||||||
|             UniqueId = x.UniqueId; |             UniqueId = x.UniqueId; | ||||||
|             Zone = x.Zone; |             Zone = x.Zone; | ||||||
|         } |         } | ||||||
|         txt.Detail detail; |         RsM.Detail detail; | ||||||
|         foreach (txt.Description description in descriptions) |         foreach (RsM.Description description in descriptions) | ||||||
|         { |         { | ||||||
|             detail = new txt.Detail |             detail = new RsM.Detail | ||||||
|             { |             { | ||||||
|                 HeaderUniqueId = description.HeaderUniqueId, |                 HeaderUniqueId = description.HeaderUniqueId, | ||||||
|                 Merit = description.Merit, |                 Merit = description.Merit, | ||||||
| @ -102,7 +102,7 @@ public class WSRequest | |||||||
|         FilePath = onlyWSRequest; |         FilePath = onlyWSRequest; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List<txt.Description> descriptions) |     internal static long GetHeaderId(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, string openInsightMetrologyViewerFileShare, int weekOfYear, string json, List<RsM.Description> descriptions) | ||||||
|     { |     { | ||||||
|         long result; |         long result; | ||||||
|         if (string.IsNullOrEmpty(json)) |         if (string.IsNullOrEmpty(json)) | ||||||
| @ -119,7 +119,7 @@ public class WSRequest | |||||||
|     } |     } | ||||||
|  |  | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
|     internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, List<txt.Description> descriptions, string matchDirectory, string subGroupId, long headerId, string headerIdDirectory) |     internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, List<RsM.Description> descriptions, string matchDirectory, string subGroupId, long headerId, string headerIdDirectory) | ||||||
| #pragma warning restore IDE0060 | #pragma warning restore IDE0060 | ||||||
|     { |     { | ||||||
|         string[] txtFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly); |         string[] txtFiles = Directory.GetFiles(matchDirectory, "*.txt", SearchOption.TopDirectoryOnly); | ||||||
|  | |||||||
| @ -135,7 +135,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void PostOpenInsightMetrologyViewerAttachments(List<txt.Description> descriptions) |     private void PostOpenInsightMetrologyViewerAttachments(List<RsM.Description> descriptions) | ||||||
|     { |     { | ||||||
|         string? json; |         string? json; | ||||||
|         string? subGroupId; |         string? subGroupId; | ||||||
| @ -172,7 +172,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         _Logistics = new Logistics(reportFullPath, pdsf.Item1); |         _Logistics = new Logistics(reportFullPath, pdsf.Item1); | ||||||
|         SetFileParameterLotIDToLogisticsMID(); |         SetFileParameterLotIDToLogisticsMID(); | ||||||
|         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); |         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); | ||||||
|         List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements); |         List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements); | ||||||
|         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); |         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); | ||||||
|         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) |         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) | ||||||
|             PostOpenInsightMetrologyViewerAttachments(descriptions); |             PostOpenInsightMetrologyViewerAttachments(descriptions); | ||||||
|  | |||||||
| @ -108,7 +108,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         return results; |         return results; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void DirectoryMove(string reportFullPath, DateTime dateTime, List<txt.Description> descriptions) |     private void DirectoryMove(string reportFullPath, DateTime dateTime, List<RsM.Description> descriptions) | ||||||
|     { |     { | ||||||
|         if (dateTime == DateTime.MinValue) |         if (dateTime == DateTime.MinValue) | ||||||
|             throw new ArgumentNullException(nameof(dateTime)); |             throw new ArgumentNullException(nameof(dateTime)); | ||||||
| @ -143,7 +143,7 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|         _Logistics = new Logistics(reportFullPath, pdsf.Item1); |         _Logistics = new Logistics(reportFullPath, pdsf.Item1); | ||||||
|         SetFileParameterLotIDToLogisticsMID(); |         SetFileParameterLotIDToLogisticsMID(); | ||||||
|         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); |         JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); | ||||||
|         List<txt.Description> descriptions = txt.ProcessData.GetDescriptions(jsonElements); |         List<RsM.Description> descriptions = RsM.ProcessData.GetDescriptions(jsonElements); | ||||||
|         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); |         Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); | ||||||
|         results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); |         results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>()); | ||||||
|         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) |         if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) | ||||||
|  | |||||||
| @ -1,135 +0,0 @@ | |||||||
| using Adaptation.Shared; |  | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Collections.ObjectModel; |  | ||||||
| using System.IO; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Text.Json; |  | ||||||
| using System.Text.Json.Serialization; |  | ||||||
|  |  | ||||||
| namespace Adaptation.FileHandlers.RsM; |  | ||||||
|  |  | ||||||
| #nullable enable |  | ||||||
|  |  | ||||||
| internal class Complete |  | ||||||
| { |  | ||||||
|     public Complete(Line1 line1, Line2 line2, Line3 line3, Line4 line4, Line4B line4B, Line5 line5, Line6 line6, Line7 line7, Line8 line8, Line9 line9, Line10 line10, Line11 line11, Line12 line12, Line13 line13, Point[] points) |  | ||||||
|     { |  | ||||||
|         Line1 = line1; |  | ||||||
|         Line2 = line2; |  | ||||||
|         Line3 = line3; |  | ||||||
|         Line4 = line4; |  | ||||||
|         Line4B = line4B; |  | ||||||
|         Line5 = line5; |  | ||||||
|         Line6 = line6; |  | ||||||
|         Line7 = line7; |  | ||||||
|         Line8 = line8; |  | ||||||
|         Line9 = line9; |  | ||||||
|         Line10 = line10; |  | ||||||
|         Line11 = line11; |  | ||||||
|         Line12 = line12; |  | ||||||
|         Line13 = line13; |  | ||||||
|         Points = points; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public Line1 Line1 { get; } |  | ||||||
|     public Line2 Line2 { get; } |  | ||||||
|     public Line3 Line3 { get; } |  | ||||||
|     public Line4 Line4 { get; } |  | ||||||
|     public Line4B Line4B { get; } |  | ||||||
|     public Line5 Line5 { get; } |  | ||||||
|     public Line6 Line6 { get; } |  | ||||||
|     public Line7 Line7 { get; } |  | ||||||
|     public Line8 Line8 { get; } |  | ||||||
|     public Line9 Line9 { get; } |  | ||||||
|     public Line10 Line10 { get; } |  | ||||||
|     public Line11 Line11 { get; } |  | ||||||
|     public Line12 Line12 { get; } |  | ||||||
|     public Line13 Line13 { get; } |  | ||||||
|     public Point[] Points { get; } |  | ||||||
|  |  | ||||||
|     internal static ReadOnlyCollection<string> GetCollection(string[] segments) |  | ||||||
|     { |  | ||||||
|         List<string> results = new(); |  | ||||||
|         foreach (string segment in segments) |  | ||||||
|         { |  | ||||||
|             if (segment[0] == ',') |  | ||||||
|                 break; |  | ||||||
|             results.Add(segment); |  | ||||||
|         } |  | ||||||
|         return new(results); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     internal static Complete? Get(Logistics logistics, List<FileInfo> fileInfoCollection) |  | ||||||
|     { |  | ||||||
|         Complete? result; |  | ||||||
|         int take = 14; |  | ||||||
|         string[] lines = File.ReadAllLines(logistics.ReportFullPath); |  | ||||||
|         ReadOnlyCollection<string> collection = new(lines); |  | ||||||
|         if (collection.Count > take) |  | ||||||
|             result = null; |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             if (collection.Count < take) |  | ||||||
|                 result = null; |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 string[] separator = new string[] { " ", "\t" }; |  | ||||||
|                 // <Title> |  | ||||||
|                 Line1 line1 = Line1.Get(collection[0].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                 // <FileName, Proj,Rcpe, LotID,WfrID, Is_TF_DataFile> |  | ||||||
|                 Line2 line2 = Line2.Get(collection[1].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                 // <Directory> |  | ||||||
|                 Line3 line3 = Line3.Get(collection[2].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                 // <DateTime,Temp,TCR%,N|P> |  | ||||||
|                 Line4 line4 = Line4.Get(collection[3].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                 // <Avg,Dev,Min,Max> |  | ||||||
|                 Line4B? line4B = Line4B.Get(collection[3].Split(new string[] { ">" }, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                 if (line4B is null) |  | ||||||
|                     result = null; |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     // <Operator, Epuipment> |  | ||||||
|                     Line5 line5 = Line5.Get(collection[4].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <Engineer> |  | ||||||
|                     Line6 line6 = Line6.Get(collection[5].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <AreaOrDiamScan, WaferShape, dNBand,  TemplateFile,  xsize,ysize, CalibFactor, MsmtMode,  DataType,  DataUnit> |  | ||||||
|                     Line7 line7 = Line7.Get(collection[6].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts,  Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold, PrbChg#, PrbName> |  | ||||||
|                     Line8 line8 = Line8.Get(collection[7].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <WaferSize,EdgeEx, x,yll, x,yur, #x,y, CutCorners> |  | ||||||
|                     Line9 line9 = Line9.Get(collection[8].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <Diam: ThScan Start End Step> |  | ||||||
|                     Line10 line10 = Line10.Get(collection[9].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <FlatOrNotch FollowMajorFlat AutoOrManualLoad RangeOrIndvdual PauseAfterEveryRun, AutoPrint,Plot, BulkSmplThk & Unit> |  | ||||||
|                     Line11 line11 = Line11.Get(collection[10].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <RangeFrom, RangeTo> |  | ||||||
|                     Line12 line12 = Line12.Get(collection[11].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <CassSlotSelected> |  | ||||||
|                     Line13 line13 = Line13.Get(collection[12].Split(separator, StringSplitOptions.RemoveEmptyEntries)); |  | ||||||
|                     // <R,Th,Data, Rs,RsA,RsB, #Smpl, x,y, Irng,Vrng, ChiSq,merit/GOF, DataIntegrity> |  | ||||||
|                     ReadOnlyCollection<Point> points = Point.Get(take, collection, separator); |  | ||||||
|                     if (points.Count == 0) |  | ||||||
|                         result = null; |  | ||||||
|                     else |  | ||||||
|                     { |  | ||||||
|                         result = new(line1, line2, line3, line4, line4B, line5, line6, line7, line8, line9, line10, line11, line12, line13, points.ToArray()); |  | ||||||
|                         FileInfo fileInfo = new($"{logistics.ReportFullPath}.json"); |  | ||||||
|                         string json = JsonSerializer.Serialize(result, CompleteSourceGenerationContext.Default.Complete); |  | ||||||
|                         File.WriteAllText(fileInfo.FullName, json); |  | ||||||
|                         File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence); |  | ||||||
|                         fileInfoCollection.Add(fileInfo); |  | ||||||
|                     } |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
|  |  | ||||||
| [JsonSourceGenerationOptions(WriteIndented = true)] |  | ||||||
| [JsonSerializable(typeof(Complete))] |  | ||||||
| internal partial class CompleteSourceGenerationContext : JsonSerializerContext |  | ||||||
| { |  | ||||||
| } |  | ||||||
| @ -108,10 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead | |||||||
|             results.Item4.Add(_Logistics.FileInfo); |             results.Item4.Add(_Logistics.FileInfo); | ||||||
|         else |         else | ||||||
|         { |         { | ||||||
|             Complete? complete = Complete.Get(_Logistics, results.Item4); |             Run? run = Run.Get(_Logistics, results.Item4); | ||||||
|             if (complete is null) |             if (run is null) | ||||||
|                 throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); |                 throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); | ||||||
|             IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, complete); |             IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, run); | ||||||
|             if (iProcessData is not ProcessData processData) |             if (iProcessData is not ProcessData processData) | ||||||
|                 throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks)); |                 throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks)); | ||||||
|             string mid; |             string mid; | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ internal record Line1 | |||||||
|     internal static Line1 Get(string[] segments) |     internal static Line1 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line1 result; |         Line1 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0]); |         result = new(collection.Count < 1 ? string.Empty : collection[0]); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -23,7 +23,7 @@ internal record Line10 | |||||||
|     internal static Line10 Get(string[] segments) |     internal static Line10 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line10 result; |         Line10 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -33,7 +33,7 @@ internal record Line11 | |||||||
|     internal static Line11 Get(string[] segments) |     internal static Line11 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line11 result; |         Line11 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ internal record Line12 | |||||||
|     internal static Line12 Get(string[] segments) |     internal static Line12 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line12 result; |         Line12 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1]); |                      collection.Count < 2 ? string.Empty : collection[1]); | ||||||
|         return result; |         return result; | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ internal record Line13 | |||||||
|     internal static Line13 Get(string[] segments) |     internal static Line13 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line13 result; |         Line13 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0]); |         result = new(collection.Count < 1 ? string.Empty : collection[0]); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ internal record Line2 | |||||||
|     internal static Line2 Get(string[] segments) |     internal static Line2 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line2 result; |         Line2 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ internal record Line3 | |||||||
|     internal static Line3 Get(string[] segments) |     internal static Line3 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line3 result; |         Line3 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0]); |         result = new(collection.Count < 1 ? string.Empty : collection[0]); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ internal record Line4 | |||||||
|     internal static Line4 Get(string[] segments) |     internal static Line4 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line4 result; |         Line4 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ internal record Line5 | |||||||
|     internal static Line5 Get(string[] segments) |     internal static Line5 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line5 result; |         Line5 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1]); |                      collection.Count < 2 ? string.Empty : collection[1]); | ||||||
|         return result; |         return result; | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ internal record Line6 | |||||||
|     internal static Line6 Get(string[] segments) |     internal static Line6 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line6 result; |         Line6 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0]); |         result = new(collection.Count < 1 ? string.Empty : collection[0]); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -35,7 +35,7 @@ internal record Line7 | |||||||
|     internal static Line7 Get(string[] segments) |     internal static Line7 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line7 result; |         Line7 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -35,7 +35,7 @@ internal record Line8 | |||||||
|     internal static Line8 Get(string[] segments) |     internal static Line8 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line8 result; |         Line8 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -33,7 +33,7 @@ internal class Line9 | |||||||
|     internal static Line9 Get(string[] segments) |     internal static Line9 Get(string[] segments) | ||||||
|     { |     { | ||||||
|         Line9 result; |         Line9 result; | ||||||
|         ReadOnlyCollection<string> collection = Complete.GetCollection(segments); |         ReadOnlyCollection<string> collection = Run.GetCollection(segments); | ||||||
|         result = new(collection.Count < 1 ? string.Empty : collection[0], |         result = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                      collection.Count < 2 ? string.Empty : collection[1], |                      collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                      collection.Count < 3 ? string.Empty : collection[2], |                      collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -53,7 +53,7 @@ internal record Point | |||||||
|             if (string.IsNullOrEmpty(lines[i])) |             if (string.IsNullOrEmpty(lines[i])) | ||||||
|                 break; |                 break; | ||||||
|             segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); |             segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); | ||||||
|             collection = Complete.GetCollection(segments); |             collection = Run.GetCollection(segments); | ||||||
|             point = new(collection.Count < 1 ? string.Empty : collection[0], |             point = new(collection.Count < 1 ? string.Empty : collection[0], | ||||||
|                         collection.Count < 2 ? string.Empty : collection[1], |                         collection.Count < 2 ? string.Empty : collection[1], | ||||||
|                         collection.Count < 3 ? string.Empty : collection[2], |                         collection.Count < 3 ? string.Empty : collection[2], | ||||||
|  | |||||||
| @ -53,13 +53,13 @@ public class ProcessData : IProcessData | |||||||
|     private readonly ILog _Log; |     private readonly ILog _Log; | ||||||
|     List<object> Shared.Properties.IProcessData.Details => _Details; |     List<object> Shared.Properties.IProcessData.Details => _Details; | ||||||
|  |  | ||||||
|     internal ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, Complete complete) |     internal ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, Run run) | ||||||
|     { |     { | ||||||
|         JobID = logistics.JobID; |         JobID = logistics.JobID; | ||||||
|         _Details = new List<object>(); |         _Details = new List<object>(); | ||||||
|         MesEntity = logistics.MesEntity; |         MesEntity = logistics.MesEntity; | ||||||
|         _Log = LogManager.GetLogger(typeof(ProcessData)); |         _Log = LogManager.GetLogger(typeof(ProcessData)); | ||||||
|         Parse(fileRead, logistics, fileInfoCollection, complete); |         Parse(fileRead, logistics, fileInfoCollection, run); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); |     string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); | ||||||
| @ -215,10 +215,10 @@ public class ProcessData : IProcessData | |||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void SetTitleData(Logistics logistics, Complete complete) |     private void SetTitleData(Logistics logistics, Run run) | ||||||
|     { |     { | ||||||
|         string timeFormat = "yyyyMMddHHmmss"; |         string timeFormat = "yyyyMMddHHmmss"; | ||||||
|         Descriptor descriptor = GetDescriptor(complete.Line1.Title); |         Descriptor descriptor = GetDescriptor(run.Line1.Title); | ||||||
|         PSN = descriptor.PSN; |         PSN = descriptor.PSN; | ||||||
|         RDS = descriptor.RDS; |         RDS = descriptor.RDS; | ||||||
|         Run = descriptor.Run; |         Run = descriptor.Run; | ||||||
| @ -321,7 +321,7 @@ public class ProcessData : IProcessData | |||||||
|  |  | ||||||
| #nullable enable | #nullable enable | ||||||
|  |  | ||||||
|     private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, Complete complete) |     private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, Run run) | ||||||
|     { |     { | ||||||
|         if (fileRead is null) |         if (fileRead is null) | ||||||
|             throw new ArgumentNullException(nameof(fileRead)); |             throw new ArgumentNullException(nameof(fileRead)); | ||||||
| @ -334,7 +334,7 @@ public class ProcessData : IProcessData | |||||||
|         { |         { | ||||||
|             segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); |             segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); | ||||||
|             if (lines[i].Contains("<Title>") && segments.Length > 0) |             if (lines[i].Contains("<Title>") && segments.Length > 0) | ||||||
|                 SetTitleData(logistics, complete); |                 SetTitleData(logistics, run); | ||||||
|             else if (lines[i].Contains("<FileName, Proj,Rcpe, LotID,WfrID")) |             else if (lines[i].Contains("<FileName, Proj,Rcpe, LotID,WfrID")) | ||||||
|                 SetFileNameData(segments); |                 SetFileNameData(segments); | ||||||
|             else if (lines[i].Contains("<DateTime,Temp,TCR%,N|P>")) |             else if (lines[i].Contains("<DateTime,Temp,TCR%,N|P>")) | ||||||
|  | |||||||
							
								
								
									
										207
									
								
								Adaptation/FileHandlers/RsM/Row.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								Adaptation/FileHandlers/RsM/Row.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,207 @@ | |||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace Adaptation.FileHandlers.RsM; | ||||||
|  |  | ||||||
|  | #nullable enable | ||||||
|  |  | ||||||
|  | internal class Row | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     public Row(Run run, int i) | ||||||
|  |     { | ||||||
|  |         Title = run.Line1.Title; | ||||||
|  |         // | ||||||
|  |         FileName = run.Line2.FileName; | ||||||
|  |         Project = run.Line2.Project; | ||||||
|  |         RecipeName = run.Line2.RecipeName; | ||||||
|  |         LotID = run.Line2.LotID; | ||||||
|  |         WfrID = run.Line2.WfrID; | ||||||
|  |         Is_TF_DataFile = run.Line2.Is_TF_DataFile; | ||||||
|  |         // | ||||||
|  |         Directory = run.Line3.Directory; | ||||||
|  |         // | ||||||
|  |         Time = run.Line4.Time; | ||||||
|  |         Date = run.Line4.Date; | ||||||
|  |         Temp = run.Line4.Temp; | ||||||
|  |         TCRPercent = run.Line4.TCRPercent; | ||||||
|  |         NOrP = run.Line4.NOrP; | ||||||
|  |         // | ||||||
|  |         Avg = run.Line4B.Avg; | ||||||
|  |         Dev = run.Line4B.Dev; | ||||||
|  |         Min = run.Line4B.Min; | ||||||
|  |         Max = run.Line4B.Max; | ||||||
|  |         // | ||||||
|  |         Operator = run.Line5.Operator; | ||||||
|  |         Equipment = run.Line5.Equipment; | ||||||
|  |         // | ||||||
|  |         Engineer = run.Line6.Engineer; | ||||||
|  |         // | ||||||
|  |         AreaOrDiamScan = run.Line7.AreaOrDiamScan; | ||||||
|  |         WaferShape = run.Line7.WaferShape; | ||||||
|  |         BNBand = run.Line7.BNBand; | ||||||
|  |         TemplateFile = run.Line7.TemplateFile; | ||||||
|  |         XSize = run.Line7.XSize; | ||||||
|  |         YSize = run.Line7.YSize; | ||||||
|  |         CalibrationFactor = run.Line7.CalibrationFactor; | ||||||
|  |         MsmtMode = run.Line7.MsmtMode; | ||||||
|  |         DataType = run.Line7.DataType; | ||||||
|  |         DataUnit = run.Line7.DataUnit; | ||||||
|  |         // | ||||||
|  |         NumProbePoints = run.Line8.NumProbePoints; | ||||||
|  |         SingleOrDualProbeConfig = run.Line8.SingleOrDualProbeConfig; | ||||||
|  |         NumberActPrbPts = run.Line8.NumberActPrbPts; | ||||||
|  |         Rsens = run.Line8.Rsens; | ||||||
|  |         IdrvMx = run.Line8.IdrvMx; | ||||||
|  |         VinGain = run.Line8.VinGain; | ||||||
|  |         DataRejectSigma = run.Line8.DataRejectSigma; | ||||||
|  |         MeritThreshold = run.Line8.MeritThreshold; | ||||||
|  |         PrbChgNumber = run.Line8.PrbChgNumber; | ||||||
|  |         PrbName = run.Line8.PrbName; | ||||||
|  |         // | ||||||
|  |         WaferSize = run.Line9.WaferSize; | ||||||
|  |         EdgeEx = run.Line9.EdgeEx; | ||||||
|  |         Xll = run.Line9.Xll; | ||||||
|  |         Yll = run.Line9.Yll; | ||||||
|  |         Xur = run.Line9.Xur; | ||||||
|  |         Yur = run.Line9.Yur; | ||||||
|  |         X = run.Line9.X; | ||||||
|  |         Y = run.Line9.Y; | ||||||
|  |         CutCorners = run.Line9.CutCorners; | ||||||
|  |         // | ||||||
|  |         DiamThScan = run.Line10.DiamThScan; | ||||||
|  |         DiamStart = run.Line10.DiamStart; | ||||||
|  |         DiamEnd = run.Line10.DiamEnd; | ||||||
|  |         DiamStep = run.Line10.DiamStep; | ||||||
|  |         // | ||||||
|  |         FlatOrNotch = run.Line11.FlatOrNotch; | ||||||
|  |         FollowMajorFlat = run.Line11.FollowMajorFlat; | ||||||
|  |         AutoOrManualLoad = run.Line11.AutoOrManualLoad; | ||||||
|  |         RangeOrIndividual = run.Line11.RangeOrIndividual; | ||||||
|  |         PauseAfterEveryRun = run.Line11.PauseAfterEveryRun; | ||||||
|  |         AutoPrint = run.Line11.AutoPrint; | ||||||
|  |         Plot = run.Line11.Plot; | ||||||
|  |         BulkSampleThk = run.Line11.BulkSampleThk; | ||||||
|  |         Unit = run.Line11.Unit; | ||||||
|  |         // | ||||||
|  |         RangeFrom = run.Line12.RangeFrom; | ||||||
|  |         RangeTo = run.Line12.RangeTo; | ||||||
|  |         // | ||||||
|  |         CassetteSlotSelected = run.Line13.CassetteSlotSelected; | ||||||
|  |         // | ||||||
|  |         R = run.Points[i].R; | ||||||
|  |         Th = run.Points[i].Th; | ||||||
|  |         Data = run.Points[i].Data; | ||||||
|  |         Rs = run.Points[i].Rs; | ||||||
|  |         RsA = run.Points[i].RsA; | ||||||
|  |         RsB = run.Points[i].RsB; | ||||||
|  |         NumberSample = run.Points[i].NumberSample; | ||||||
|  |         PointX = run.Points[i].X; | ||||||
|  |         PointY = run.Points[i].Y; | ||||||
|  |         Irng = run.Points[i].Irng; | ||||||
|  |         Vrng = run.Points[i].Vrng; | ||||||
|  |         ChiSq = run.Points[i].ChiSq; | ||||||
|  |         MeritGOF = run.Points[i].MeritGOF; | ||||||
|  |         DataIntegrity = run.Points[i].DataIntegrity; | ||||||
|  |     } | ||||||
|  |      | ||||||
|  |     public string Title { get; } | ||||||
|  |     // | ||||||
|  |     public string FileName { get; } | ||||||
|  |     public string Project { get; } | ||||||
|  |     public string RecipeName { get; } | ||||||
|  |     public string LotID { get; } | ||||||
|  |     public string WfrID { get; } | ||||||
|  |     public string Is_TF_DataFile { get; } | ||||||
|  |     // | ||||||
|  |     public string Directory { get; } | ||||||
|  |     // | ||||||
|  |     public string Time { get; } | ||||||
|  |     public string Date { get; } | ||||||
|  |     public string Temp { get; } | ||||||
|  |     public string TCRPercent { get; } | ||||||
|  |     public string NOrP { get; } | ||||||
|  |     // | ||||||
|  |     public string Avg { get; } | ||||||
|  |     public string Dev { get; } | ||||||
|  |     public string Min { get; } | ||||||
|  |     public string Max { get; } | ||||||
|  |     // | ||||||
|  |     public string Operator { get; } | ||||||
|  |     public string Equipment { get; } | ||||||
|  |     // | ||||||
|  |     public string Engineer { get; } | ||||||
|  |     // | ||||||
|  |     public string AreaOrDiamScan { get; } | ||||||
|  |     public string WaferShape { get; } | ||||||
|  |     public string BNBand { get; } | ||||||
|  |     public string TemplateFile { get; } | ||||||
|  |     public string XSize { get; } | ||||||
|  |     public string YSize { get; } | ||||||
|  |     public string CalibrationFactor { get; } | ||||||
|  |     public string MsmtMode { get; } | ||||||
|  |     public string DataType { get; } | ||||||
|  |     public string DataUnit { get; } | ||||||
|  |     // | ||||||
|  |     public string NumProbePoints { get; } | ||||||
|  |     public string SingleOrDualProbeConfig { get; } | ||||||
|  |     public string NumberActPrbPts { get; } | ||||||
|  |     public string Rsens { get; } | ||||||
|  |     public string IdrvMx { get; } | ||||||
|  |     public string VinGain { get; } | ||||||
|  |     public string DataRejectSigma { get; } | ||||||
|  |     public string MeritThreshold { get; } | ||||||
|  |     public string PrbChgNumber { get; } | ||||||
|  |     public string PrbName { get; } | ||||||
|  |     // | ||||||
|  |     public string WaferSize { get; } | ||||||
|  |     public string EdgeEx { get; } | ||||||
|  |     public string Xll { get; } | ||||||
|  |     public string Yll { get; } | ||||||
|  |     public string Xur { get; } | ||||||
|  |     public string Yur { get; } | ||||||
|  |     public string X { get; } | ||||||
|  |     public string Y { get; } | ||||||
|  |     public string CutCorners { get; } | ||||||
|  |     // | ||||||
|  |     public string DiamThScan { get; } | ||||||
|  |     public string DiamStart { get; } | ||||||
|  |     public string DiamEnd { get; } | ||||||
|  |     public string DiamStep { get; } | ||||||
|  |     // | ||||||
|  |     public string FlatOrNotch { get; } | ||||||
|  |     public string FollowMajorFlat { get; } | ||||||
|  |     public string AutoOrManualLoad { get; } | ||||||
|  |     public string RangeOrIndividual { get; } | ||||||
|  |     public string PauseAfterEveryRun { get; } | ||||||
|  |     public string AutoPrint { get; } | ||||||
|  |     public string Plot { get; } | ||||||
|  |     public string BulkSampleThk { get; } | ||||||
|  |     public string Unit { get; } | ||||||
|  |     // | ||||||
|  |     public string RangeFrom { get; } | ||||||
|  |     public string RangeTo { get; } | ||||||
|  |     // | ||||||
|  |     public string CassetteSlotSelected { get; } | ||||||
|  |     // | ||||||
|  |     public string R { get; } | ||||||
|  |     public string Th { get; } | ||||||
|  |     public string Data { get; } | ||||||
|  |     public string Rs { get; } | ||||||
|  |     public string RsA { get; } | ||||||
|  |     public string RsB { get; } | ||||||
|  |     public string NumberSample { get; } | ||||||
|  |     public string PointX { get; } | ||||||
|  |     public string PointY { get; } | ||||||
|  |     public string Irng { get; } | ||||||
|  |     public string Vrng { get; } | ||||||
|  |     public string ChiSq { get; } | ||||||
|  |     public string MeritGOF { get; } | ||||||
|  |     public string DataIntegrity { get; } | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true)] | ||||||
|  | [JsonSerializable(typeof(Row))] | ||||||
|  | internal partial class RowSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
|  | } | ||||||
							
								
								
									
										205
									
								
								Adaptation/FileHandlers/RsM/Run.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										205
									
								
								Adaptation/FileHandlers/RsM/Run.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,205 @@ | |||||||
|  | using Adaptation.Shared; | ||||||
|  | using System; | ||||||
|  | using System.Collections.Generic; | ||||||
|  | using System.Collections.ObjectModel; | ||||||
|  | using System.IO; | ||||||
|  | using System.Text; | ||||||
|  | using System.Text.Json; | ||||||
|  | using System.Text.Json.Serialization; | ||||||
|  |  | ||||||
|  | namespace Adaptation.FileHandlers.RsM; | ||||||
|  |  | ||||||
|  | #nullable enable | ||||||
|  |  | ||||||
|  | internal class Run | ||||||
|  | { | ||||||
|  |     public Run(Line1 line1, Line2 line2, Line3 line3, Line4 line4, Line4B line4B, Line5 line5, Line6 line6, Line7 line7, Line8 line8, Line9 line9, Line10 line10, Line11 line11, Line12 line12, Line13 line13, ReadOnlyCollection<Point> points) | ||||||
|  |     { | ||||||
|  |         Line1 = line1; | ||||||
|  |         Line2 = line2; | ||||||
|  |         Line3 = line3; | ||||||
|  |         Line4 = line4; | ||||||
|  |         Line4B = line4B; | ||||||
|  |         Line5 = line5; | ||||||
|  |         Line6 = line6; | ||||||
|  |         Line7 = line7; | ||||||
|  |         Line8 = line8; | ||||||
|  |         Line9 = line9; | ||||||
|  |         Line10 = line10; | ||||||
|  |         Line11 = line11; | ||||||
|  |         Line12 = line12; | ||||||
|  |         Line13 = line13; | ||||||
|  |         Points = points; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public Line1 Line1 { get; } | ||||||
|  |     public Line2 Line2 { get; } | ||||||
|  |     public Line3 Line3 { get; } | ||||||
|  |     public Line4 Line4 { get; } | ||||||
|  |     public Line4B Line4B { get; } | ||||||
|  |     public Line5 Line5 { get; } | ||||||
|  |     public Line6 Line6 { get; } | ||||||
|  |     public Line7 Line7 { get; } | ||||||
|  |     public Line8 Line8 { get; } | ||||||
|  |     public Line9 Line9 { get; } | ||||||
|  |     public Line10 Line10 { get; } | ||||||
|  |     public Line11 Line11 { get; } | ||||||
|  |     public Line12 Line12 { get; } | ||||||
|  |     public Line13 Line13 { get; } | ||||||
|  |     public ReadOnlyCollection<Point> Points { get; } | ||||||
|  |  | ||||||
|  |     internal static ReadOnlyCollection<string> GetCollection(string[] segments) | ||||||
|  |     { | ||||||
|  |         List<string> results = new(); | ||||||
|  |         foreach (string segment in segments) | ||||||
|  |         { | ||||||
|  |             if (segment[0] == ',') | ||||||
|  |                 break; | ||||||
|  |             results.Add(segment); | ||||||
|  |         } | ||||||
|  |         return new(results); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void WriteJson(Logistics logistics, List<FileInfo> fileInfoCollection, Run? result) | ||||||
|  |     { | ||||||
|  |         FileInfo fileInfo = new($"{logistics.ReportFullPath}.json"); | ||||||
|  |         string json = JsonSerializer.Serialize(result, RunSourceGenerationContext.Default.Run); | ||||||
|  |         File.WriteAllText(fileInfo.FullName, json); | ||||||
|  |         File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence); | ||||||
|  |         fileInfoCollection.Add(fileInfo); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static ReadOnlyCollection<string> GetLines(JsonElement[]? jsonElements) | ||||||
|  |     { | ||||||
|  |         List<string> results = new(); | ||||||
|  |         int columns = 0; | ||||||
|  |         StringBuilder stringBuilder = new(); | ||||||
|  |         for (int i = 0; i < jsonElements?.Length;) | ||||||
|  |         { | ||||||
|  |             foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject()) | ||||||
|  |             { | ||||||
|  |                 columns += 1; | ||||||
|  |                 _ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append('\t'); | ||||||
|  |             } | ||||||
|  |             break; | ||||||
|  |         } | ||||||
|  |         if (jsonElements?.Length != 0) | ||||||
|  |             _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); | ||||||
|  |         results.Add(stringBuilder.ToString()); | ||||||
|  |         for (int i = 0; i < jsonElements?.Length; i++) | ||||||
|  |         { | ||||||
|  |             _ = stringBuilder.Clear(); | ||||||
|  |             foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject()) | ||||||
|  |             { | ||||||
|  |                 if (jsonProperty.Value.ValueKind == JsonValueKind.Object) | ||||||
|  |                     _ = stringBuilder.Append('\t'); | ||||||
|  |                 else if (jsonProperty.Value.ValueKind != JsonValueKind.String) | ||||||
|  |                     _ = stringBuilder.Append(jsonProperty.Value).Append('\t'); | ||||||
|  |                 else | ||||||
|  |                     _ = stringBuilder.Append('"').Append(jsonProperty.Value).Append('"').Append('\t'); | ||||||
|  |             } | ||||||
|  |             _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); | ||||||
|  |             results.Add(stringBuilder.ToString()); | ||||||
|  |         } | ||||||
|  |         return results.AsReadOnly(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static ReadOnlyCollection<string> GetLines(JsonElement jsonElement) => | ||||||
|  |         GetLines(new JsonElement[] { jsonElement }); | ||||||
|  |  | ||||||
|  |     private static void WriteTabSeparatedValues(Logistics logistics, List<FileInfo> fileInfoCollection, Run run) | ||||||
|  |     { | ||||||
|  |         List<Row> results = new(); | ||||||
|  |         Row row; | ||||||
|  |         FileInfo fileInfo = new($"{logistics.ReportFullPath}.tsv"); | ||||||
|  |         for (int i = 0; i < run.Points.Count; i++) | ||||||
|  |         { | ||||||
|  |             row = new(run, i); | ||||||
|  |             results.Add(row); | ||||||
|  |         } | ||||||
|  |         string json = JsonSerializer.Serialize(results); | ||||||
|  |         JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json); | ||||||
|  |         ReadOnlyCollection<string> lines = GetLines(jsonElements); | ||||||
|  |         File.WriteAllText(fileInfo.FullName, string.Join(Environment.NewLine, lines)); | ||||||
|  |         File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence); | ||||||
|  |         fileInfoCollection.Add(fileInfo); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private static void WriteException(Logistics logistics, Exception ex) | ||||||
|  |     { | ||||||
|  |         FileInfo fileInfo = new($"{logistics.ReportFullPath}.{nameof(Exception)}.txt"); | ||||||
|  |         File.WriteAllText(fileInfo.FullName, $"{ex.Message}{Environment.NewLine}{ex.StackTrace}"); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     internal static Run? Get(Logistics logistics, List<FileInfo> fileInfoCollection) | ||||||
|  |     { | ||||||
|  |         Run? result; | ||||||
|  |         int take = 14; | ||||||
|  |         string[] lines = File.ReadAllLines(logistics.ReportFullPath); | ||||||
|  |         ReadOnlyCollection<string> collection = new(lines); | ||||||
|  |         if (collection.Count < take) | ||||||
|  |             result = null; | ||||||
|  |         else | ||||||
|  |         { | ||||||
|  |             string[] separator = new string[] { " ", "\t" }; | ||||||
|  |             // <Title> | ||||||
|  |             Line1 line1 = Line1.Get(collection[0].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |             // <FileName, Proj,Rcpe, LotID,WfrID, Is_TF_DataFile> | ||||||
|  |             Line2 line2 = Line2.Get(collection[1].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |             // <Directory> | ||||||
|  |             Line3 line3 = Line3.Get(collection[2].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |             // <DateTime,Temp,TCR%,N|P> | ||||||
|  |             Line4 line4 = Line4.Get(collection[3].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |             // <Avg,Dev,Min,Max> | ||||||
|  |             Line4B? line4B = Line4B.Get(collection[3].Split(new string[] { ">" }, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |             if (line4B is null) | ||||||
|  |                 result = null; | ||||||
|  |             else | ||||||
|  |             { | ||||||
|  |                 // <Operator, Epuipment> | ||||||
|  |                 Line5 line5 = Line5.Get(collection[4].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <Engineer> | ||||||
|  |                 Line6 line6 = Line6.Get(collection[5].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <AreaOrDiamScan, WaferShape, dNBand,  TemplateFile,  xsize,ysize, CalibFactor, MsmtMode,  DataType,  DataUnit> | ||||||
|  |                 Line7 line7 = Line7.Get(collection[6].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts,  Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold, PrbChg#, PrbName> | ||||||
|  |                 Line8 line8 = Line8.Get(collection[7].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <WaferSize,EdgeEx, x,yll, x,yur, #x,y, CutCorners> | ||||||
|  |                 Line9 line9 = Line9.Get(collection[8].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <Diam: ThScan Start End Step> | ||||||
|  |                 Line10 line10 = Line10.Get(collection[9].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <FlatOrNotch FollowMajorFlat AutoOrManualLoad RangeOrIndvdual PauseAfterEveryRun, AutoPrint,Plot, BulkSmplThk & Unit> | ||||||
|  |                 Line11 line11 = Line11.Get(collection[10].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <RangeFrom, RangeTo> | ||||||
|  |                 Line12 line12 = Line12.Get(collection[11].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <CassSlotSelected> | ||||||
|  |                 Line13 line13 = Line13.Get(collection[12].Split(separator, StringSplitOptions.RemoveEmptyEntries)); | ||||||
|  |                 // <R,Th,Data, Rs,RsA,RsB, #Smpl, x,y, Irng,Vrng, ChiSq,merit/GOF, DataIntegrity> | ||||||
|  |                 ReadOnlyCollection<Point> points = Point.Get(take, collection, separator); | ||||||
|  |                 if (points.Count == 0) | ||||||
|  |                     result = null; | ||||||
|  |                 else | ||||||
|  |                 { | ||||||
|  |                     result = new(line1, line2, line3, line4, line4B, line5, line6, line7, line8, line9, line10, line11, line12, line13, points); | ||||||
|  |                     WriteJson(logistics, fileInfoCollection, result); | ||||||
|  |                     try | ||||||
|  |                     { | ||||||
|  |                         WriteTabSeparatedValues(logistics, fileInfoCollection, result); | ||||||
|  |                     } | ||||||
|  |                     catch (Exception ex) | ||||||
|  |                     { | ||||||
|  |                         WriteException(logistics, ex); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | [JsonSourceGenerationOptions(WriteIndented = true)] | ||||||
|  | [JsonSerializable(typeof(Run))] | ||||||
|  | internal partial class RunSourceGenerationContext : JsonSerializerContext | ||||||
|  | { | ||||||
|  | } | ||||||
| @ -1,317 +0,0 @@ | |||||||
| using Adaptation.Shared; |  | ||||||
| using Adaptation.Shared.Methods; |  | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Text.Json; |  | ||||||
|  |  | ||||||
| namespace Adaptation.FileHandlers.txt; |  | ||||||
|  |  | ||||||
| public class Description : IDescription, Shared.Properties.IDescription |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     public int Test { get; set; } |  | ||||||
|     public int Count { get; set; } |  | ||||||
|     public int Index { get; set; } |  | ||||||
|     // |  | ||||||
|     public string EventName { get; set; } |  | ||||||
|     public string NullData { get; set; } |  | ||||||
|     public string JobID { get; set; } |  | ||||||
|     public string Sequence { get; set; } |  | ||||||
|     public string MesEntity { get; set; } |  | ||||||
|     public string ReportFullPath { get; set; } |  | ||||||
|     public string ProcessJobID { get; set; } |  | ||||||
|     public string MID { get; set; } |  | ||||||
|     // |  | ||||||
|     public string Date { get; set; } |  | ||||||
|     public string Employee { get; set; } |  | ||||||
|     public string Lot { get; set; } |  | ||||||
|     public string PSN { get; set; } |  | ||||||
|     public string Reactor { get; set; } |  | ||||||
|     public string Recipe { get; set; } |  | ||||||
|     // |  | ||||||
|     public string AutoOptimizeGain { get; set; } |  | ||||||
|     public string AutoProbeHeightSet { get; set; } |  | ||||||
|     public string Avg { get; set; } |  | ||||||
|     public string DataReject { get; set; } |  | ||||||
|     public string DLRatio { get; set; } |  | ||||||
|     public string Merit { get; set; } |  | ||||||
|     public string Pt { get; set; } |  | ||||||
|     public string R { get; set; } |  | ||||||
|     public string ResistivitySpec { get; set; } |  | ||||||
|     public string Rs { get; set; } |  | ||||||
|     public string SemiRadial { get; set; } |  | ||||||
|     public string StdDev { get; set; } |  | ||||||
|     public string T { get; set; } |  | ||||||
|     public string Temp { get; set; } |  | ||||||
|     // |  | ||||||
|     public string Engineer { get; set; } |  | ||||||
|     public string EquipId { get; set; } |  | ||||||
|     public string FileName { get; set; } |  | ||||||
|     public string HeaderUniqueId { get; set; } |  | ||||||
|     public string Id { get; set; } |  | ||||||
|     public string Layer { get; set; } |  | ||||||
|     public string RDS { get; set; } |  | ||||||
|     public string Run { get; set; } |  | ||||||
|     public string UniqueId { get; set; } |  | ||||||
|     public string Zone { get; set; } |  | ||||||
|     // |  | ||||||
|     public string SheetRhoVariation { get; set; } |  | ||||||
|  |  | ||||||
|     string IDescription.GetEventDescription() => "File Has been read and parsed"; |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetNames(IFileRead fileRead, Logistics logistics) |  | ||||||
|     { |  | ||||||
|         List<string> results = new(); |  | ||||||
|         IDescription description = GetDefault(fileRead, logistics); |  | ||||||
|         string json = JsonSerializer.Serialize(description, description.GetType()); |  | ||||||
|         object @object = JsonSerializer.Deserialize<object>(json); |  | ||||||
|         if (@object is not JsonElement jsonElement) |  | ||||||
|             throw new Exception(); |  | ||||||
|         foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) |  | ||||||
|             results.Add(jsonProperty.Name); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetDetailNames() |  | ||||||
|     { |  | ||||||
|         List<string> results = new() |  | ||||||
|         { |  | ||||||
|             nameof(AutoOptimizeGain), |  | ||||||
|             nameof(AutoProbeHeightSet), |  | ||||||
|             nameof(Avg), |  | ||||||
|             nameof(DataReject), |  | ||||||
|             nameof(DLRatio), |  | ||||||
|             nameof(Merit), |  | ||||||
|             nameof(Pt), |  | ||||||
|             nameof(R), |  | ||||||
|             nameof(ResistivitySpec), |  | ||||||
|             nameof(Rs), |  | ||||||
|             nameof(SemiRadial), |  | ||||||
|             nameof(StdDev), |  | ||||||
|             nameof(T), |  | ||||||
|             nameof(Temp) |  | ||||||
|         }; |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetHeaderNames() |  | ||||||
|     { |  | ||||||
|         List<string> results = new() |  | ||||||
|         { |  | ||||||
|             nameof(Date), |  | ||||||
|             nameof(Employee), |  | ||||||
|             nameof(Lot), |  | ||||||
|             nameof(PSN), |  | ||||||
|             nameof(Reactor), |  | ||||||
|             nameof(Recipe) |  | ||||||
|         }; |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     IDescription IDescription.GetDisplayNames() |  | ||||||
|     { |  | ||||||
|         Description result = GetDisplayNames(); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetParameterNames() |  | ||||||
|     { |  | ||||||
|         List<string> results = new() |  | ||||||
|         { |  | ||||||
|             nameof(Engineer), |  | ||||||
|             nameof(EquipId), |  | ||||||
|             nameof(FileName), |  | ||||||
|             nameof(HeaderUniqueId), |  | ||||||
|             nameof(Id), |  | ||||||
|             nameof(Layer), |  | ||||||
|             nameof(RDS), |  | ||||||
|             nameof(Run), |  | ||||||
|             nameof(UniqueId), |  | ||||||
|             nameof(Zone), |  | ||||||
|             nameof(SheetRhoVariation), |  | ||||||
|         }; |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     JsonProperty[] IDescription.GetDefault(IFileRead fileRead, Logistics logistics) |  | ||||||
|     { |  | ||||||
|         JsonProperty[] results; |  | ||||||
|         IDescription description = GetDefault(fileRead, logistics); |  | ||||||
|         string json = JsonSerializer.Serialize(description, description.GetType()); |  | ||||||
|         object @object = JsonSerializer.Deserialize<object>(json); |  | ||||||
|         results = ((JsonElement)@object).EnumerateObject().ToArray(); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetPairedParameterNames() |  | ||||||
|     { |  | ||||||
|         List<string> results = new(); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IDescription.GetIgnoreParameterNames(Test test) |  | ||||||
|     { |  | ||||||
|         List<string> results = new(); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics) |  | ||||||
|     { |  | ||||||
|         Description result = GetDefault(fileRead, logistics); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     Dictionary<string, string> IDescription.GetDisplayNamesJsonElement(IFileRead fileRead) |  | ||||||
|     { |  | ||||||
|         Dictionary<string, string> results = new(); |  | ||||||
|         IDescription description = GetDisplayNames(); |  | ||||||
|         string json = JsonSerializer.Serialize(description, description.GetType()); |  | ||||||
|         JsonElement jsonElement = JsonSerializer.Deserialize<JsonElement>(json); |  | ||||||
|         foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) |  | ||||||
|         { |  | ||||||
|             if (!results.ContainsKey(jsonProperty.Name)) |  | ||||||
|                 results.Add(jsonProperty.Name, string.Empty); |  | ||||||
|             if (jsonProperty.Value is JsonElement jsonPropertyValue) |  | ||||||
|                 results[jsonProperty.Name] = jsonPropertyValue.ToString(); |  | ||||||
|         } |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData) |  | ||||||
|     { |  | ||||||
|         List<IDescription> results = new(); |  | ||||||
|         if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData) |  | ||||||
|             results.Add(GetDefault(fileRead, logistics)); |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             string nullData; |  | ||||||
|             Description description; |  | ||||||
|             object configDataNullData = fileRead.NullData; |  | ||||||
|             if (configDataNullData is null) |  | ||||||
|                 nullData = string.Empty; |  | ||||||
|             else |  | ||||||
|                 nullData = configDataNullData.ToString(); |  | ||||||
|             for (int i = 0; i < iProcessData.Details.Count; i++) |  | ||||||
|             { |  | ||||||
|                 if (iProcessData.Details[i] is not Detail detail) |  | ||||||
|                     continue; |  | ||||||
|                 description = new Description |  | ||||||
|                 { |  | ||||||
|                     Test = (int)tests[i], |  | ||||||
|                     Count = tests.Count, |  | ||||||
|                     Index = i, |  | ||||||
|                     // |  | ||||||
|                     EventName = fileRead.EventName, |  | ||||||
|                     NullData = nullData, |  | ||||||
|                     JobID = fileRead.CellInstanceName, |  | ||||||
|                     Sequence = logistics.Sequence.ToString(), |  | ||||||
|                     MesEntity = logistics.MesEntity, |  | ||||||
|                     ReportFullPath = logistics.ReportFullPath, |  | ||||||
|                     ProcessJobID = logistics.ProcessJobID, |  | ||||||
|                     MID = logistics.MID, |  | ||||||
|                     // |  | ||||||
|                     Date = processData.Date.ToString(GetDateFormat()), |  | ||||||
|                     Employee = processData.Employee, |  | ||||||
|                     Lot = processData.Lot, |  | ||||||
|                     PSN = processData.PSN, |  | ||||||
|                     Reactor = processData.Reactor, |  | ||||||
|                     Recipe = processData.Recipe, |  | ||||||
|                     // |  | ||||||
|                     AutoOptimizeGain = processData.AutoOptimizeGain, |  | ||||||
|                     AutoProbeHeightSet = processData.AutoProbeHeightSet, |  | ||||||
|                     Avg = processData.Avg, |  | ||||||
|                     DataReject = processData.DataReject, |  | ||||||
|                     DLRatio = processData.DLRatio, |  | ||||||
|                     Merit = detail.Merit, |  | ||||||
|                     Pt = detail.Pt, |  | ||||||
|                     R = detail.R, |  | ||||||
|                     ResistivitySpec = processData.ResistivitySpec, |  | ||||||
|                     Rs = detail.Rs, |  | ||||||
|                     SemiRadial = processData.SemiRadial, |  | ||||||
|                     StdDev = processData.StdDev, |  | ||||||
|                     T = detail.T, |  | ||||||
|                     Temp = processData.Temp, |  | ||||||
|                     // |  | ||||||
|                     Engineer = processData.Engineer, |  | ||||||
|                     EquipId = processData.EquipId, |  | ||||||
|                     FileName = processData.FileName, |  | ||||||
|                     HeaderUniqueId = detail.HeaderUniqueId, |  | ||||||
|                     Id = processData.UniqueId, |  | ||||||
|                     Layer = processData.Layer, |  | ||||||
|                     RDS = processData.RDS, |  | ||||||
|                     Run = processData.Run, |  | ||||||
|                     UniqueId = detail.UniqueId, |  | ||||||
|                     Zone = processData.Zone, |  | ||||||
|                     // |  | ||||||
|                     SheetRhoVariation = string.Empty, |  | ||||||
|                 }; |  | ||||||
|                 results.Add(description); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static Description GetDisplayNames() |  | ||||||
|     { |  | ||||||
|         Description result = new(); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private Description GetDefault(IFileRead fileRead, Logistics logistics) |  | ||||||
|     { |  | ||||||
|         Description result = new() |  | ||||||
|         { |  | ||||||
|             Test = -1, |  | ||||||
|             Count = 0, |  | ||||||
|             Index = -1, |  | ||||||
|             // |  | ||||||
|             EventName = fileRead.EventName, |  | ||||||
|             NullData = fileRead.NullData, |  | ||||||
|             JobID = fileRead.CellInstanceName, |  | ||||||
|             Sequence = logistics.Sequence.ToString(), |  | ||||||
|             MesEntity = fileRead.MesEntity, |  | ||||||
|             ReportFullPath = logistics.ReportFullPath, |  | ||||||
|             ProcessJobID = logistics.ProcessJobID, |  | ||||||
|             MID = logistics.MID, |  | ||||||
|             // |  | ||||||
|             Date = nameof(Date), |  | ||||||
|             Employee = nameof(Employee), |  | ||||||
|             Lot = nameof(Lot), |  | ||||||
|             PSN = nameof(PSN), |  | ||||||
|             Reactor = nameof(Reactor), |  | ||||||
|             Recipe = nameof(Recipe), |  | ||||||
|             // |  | ||||||
|             AutoOptimizeGain = nameof(AutoOptimizeGain), |  | ||||||
|             AutoProbeHeightSet = nameof(AutoProbeHeightSet), |  | ||||||
|             Avg = nameof(Avg), |  | ||||||
|             DataReject = nameof(DataReject), |  | ||||||
|             DLRatio = nameof(DLRatio), |  | ||||||
|             Merit = nameof(Merit), |  | ||||||
|             Pt = nameof(Pt), |  | ||||||
|             R = nameof(R), |  | ||||||
|             ResistivitySpec = nameof(ResistivitySpec), |  | ||||||
|             Rs = nameof(Rs), |  | ||||||
|             SemiRadial = nameof(SemiRadial), |  | ||||||
|             StdDev = nameof(StdDev), |  | ||||||
|             T = nameof(T), |  | ||||||
|             Temp = nameof(Temp), |  | ||||||
|             // |  | ||||||
|             Engineer = nameof(Engineer), |  | ||||||
|             EquipId = nameof(EquipId), |  | ||||||
|             FileName = nameof(FileName), |  | ||||||
|             HeaderUniqueId = nameof(HeaderUniqueId), |  | ||||||
|             Id = nameof(Id), |  | ||||||
|             Layer = nameof(Layer), |  | ||||||
|             RDS = nameof(RDS), |  | ||||||
|             Run = nameof(Run), |  | ||||||
|             UniqueId = nameof(UniqueId), |  | ||||||
|             Zone = nameof(Zone), |  | ||||||
|             SheetRhoVariation = nameof(SheetRhoVariation), |  | ||||||
|         }; |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -1,27 +0,0 @@ | |||||||
| namespace Adaptation.FileHandlers.txt; |  | ||||||
|  |  | ||||||
| public class Descriptor |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     public string Employee { get; private set; } |  | ||||||
|     public string Layer { get; private set; } |  | ||||||
|     public string PSN { get; private set; } |  | ||||||
|     public string RDS { get; private set; } |  | ||||||
|     public string Reactor { get; private set; } |  | ||||||
|     public string Run { get; private set; } |  | ||||||
|     public string Title { get; private set; } |  | ||||||
|     public string Zone { get; private set; } |  | ||||||
|  |  | ||||||
|     public Descriptor(string employee, string layer, string psn, string rds, string reactor, string run, string title, string zone) |  | ||||||
|     { |  | ||||||
|         Employee = employee; |  | ||||||
|         Layer = layer; |  | ||||||
|         PSN = psn; |  | ||||||
|         RDS = rds; |  | ||||||
|         Reactor = reactor; |  | ||||||
|         Run = run; |  | ||||||
|         Title = title; |  | ||||||
|         Zone = zone; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -1,16 +0,0 @@ | |||||||
| namespace Adaptation.FileHandlers.txt; |  | ||||||
|  |  | ||||||
| public class Detail |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     public string HeaderUniqueId { get; set; } |  | ||||||
|     public string Merit { get; set; } |  | ||||||
|     public string Pt { get; set; } |  | ||||||
|     public string R { get; set; } |  | ||||||
|     public string Rs { get; set; } |  | ||||||
|     public string T { get; set; } |  | ||||||
|     public string UniqueId { get; set; } |  | ||||||
|  |  | ||||||
|     public override string ToString() => string.Concat(Merit, ";", Pt, ";", R, ";", Rs, ";", T); |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -1,131 +0,0 @@ | |||||||
| using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; |  | ||||||
| using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; |  | ||||||
| using Adaptation.Shared; |  | ||||||
| using Adaptation.Shared.Methods; |  | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.IO; |  | ||||||
| using System.Text.Json; |  | ||||||
| using System.Text.RegularExpressions; |  | ||||||
|  |  | ||||||
| namespace Adaptation.FileHandlers.txt; |  | ||||||
|  |  | ||||||
| public class FileRead : Shared.FileRead, IFileRead |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     private long? _TickOffset; |  | ||||||
|  |  | ||||||
|     public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : |  | ||||||
|         base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) |  | ||||||
|     { |  | ||||||
|         _MinFileLength = 15; |  | ||||||
|         _NullData = string.Empty; |  | ||||||
|         _Logistics = new(this); |  | ||||||
|         if (_FileParameter is null) |  | ||||||
|             throw new Exception(cellInstanceConnectionName); |  | ||||||
|         if (_ModelObjectParameterDefinitions is null) |  | ||||||
|             throw new Exception(cellInstanceConnectionName); |  | ||||||
|         if (_IsDuplicator) |  | ||||||
|             throw new Exception(cellInstanceConnectionName); |  | ||||||
|         if (_IsEAFHosted) |  | ||||||
|             NestExistingFiles(_FileConnectorConfiguration); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults); |  | ||||||
|  |  | ||||||
|     void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); |  | ||||||
|  |  | ||||||
|     string IFileRead.GetEventDescription() |  | ||||||
|     { |  | ||||||
|         string result = _Description.GetEventDescription(); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<string> IFileRead.GetHeaderNames() |  | ||||||
|     { |  | ||||||
|         List<string> results = _Description.GetHeaderNames(); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception) |  | ||||||
|     { |  | ||||||
|         string[] results = Move(extractResults, to, from, resolvedFileLocation, exception); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     JsonProperty[] IFileRead.GetDefault() |  | ||||||
|     { |  | ||||||
|         JsonProperty[] results = _Description.GetDefault(this, _Logistics); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement() |  | ||||||
|     { |  | ||||||
|         Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData) |  | ||||||
|     { |  | ||||||
|         List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName) |  | ||||||
|     { |  | ||||||
|         Tuple<string, Test[], JsonElement[], List<FileInfo>> results; |  | ||||||
|         if (string.IsNullOrEmpty(eventName)) |  | ||||||
|             throw new Exception(); |  | ||||||
|         _ReportFullPath = reportFullPath; |  | ||||||
|         DateTime dateTime = DateTime.Now; |  | ||||||
|         results = GetExtractResult(reportFullPath, dateTime); |  | ||||||
|         if (results.Item3 is null) |  | ||||||
|             results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4); |  | ||||||
|         if (results.Item3.Length > 0 && _IsEAFHosted) |  | ||||||
|             WritePDSF(this, results.Item3); |  | ||||||
|         UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract() |  | ||||||
|     { |  | ||||||
|         Tuple<string, Test[], JsonElement[], List<FileInfo>> results; |  | ||||||
|         List<string> headerNames = _Description.GetHeaderNames(); |  | ||||||
|         Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this); |  | ||||||
|         results = ReExtract(this, headerNames, keyValuePairs); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) |  | ||||||
|     { |  | ||||||
|         Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>()); |  | ||||||
|         _TickOffset ??= 0; // 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); |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4); |  | ||||||
|             if (iProcessData is not ProcessData processData) |  | ||||||
|                 throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); |  | ||||||
|             string mid; |  | ||||||
|             if (!string.IsNullOrEmpty(processData.Run) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) |  | ||||||
|                 mid = processData.Run; |  | ||||||
|             else if (!string.IsNullOrEmpty(processData.Employee) && string.IsNullOrEmpty(processData.Reactor) && string.IsNullOrEmpty(processData.RDS) && string.IsNullOrEmpty(processData.PSN)) |  | ||||||
|                 mid = processData.Employee; |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); |  | ||||||
|                 mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; |  | ||||||
|             } |  | ||||||
|             SetFileParameterLotID(mid); |  | ||||||
|             _Logistics.Update(mid, processData.Reactor); |  | ||||||
|             if (iProcessData.Details.Count == 0) |  | ||||||
|                 throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks)); |  | ||||||
|             results = iProcessData.GetResults(this, _Logistics, results.Item4); |  | ||||||
|         } |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -1,593 +0,0 @@ | |||||||
| using Adaptation.Shared; |  | ||||||
| using Adaptation.Shared.Methods; |  | ||||||
| using log4net; |  | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Data; |  | ||||||
| using System.Globalization; |  | ||||||
| using System.IO; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Text; |  | ||||||
| using System.Text.Json; |  | ||||||
| using System.Text.Json.Serialization; |  | ||||||
| using System.Text.RegularExpressions; |  | ||||||
|  |  | ||||||
| namespace Adaptation.FileHandlers.txt; |  | ||||||
|  |  | ||||||
| public class ProcessData : IProcessData |  | ||||||
| { |  | ||||||
|  |  | ||||||
|     private int _I; |  | ||||||
|     private string _Data; |  | ||||||
|  |  | ||||||
|     private readonly ILog _Log; |  | ||||||
|     private readonly List<object> _Details; |  | ||||||
|  |  | ||||||
|     public string JobID { get; set; } |  | ||||||
|     public string MesEntity { get; set; } |  | ||||||
|     public string AutoOptimizeGain { get; set; } |  | ||||||
|     public string AutoProbeHeightSet { get; set; } |  | ||||||
|     public string Avg { get; set; } |  | ||||||
|     public string DLRatio { get; set; } |  | ||||||
|     public string DataReject { get; set; } |  | ||||||
|     public DateTime Date { get; set; } |  | ||||||
|     public string Employee { get; set; } |  | ||||||
|     public string Engineer { get; set; } |  | ||||||
|     public string EquipId { get; set; } |  | ||||||
|     public string FileName { get; set; } |  | ||||||
|     public string Layer { get; set; } |  | ||||||
|     public string Lot { get; set; } |  | ||||||
|     public string PSN { get; set; } |  | ||||||
|     public string RDS { get; set; } |  | ||||||
|     public string Reactor { get; set; } |  | ||||||
|     public string Recipe { get; set; } |  | ||||||
|     public string ResistivitySpec { get; set; } |  | ||||||
|     public string Run { get; set; } |  | ||||||
|     public string SemiRadial { get; set; } |  | ||||||
|     public string StdDev { get; set; } |  | ||||||
|     public string Temp { get; set; } |  | ||||||
|     public string UniqueId { get; set; } |  | ||||||
|     public string Zone { get; set; } |  | ||||||
|  |  | ||||||
|     List<object> Shared.Properties.IProcessData.Details => _Details; |  | ||||||
|  |  | ||||||
|     public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection) |  | ||||||
|     { |  | ||||||
|         fileInfoCollection.Clear(); |  | ||||||
|         _Details = new List<object>(); |  | ||||||
|         _I = 0; |  | ||||||
|         _Data = string.Empty; |  | ||||||
|         JobID = logistics.JobID; |  | ||||||
|         MesEntity = logistics.MesEntity; |  | ||||||
|         _Log = LogManager.GetLogger(typeof(ProcessData)); |  | ||||||
|         Parse(fileRead, logistics, fileInfoCollection); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); |  | ||||||
|  |  | ||||||
|     Tuple<string, Test[], JsonElement[], List<FileInfo>> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection) |  | ||||||
|     { |  | ||||||
|         Tuple<string, Test[], JsonElement[], List<FileInfo>> results; |  | ||||||
|         List<Test> tests = new(); |  | ||||||
|         foreach (object item in _Details) |  | ||||||
|             tests.Add(Test.CDE); |  | ||||||
|         List<IDescription> descriptions = fileRead.GetDescriptions(fileRead, tests, this); |  | ||||||
|         if (tests.Count != descriptions.Count) |  | ||||||
|             throw new Exception(); |  | ||||||
|         for (int i = 0; i < tests.Count; i++) |  | ||||||
|         { |  | ||||||
|             if (descriptions[i] is not Description description) |  | ||||||
|                 throw new Exception(); |  | ||||||
|             if (description.Test != (int)tests[i]) |  | ||||||
|                 throw new Exception(); |  | ||||||
|         } |  | ||||||
|         List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); |  | ||||||
|         string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); |  | ||||||
|         JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json); |  | ||||||
|         results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string GetBefore(string text) |  | ||||||
|     { |  | ||||||
|         string str; |  | ||||||
|         string str1; |  | ||||||
|         int num = _Data.IndexOf(text, _I); |  | ||||||
|         if (num <= -1) |  | ||||||
|         { |  | ||||||
|             str = _Data.Substring(_I); |  | ||||||
|             _I = _Data.Length; |  | ||||||
|             str1 = str.Trim(); |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             str = _Data.Substring(_I, num - _I); |  | ||||||
|             _I = num + text.Length; |  | ||||||
|             str1 = str.Trim(); |  | ||||||
|         } |  | ||||||
|         return str1; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string GetBefore(string text, bool trim) |  | ||||||
|     { |  | ||||||
|         string str; |  | ||||||
|         string before; |  | ||||||
|         if (!trim) |  | ||||||
|         { |  | ||||||
|             int num = _Data.IndexOf(text, _I); |  | ||||||
|             if (num <= -1) |  | ||||||
|             { |  | ||||||
|                 str = _Data.Substring(_I); |  | ||||||
|                 _I = _Data.Length; |  | ||||||
|                 before = str; |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 str = _Data.Substring(_I, num - _I); |  | ||||||
|                 _I = num + text.Length; |  | ||||||
|                 before = str; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             before = GetBefore(text); |  | ||||||
|         } |  | ||||||
|         return before; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string GetToEOL() => GetBefore("\n"); |  | ||||||
|  |  | ||||||
|     private string GetToEOL(bool trim) |  | ||||||
|     { |  | ||||||
|         string str; |  | ||||||
|         str = !trim ? GetBefore("\n", false) : GetToEOL(); |  | ||||||
|         return str; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string GetToken() |  | ||||||
|     { |  | ||||||
|         while (true) |  | ||||||
|         { |  | ||||||
|             if (_I >= _Data.Length || !IsNullOrWhiteSpace(_Data.Substring(_I, 1))) |  | ||||||
|                 break; |  | ||||||
|             _I++; |  | ||||||
|         } |  | ||||||
|         int num = _I; |  | ||||||
|         while (true) |  | ||||||
|         { |  | ||||||
|             if (num >= _Data.Length || IsNullOrWhiteSpace(_Data.Substring(num, 1))) |  | ||||||
|                 break; |  | ||||||
|             num++; |  | ||||||
|         } |  | ||||||
|         string str = _Data.Substring(_I, num - _I); |  | ||||||
|         _I = num; |  | ||||||
|         return str.Trim(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string GetToText(string text) |  | ||||||
|     { |  | ||||||
|         string str = _Data.Substring(_I, _Data.IndexOf(text, _I) - _I).Trim(); |  | ||||||
|         return str; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private bool IsBlankLine() |  | ||||||
|     { |  | ||||||
|         int num = _Data.IndexOf("\n", _I); |  | ||||||
|         return IsNullOrWhiteSpace(num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I)); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static bool IsNullOrWhiteSpace(string text) |  | ||||||
|     { |  | ||||||
|         bool flag; |  | ||||||
|         int num = 0; |  | ||||||
|         while (true) |  | ||||||
|         { |  | ||||||
|             if (num >= text.Length) |  | ||||||
|             { |  | ||||||
|                 flag = true; |  | ||||||
|                 break; |  | ||||||
|             } |  | ||||||
|             else if (char.IsWhiteSpace(text[num])) |  | ||||||
|             { |  | ||||||
|                 num++; |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 flag = false; |  | ||||||
|                 break; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return flag; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private string PeekNextLine() |  | ||||||
|     { |  | ||||||
|         int num = _I; |  | ||||||
|         string toEOL = GetToEOL(); |  | ||||||
|         _I = num; |  | ||||||
|         return toEOL; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private void ScanPast(string text) |  | ||||||
|     { |  | ||||||
|         int num = _Data.IndexOf(text, _I); |  | ||||||
|         if (num <= -1) |  | ||||||
|         { |  | ||||||
|             _I = _Data.Length; |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             _I = num + text.Length; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     internal static DateTime GetDateTime(Logistics logistics, string dateTimeText) |  | ||||||
|     { |  | ||||||
|         DateTime result; |  | ||||||
|         string inputDateFormat = "HH:mm MM/dd/yy"; |  | ||||||
|         if (dateTimeText.Length != inputDateFormat.Length) |  | ||||||
|             result = logistics.DateTimeFromSequence; |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             if (!DateTime.TryParseExact(dateTimeText, inputDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) |  | ||||||
|                 result = logistics.DateTimeFromSequence; |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 if (dateTimeParsed < logistics.DateTimeFromSequence.AddDays(1) && dateTimeParsed > logistics.DateTimeFromSequence.AddDays(-1)) |  | ||||||
|                     result = dateTimeParsed; |  | ||||||
|                 else |  | ||||||
|                     result = logistics.DateTimeFromSequence; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments) |  | ||||||
|     { |  | ||||||
|         string rds; |  | ||||||
|         string reactor; |  | ||||||
|         if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText)) |  | ||||||
|             reactor = defaultReactor; |  | ||||||
|         else |  | ||||||
|             reactor = segments[0]; |  | ||||||
|         if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99) |  | ||||||
|             rds = defaultRDS; |  | ||||||
|         else |  | ||||||
|             rds = segments[1]; |  | ||||||
|         if (reactor.Length > 3) |  | ||||||
|         { |  | ||||||
|             rds = reactor; |  | ||||||
|             reactor = defaultReactor; |  | ||||||
|         } |  | ||||||
|         return new(reactor, rds); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments) |  | ||||||
|     { |  | ||||||
|         string psn; |  | ||||||
|         string layer; |  | ||||||
|         if (segments.Length <= 2) |  | ||||||
|         { |  | ||||||
|             psn = defaultPSN; |  | ||||||
|             layer = defaultLayer; |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             string[] segmentsB = segments[2].Split('.'); |  | ||||||
|             psn = segmentsB[0]; |  | ||||||
|             if (segmentsB.Length <= 1) |  | ||||||
|                 layer = defaultLayer; |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 layer = segmentsB[1]; |  | ||||||
|                 if (layer.Length > 1 && layer[0] == '0') |  | ||||||
|                     layer = layer.Substring(1); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         return (layer, psn); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static string GetZone(string[] segments) |  | ||||||
|     { |  | ||||||
|         string result; |  | ||||||
|         if (segments.Length <= 3) |  | ||||||
|             result = string.Empty; |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             result = segments[3]; |  | ||||||
|             if (result.Length > 1 && result[0] == '0') |  | ||||||
|                 result = result.Substring(1); |  | ||||||
|         } |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public static Descriptor GetDescriptor(string text) |  | ||||||
|     { |  | ||||||
|         Descriptor result; |  | ||||||
|         string psn; |  | ||||||
|         string rds; |  | ||||||
|         string run; |  | ||||||
|         string zone; |  | ||||||
|         string layer; |  | ||||||
|         string title; |  | ||||||
|         string reactor; |  | ||||||
|         string employee; |  | ||||||
|         string defaultPSN = string.Empty; |  | ||||||
|         string defaultRDS = string.Empty; |  | ||||||
|         string defaultZone = string.Empty; |  | ||||||
|         string defaultLayer = string.Empty; |  | ||||||
|         string defaultReactor = string.Empty; |  | ||||||
|         string defaultEmployee = string.Empty; |  | ||||||
|         if (Regex.IsMatch(text, @"^[a-zA-z][0-9]{2,4}$")) |  | ||||||
|         { |  | ||||||
|             run = text.ToUpper(); |  | ||||||
|             title = text; |  | ||||||
|             psn = defaultPSN; |  | ||||||
|             rds = defaultRDS; |  | ||||||
|             zone = defaultZone; |  | ||||||
|             layer = defaultLayer; |  | ||||||
|             reactor = defaultReactor; |  | ||||||
|             employee = defaultEmployee; |  | ||||||
|         } |  | ||||||
|         else if (string.IsNullOrEmpty(text) || (text.Length is 2 or 3 && Regex.IsMatch(text, "^[a-zA-z]{2,3}"))) |  | ||||||
|         { |  | ||||||
|             run = text; |  | ||||||
|             title = text; |  | ||||||
|             employee = text; |  | ||||||
|             psn = defaultPSN; |  | ||||||
|             rds = defaultRDS; |  | ||||||
|             zone = defaultZone; |  | ||||||
|             layer = defaultLayer; |  | ||||||
|             reactor = defaultReactor; |  | ||||||
|         } |  | ||||||
|         else if (Regex.IsMatch(text, @"^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}")) |  | ||||||
|         { |  | ||||||
|             string[] segments = text.Split('.'); |  | ||||||
|             run = text; |  | ||||||
|             title = text; |  | ||||||
|             psn = defaultPSN; |  | ||||||
|             rds = defaultRDS; |  | ||||||
|             layer = segments[1]; |  | ||||||
|             reactor = segments[0]; |  | ||||||
|             employee = defaultEmployee; |  | ||||||
|             if (segments.Length <= 2) |  | ||||||
|                 zone = defaultZone; |  | ||||||
|             else |  | ||||||
|                 zone = segments[2]; |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             // Remove illegal characters \/:*?"<>| found in the run. |  | ||||||
|             title = Regex.Replace(text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; |  | ||||||
|             if (title.Length > 2 && title[0] == '1' && (title[1] == 'T' || title[1] == 't')) |  | ||||||
|                 title = title.Substring(2); |  | ||||||
|             run = title; |  | ||||||
|             string[] segments = title.Split('-'); |  | ||||||
|             // bool hasRDS = Regex.IsMatch(title, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?"); |  | ||||||
|             (reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments); |  | ||||||
|             (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments); |  | ||||||
|             zone = GetZone(segments); |  | ||||||
|             employee = defaultEmployee; |  | ||||||
|         } |  | ||||||
|         result = new(employee, layer, psn, rds, reactor, run, title, zone); |  | ||||||
|         return result; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private void Set(Logistics logistics, string receivedData) |  | ||||||
|     { |  | ||||||
|         string lot; |  | ||||||
|         string psn; |  | ||||||
|         string rds; |  | ||||||
|         string run; |  | ||||||
|         string temp; |  | ||||||
|         string zone; |  | ||||||
|         string layer; |  | ||||||
|         string title; |  | ||||||
|         DateTime date; |  | ||||||
|         string recipe; |  | ||||||
|         string dlRatio; |  | ||||||
|         string equipId; |  | ||||||
|         string reactor; |  | ||||||
|         string employee; |  | ||||||
|         string engineer; |  | ||||||
|         string resistivitySpec; |  | ||||||
|         ScanPast("RUN:"); |  | ||||||
|         title = GetToEOL(); |  | ||||||
|         ScanPast("Recipe:"); |  | ||||||
|         recipe = GetBefore("RESISTIVITY SPEC:"); |  | ||||||
|         if (string.IsNullOrEmpty(recipe)) |  | ||||||
|         { |  | ||||||
|             _I = 0; |  | ||||||
|             _Data = receivedData; |  | ||||||
|             ScanPast("RUN:"); |  | ||||||
|             title = GetToEOL(); |  | ||||||
|             ScanPast("DEVICE:"); |  | ||||||
|             recipe = GetBefore("RESISTIVITY SPEC:"); |  | ||||||
|         } |  | ||||||
|         title = title.Trim(); |  | ||||||
|         if (title[0] != '[' && title[title.Length - 1] != ']') |  | ||||||
|             throw new Exception("Lot summary data is invalid or missing."); |  | ||||||
|         title = title.Substring(1, title.Length - 2); |  | ||||||
|         Descriptor descriptor = GetDescriptor(title); |  | ||||||
|         psn = descriptor.PSN; |  | ||||||
|         rds = descriptor.RDS; |  | ||||||
|         run = descriptor.Run; |  | ||||||
|         zone = descriptor.Zone; |  | ||||||
|         layer = descriptor.Layer; |  | ||||||
|         title = descriptor.Title; |  | ||||||
|         reactor = descriptor.Reactor; |  | ||||||
|         employee = descriptor.Employee; |  | ||||||
|         resistivitySpec = GetToEOL(); |  | ||||||
|         ScanPast("EQUIP#:"); |  | ||||||
|         equipId = GetBefore("Engineer:"); |  | ||||||
|         // Remove illegal characters \/:*?"<>| found in the equipId. |  | ||||||
|         equipId = Regex.Replace(equipId, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; |  | ||||||
|         engineer = GetToEOL(); |  | ||||||
|         ScanPast("LotID:"); |  | ||||||
|         lot = GetBefore("D.L.RATIO:"); |  | ||||||
|         dlRatio = GetToEOL(); |  | ||||||
|         ScanPast("OPERATOR:"); |  | ||||||
|         if (!string.IsNullOrEmpty(employee)) |  | ||||||
|             _ = GetBefore("TEMP:"); |  | ||||||
|         else |  | ||||||
|             employee = GetBefore("TEMP:"); |  | ||||||
|         temp = GetToken(); |  | ||||||
|         string dateTimeText = GetToEOL(); |  | ||||||
|         date = GetDateTime(logistics, dateTimeText); |  | ||||||
|         //create filename / unique id |  | ||||||
|         string timeFormat = "yyyyMMddHHmmss"; |  | ||||||
|         _Log.Debug($"****ParseData - Title:{title}; EquipId:{equipId};"); |  | ||||||
|         if (string.IsNullOrEmpty(title)) |  | ||||||
|             throw new Exception("Batch (title) information does not exist"); |  | ||||||
|         Lot = lot; |  | ||||||
|         PSN = psn; |  | ||||||
|         RDS = rds; |  | ||||||
|         Run = run; |  | ||||||
|         Date = date; |  | ||||||
|         Temp = temp; |  | ||||||
|         Zone = zone; |  | ||||||
|         Layer = layer; |  | ||||||
|         Recipe = recipe; |  | ||||||
|         DLRatio = dlRatio; |  | ||||||
|         Reactor = reactor; |  | ||||||
|         Employee = employee; |  | ||||||
|         Engineer = engineer; |  | ||||||
|         ResistivitySpec = resistivitySpec; |  | ||||||
|         UniqueId = string.Concat(equipId, "_", title, "_", logistics.DateTimeFromSequence.ToString(timeFormat)); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection) |  | ||||||
|     { |  | ||||||
|         if (fileRead is null) |  | ||||||
|             throw new ArgumentNullException(nameof(fileRead)); |  | ||||||
|         // Convert the source file to UTF8Encoding format and then back to string for processing.  This convertion |  | ||||||
|         // shall eliminate the special HEX characters such as 0x18 "CANCEL" and 0x20 "SPACE" captured via nPort. |  | ||||||
|         string rawText = File.ReadAllText(logistics.ReportFullPath); |  | ||||||
|         UTF8Encoding utf8Encoding = new(); |  | ||||||
|         byte[] bytes = utf8Encoding.GetBytes(rawText); |  | ||||||
|         string convertedText = utf8Encoding.GetString(bytes); |  | ||||||
|         // Replaces all control characters with a space, except for the TAB (0x09), LF (0x0A), CR (0x0D), and |  | ||||||
|         // normal ASCII characters, which are valid characters for SharePoint. |  | ||||||
|         string receivedData = Regex.Replace(convertedText, @"[^\u0009\u000A\u000D\u0020-\u007E]", " "); |  | ||||||
|         string log = receivedData; |  | ||||||
|         for (short i = 0; i < short.MaxValue; i++) |  | ||||||
|         { |  | ||||||
|             if (!log.Contains("   ")) |  | ||||||
|                 break; |  | ||||||
|             log = log.Replace("   ", "  "); |  | ||||||
|         } |  | ||||||
|         log = log.Replace("  ", "\t").Replace(": ", "\t").Replace(":\t", "\t"); |  | ||||||
|         IEnumerable<string> lines = from l in log.Split('\r') select l.Trim(); |  | ||||||
|         string logFile = Path.ChangeExtension(logistics.ReportFullPath, ".log"); |  | ||||||
|         File.WriteAllLines(logFile, lines); |  | ||||||
|         fileInfoCollection.Add(new FileInfo(logFile)); |  | ||||||
|         //parse file |  | ||||||
|         string h = string.Empty; |  | ||||||
|         receivedData = receivedData.Replace("\r", "\n").Trim(); |  | ||||||
|         _I = 0; |  | ||||||
|         _Data = string.Empty; |  | ||||||
|         if (string.IsNullOrEmpty(receivedData)) |  | ||||||
|             throw new Exception("No data!"); |  | ||||||
|         Detail detail; |  | ||||||
|         _I = 0; |  | ||||||
|         _Data = receivedData; |  | ||||||
|         List<Detail> details = new(); |  | ||||||
|         Set(logistics, receivedData); |  | ||||||
|         ScanPast("AutoOptimizeGain ="); |  | ||||||
|         AutoOptimizeGain = GetBefore("AutoProbeHeightSet ="); |  | ||||||
|         AutoProbeHeightSet = GetToEOL(); |  | ||||||
|         ScanPast("DataReject"); |  | ||||||
|         DataReject = GetToEOL(); |  | ||||||
|         _ = GetToEOL(); |  | ||||||
|         FileName = GetToEOL(); |  | ||||||
|         _ = GetToEOL(); |  | ||||||
|         _ = GetToEOL(); |  | ||||||
|         bool check = false; |  | ||||||
|         while (!IsBlankLine()) |  | ||||||
|         { |  | ||||||
|             detail = new Detail() { Pt = GetToken() }; |  | ||||||
|             if (detail.Pt.Contains("Avg")) |  | ||||||
|                 break; |  | ||||||
|             else if (!detail.Pt.Contains(':')) |  | ||||||
|             { |  | ||||||
|                 detail.R = GetToken(); |  | ||||||
|                 detail.T = GetToken(); |  | ||||||
|                 detail.Rs = GetToken(); |  | ||||||
|                 detail.Merit = GetToken(); |  | ||||||
|                 detail.UniqueId = string.Concat("_Point-", details.Count + 1); |  | ||||||
|                 _ = GetToEOL(); |  | ||||||
|                 details.Add(detail); |  | ||||||
|             } |  | ||||||
|             else |  | ||||||
|             { |  | ||||||
|                 check = true; |  | ||||||
|                 break; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         _I = 0; |  | ||||||
|         _Data = receivedData; |  | ||||||
|         if (!check) |  | ||||||
|         { |  | ||||||
|             ScanPast("Avg ="); |  | ||||||
|             Avg = GetToken(); |  | ||||||
|             StdDev = GetToken(); |  | ||||||
|             ScanPast("SEMI Radial="); |  | ||||||
|             SemiRadial = GetToEOL(); |  | ||||||
|         } |  | ||||||
|         else |  | ||||||
|         { |  | ||||||
|             ScanPast("RsAv "); |  | ||||||
|             Avg = GetBefore("+/-"); |  | ||||||
|             StdDev = GetToken(); |  | ||||||
|             _Log.Debug($"****ProcessData - RsAv StDev={StdDev}"); |  | ||||||
|             ScanPast("(Mx+Mn)"); |  | ||||||
|             SemiRadial = GetToken(); |  | ||||||
|             _Log.Debug($"****ProcessData - RsAv SemiRadial={SemiRadial}"); |  | ||||||
|             _ = GetToEOL(); |  | ||||||
|             int num = 0; |  | ||||||
|             _ = GetBefore(": "); |  | ||||||
|             for (string i = GetToken(); !string.IsNullOrEmpty(i); i = GetToken()) |  | ||||||
|             { |  | ||||||
|                 if (!i.Contains(':')) |  | ||||||
|                 { |  | ||||||
|                     detail = new Detail(); |  | ||||||
|                     int num1 = num + 1; |  | ||||||
|                     num = num1; |  | ||||||
|                     _Log.Debug($"****ProcessData - RsAv Point={num1}"); |  | ||||||
|                     detail.Pt = num1.ToString(); |  | ||||||
|                     detail.Rs = i; |  | ||||||
|                     detail.Merit = GetToken().Replace("|", ""); |  | ||||||
|                     detail.UniqueId = string.Concat("_Point-", details.Count + 1); |  | ||||||
|                     details.Add(detail); |  | ||||||
|                 } |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         foreach (Detail item in details) |  | ||||||
|         { |  | ||||||
|             item.HeaderUniqueId = UniqueId; |  | ||||||
|             item.UniqueId = string.Concat(item, item.UniqueId); |  | ||||||
|         } |  | ||||||
|         _Details.AddRange(details); |  | ||||||
|         fileInfoCollection.Add(logistics.FileInfo); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| #nullable enable |  | ||||||
|  |  | ||||||
|     internal static List<Description> GetDescriptions(JsonElement[] jsonElements) |  | ||||||
|     { |  | ||||||
|         List<Description> results = new(); |  | ||||||
|         Description? description; |  | ||||||
|         JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; |  | ||||||
|         foreach (JsonElement jsonElement in jsonElements) |  | ||||||
|         { |  | ||||||
|             if (jsonElement.ValueKind != JsonValueKind.Object) |  | ||||||
|                 throw new Exception(); |  | ||||||
|             description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions); |  | ||||||
|             if (description is null) |  | ||||||
|                 continue; |  | ||||||
|             results.Add(description); |  | ||||||
|         } |  | ||||||
|         return results; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -35,7 +35,7 @@ | |||||||
|         <RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08RESIMAPCDE" /> |         <RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08RESIMAPCDE" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="coverlet.collector" Version="6.0.2" /> |         <PackageReference Include="coverlet.collector" Version="6.0.3" /> | ||||||
|         <PackageReference Include="FFMpegCore" Version="5.1.0" /> |         <PackageReference Include="FFMpegCore" Version="5.1.0" /> | ||||||
|         <PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|         <PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
| @ -44,41 +44,39 @@ | |||||||
|         <PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|         <PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|         <PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|         <PackageReference Include="Instances" Version="3.0.0" /> |         <PackageReference Include="Instances" Version="3.0.1" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" /> |         <PackageReference Include="log4net" Version="3.0.3"></PackageReference> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" /> |         <PackageReference Include="Microsoft.Extensions.Configuration.json" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" /> |         <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> |         <PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" /> |         <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> | ||||||
|         <PackageReference Include="MSTest.TestAdapter" Version="3.6.1" /> |         <PackageReference Include="Microsoft.Win32.SystemEvents" Version="9.0.0" /> | ||||||
|         <PackageReference Include="MSTest.TestFramework" Version="3.6.1" /> |         <PackageReference Include="MSTest.TestAdapter" Version="3.7.0" /> | ||||||
|  |         <PackageReference Include="MSTest.TestFramework" Version="3.7.0" /> | ||||||
|         <PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|         <PackageReference Include="RoboSharp" Version="1.5.3" /> |         <PackageReference Include="RoboSharp" Version="1.6.0" /> | ||||||
|         <PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.1" /> |         <PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" /> | ||||||
|         <PackageReference Include="System.Data.OleDb" Version="8.0.1" /> |         <PackageReference Include="System.Data.OleDb" Version="9.0.0" /> | ||||||
|         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> |         <PackageReference Include="System.Data.SqlClient" Version="4.8.6" /> | ||||||
|         <PackageReference Include="System.Drawing.Common" Version="8.0.10" /> |         <PackageReference Include="System.Drawing.Common" Version="9.0.0" /> | ||||||
|         <PackageReference Include="System.Text.Json" Version="8.0.5" /> |         <PackageReference Include="System.Text.Json" Version="9.0.0" /> | ||||||
|         <PackageReference Include="Tesseract" Version="5.2.0" /> |  | ||||||
|     </ItemGroup> |  | ||||||
|     <ItemGroup> |  | ||||||
|         <PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" /> |  | ||||||
|         <PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" /> |  | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" /> | ||||||
|         <PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference> |         <PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" /> | ||||||
|         <PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference> |     </ItemGroup> | ||||||
|  |     <ItemGroup> | ||||||
|  |         <PackageReference Include="Tesseract" Version="5.2.0" /> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|     <ItemGroup> |     <ItemGroup> | ||||||
|         <None Include="appsettings.json"> |         <None Include="appsettings.json"> | ||||||
|  | |||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE4 : EAFLoggingUnitTesting | public class CDE4 : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class CDE4 : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE4__RsM() |     public void Production__v2_57_0__CDE4__RsM() | ||||||
|     { |     { | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE5_EQPT : EAFLoggingUnitTesting | public class CDE5_EQPT : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class CDE5_EQPT : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE5_EQPT__DownloadRsMFile() |     public void Production__v2_57_0__CDE5_EQPT__DownloadRsMFile() | ||||||
|     { |     { | ||||||
|         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; |         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE5 : EAFLoggingUnitTesting | public class CDE5 : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class CDE5 : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE5__RsM() |     public void Production__v2_57_0__CDE5__RsM() | ||||||
|     { |     { | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE6_EQPT : EAFLoggingUnitTesting | public class CDE6_EQPT : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class CDE6_EQPT : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6_EQPT__DownloadRsMFile() |     public void Production__v2_57_0__CDE6_EQPT__DownloadRsMFile() | ||||||
|     { |     { | ||||||
|         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; |         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE6 : EAFLoggingUnitTesting | public class CDE6 : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class CDE6 : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6__RsM() |     public void Production__v2_57_0__CDE6__RsM() | ||||||
|     { |     { | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -7,7 +7,7 @@ using System.Diagnostics; | |||||||
| using System.IO; | using System.IO; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; | namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class MET08RESIMAPCDE : EAFLoggingUnitTesting | public class MET08RESIMAPCDE : EAFLoggingUnitTesting | ||||||
| @ -52,7 +52,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles() |     public void Production__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -65,7 +65,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -78,7 +78,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__IQSSi() |     public void Production__v2_57_0__MET08RESIMAPCDE__IQSSi() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -91,7 +91,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsight() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -104,7 +104,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -117,7 +117,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__APC() |     public void Production__v2_57_0__MET08RESIMAPCDE__APC() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -130,7 +130,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__SPaCe() |     public void Production__v2_57_0__MET08RESIMAPCDE__SPaCe() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -143,7 +143,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Processed() |     public void Production__v2_57_0__MET08RESIMAPCDE__Processed() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -156,7 +156,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Archive() |     public void Production__v2_57_0__MET08RESIMAPCDE__Archive() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -169,7 +169,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Dummy() |     public void Production__v2_57_0__MET08RESIMAPCDE__Dummy() | ||||||
|     { |     { | ||||||
|         string check = "637400762024374000.zip"; |         string check = "637400762024374000.zip"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
| @ -1,4 +1,4 @@ | |||||||
| #if v2_57_0 | #if true | ||||||
| using Adaptation.Shared; | using Adaptation.Shared; | ||||||
| using Adaptation.Shared.Methods; | using Adaptation.Shared.Methods; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
| @ -6,7 +6,7 @@ using System; | |||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE4 | public class CDE4 | ||||||
| @ -15,35 +15,34 @@ public class CDE4 | |||||||
| #pragma warning disable CA2254 | #pragma warning disable CA2254 | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
| 
 | 
 | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.CDE4 _CDE4; |     private static CreateSelfDescription.Production.v2_57_0.CDE4 _CDE4; | ||||||
| 
 | 
 | ||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitialize(TestContext testContext) |     public static void ClassInitialize(TestContext testContext) | ||||||
|     { |     { | ||||||
|         CreateSelfDescription.Staging.v2_57_0.CDE4.ClassInitialize(testContext); |         CreateSelfDescription.Production.v2_57_0.CDE4.ClassInitialize(testContext); | ||||||
|         _CDE4 = CreateSelfDescription.Staging.v2_57_0.CDE4.EAFLoggingUnitTesting; |         _CDE4 = CreateSelfDescription.Production.v2_57_0.CDE4.EAFLoggingUnitTesting; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE4__RsM() => _CDE4.Staging__v2_57_0__CDE4__RsM(); |     public void Production__v2_57_0__CDE4__RsM() => _CDE4.Production__v2_57_0__CDE4__RsM(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE4__RsM637919422210000000__Normal() |     public void Production__v2_57_0__CDE4__RsM637919422210000000__Normal() | ||||||
|     { |     { | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         _CDE4.Staging__v2_57_0__CDE4__RsM(); |         _CDE4.Production__v2_57_0__CDE4__RsM(); | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         string[] variables = _CDE4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); |         string[] variables = _CDE4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); | ||||||
|         IFileRead fileRead = _CDE4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); |         IFileRead fileRead = _CDE4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); | ||||||
|         Logistics logistics = new(fileRead); |         Logistics logistics = new(fileRead); | ||||||
| 
 |  | ||||||
|         _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); |         _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); | ||||||
|         dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty); |         dateTime = FileHandlers.RsM.ProcessData.GetDateTime(logistics, string.Empty); | ||||||
|         Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); |         Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); | ||||||
							
								
								
									
										29
									
								
								Adaptation/_Tests/Extract/Production/v2.57.0/CDE5-EQPT.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								Adaptation/_Tests/Extract/Production/v2.57.0/CDE5-EQPT.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | #if true | ||||||
|  | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
|  |  | ||||||
|  | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
|  |  | ||||||
|  | [TestClass] | ||||||
|  | public class CDE5_EQPT | ||||||
|  | { | ||||||
|  |  | ||||||
|  | #pragma warning disable CA2254 | ||||||
|  | #pragma warning disable IDE0060 | ||||||
|  |  | ||||||
|  |     private static CreateSelfDescription.Production.v2_57_0.CDE5_EQPT _CDE5_EQPT; | ||||||
|  |  | ||||||
|  |     [ClassInitialize] | ||||||
|  |     public static void ClassInitialize(TestContext testContext) | ||||||
|  |     { | ||||||
|  |         CreateSelfDescription.Production.v2_57_0.CDE5_EQPT.ClassInitialize(testContext); | ||||||
|  |         _CDE5_EQPT = CreateSelfDescription.Production.v2_57_0.CDE5_EQPT.EAFLoggingUnitTesting; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  | #if DEBUG | ||||||
|  |     [Ignore] | ||||||
|  | #endif | ||||||
|  |     [TestMethod] | ||||||
|  |     public void Production__v2_57_0__CDE5_EQPT__DownloadRsMFile() => _CDE5_EQPT.Production__v2_57_0__CDE5_EQPT__DownloadRsMFile(); | ||||||
|  |  | ||||||
|  | } | ||||||
|  | #endif | ||||||
| @ -1,4 +1,4 @@ | |||||||
| #if v2_57_0 | #if true | ||||||
| using Adaptation.Shared; | using Adaptation.Shared; | ||||||
| using Adaptation.Shared.Methods; | using Adaptation.Shared.Methods; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
| @ -6,7 +6,7 @@ using System; | |||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE5 | public class CDE5 | ||||||
| @ -15,13 +15,13 @@ public class CDE5 | |||||||
| #pragma warning disable CA2254 | #pragma warning disable CA2254 | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
| 
 | 
 | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.CDE5 _CDE5; |     private static CreateSelfDescription.Production.v2_57_0.CDE5 _CDE5; | ||||||
| 
 | 
 | ||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitialize(TestContext testContext) |     public static void ClassInitialize(TestContext testContext) | ||||||
|     { |     { | ||||||
|         CreateSelfDescription.Staging.v2_57_0.CDE5.ClassInitialize(testContext); |         CreateSelfDescription.Production.v2_57_0.CDE5.ClassInitialize(testContext); | ||||||
|         _CDE5 = CreateSelfDescription.Staging.v2_57_0.CDE5.EAFLoggingUnitTesting; |         _CDE5 = CreateSelfDescription.Production.v2_57_0.CDE5.EAFLoggingUnitTesting; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private static void NonThrowTryCatch() |     private static void NonThrowTryCatch() | ||||||
| @ -35,18 +35,18 @@ public class CDE5 | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE5__RsM() => _CDE5.Staging__v2_57_0__CDE5__RsM(); |     public void Production__v2_57_0__CDE5__RsM() => _CDE5.Production__v2_57_0__CDE5__RsM(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE5__RsM637952212190000000__Normal() |     public void Production__v2_57_0__CDE5__RsM637952212190000000__Normal() | ||||||
|     { |     { | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         bool validatePDSF = false; |         bool validatePDSF = false; | ||||||
|         _CDE5.Staging__v2_57_0__CDE5__RsM(); |         _CDE5.Production__v2_57_0__CDE5__RsM(); | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); |         Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); | ||||||
|         string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); |         string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
| @ -64,11 +64,11 @@ public class CDE5 | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE5__RsM638181148290431160__WMO() |     public void Production__v2_57_0__CDE5__RsM638181148290431160__WMO() | ||||||
|     { |     { | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         bool validatePDSF = false; |         bool validatePDSF = false; | ||||||
|         _CDE5.Staging__v2_57_0__CDE5__RsM(); |         _CDE5.Production__v2_57_0__CDE5__RsM(); | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); |         Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); | ||||||
|         string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); |         string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
| @ -1,10 +1,10 @@ | |||||||
| #if v2_57_0 | #if true | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| using System.Threading; | using System.Threading; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE6_EQPT | public class CDE6_EQPT | ||||||
| @ -13,29 +13,29 @@ public class CDE6_EQPT | |||||||
| #pragma warning disable CA2254 | #pragma warning disable CA2254 | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
| 
 | 
 | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.CDE6_EQPT _CDE6_EQPT; |     private static CreateSelfDescription.Production.v2_57_0.CDE6_EQPT _CDE6_EQPT; | ||||||
| 
 | 
 | ||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitialize(TestContext testContext) |     public static void ClassInitialize(TestContext testContext) | ||||||
|     { |     { | ||||||
|         CreateSelfDescription.Staging.v2_57_0.CDE6_EQPT.ClassInitialize(testContext); |         CreateSelfDescription.Production.v2_57_0.CDE6_EQPT.ClassInitialize(testContext); | ||||||
|         _CDE6_EQPT = CreateSelfDescription.Staging.v2_57_0.CDE6_EQPT.EAFLoggingUnitTesting; |         _CDE6_EQPT = CreateSelfDescription.Production.v2_57_0.CDE6_EQPT.EAFLoggingUnitTesting; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6_EQPT__DownloadRsMFile() => _CDE6_EQPT.Staging__v2_57_0__CDE6_EQPT__DownloadRsMFile(); |     public void Production__v2_57_0__CDE6_EQPT__DownloadRsMFile() => _CDE6_EQPT.Production__v2_57_0__CDE6_EQPT__DownloadRsMFile(); | ||||||
| 
 | 
 | ||||||
|     [Ignore] |     [Ignore] | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6_EQPT__DownloadRsMFile638065099250000000__Normal() |     public void Production__v2_57_0__CDE6_EQPT__DownloadRsMFile638065099250000000__Normal() | ||||||
|     { |     { | ||||||
|         bool validatePDSF = false; |         bool validatePDSF = false; | ||||||
|         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; |         string check = "CDE_Logs|WaferMeasurementData.log|.RsM"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         _CDE6_EQPT.Staging__v2_57_0__CDE6_EQPT__DownloadRsMFile(); |         _CDE6_EQPT.Production__v2_57_0__CDE6_EQPT__DownloadRsMFile(); | ||||||
|         _ = _CDE6_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); |         _ = _CDE6_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
|         for (int i = 0; i < int.MaxValue; i++) |         for (int i = 0; i < int.MaxValue; i++) | ||||||
|             Thread.Sleep(500); |             Thread.Sleep(500); | ||||||
| @ -1,4 +1,4 @@ | |||||||
| #if v2_57_0 | #if true | ||||||
| using Adaptation.Shared; | using Adaptation.Shared; | ||||||
| using Adaptation.Shared.Methods; | using Adaptation.Shared.Methods; | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; | using Microsoft.VisualStudio.TestTools.UnitTesting; | ||||||
| @ -6,7 +6,7 @@ using System; | |||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class CDE6 | public class CDE6 | ||||||
| @ -15,31 +15,31 @@ public class CDE6 | |||||||
| #pragma warning disable CA2254 | #pragma warning disable CA2254 | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
| 
 | 
 | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.CDE6 _CDE6; |     private static CreateSelfDescription.Production.v2_57_0.CDE6 _CDE6; | ||||||
| 
 | 
 | ||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitialize(TestContext testContext) |     public static void ClassInitialize(TestContext testContext) | ||||||
|     { |     { | ||||||
|         CreateSelfDescription.Staging.v2_57_0.CDE6.ClassInitialize(testContext); |         CreateSelfDescription.Production.v2_57_0.CDE6.ClassInitialize(testContext); | ||||||
|         _CDE6 = CreateSelfDescription.Staging.v2_57_0.CDE6.EAFLoggingUnitTesting; |         _CDE6 = CreateSelfDescription.Production.v2_57_0.CDE6.EAFLoggingUnitTesting; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6__RsM() => _CDE6.Staging__v2_57_0__CDE6__RsM(); |     public void Production__v2_57_0__CDE6__RsM() => _CDE6.Production__v2_57_0__CDE6__RsM(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__CDE6__RsM638065099250000000__Normal() |     public void Production__v2_57_0__CDE6__RsM638065099250000000__Normal() | ||||||
|     { |     { | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string check = "*.RsM"; |         string check = "*.RsM"; | ||||||
|         bool validatePDSF = false; |         bool validatePDSF = false; | ||||||
|         _CDE6.Staging__v2_57_0__CDE6__RsM(); |         _CDE6.Production__v2_57_0__CDE6__RsM(); | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         Assert.IsFalse(string.IsNullOrEmpty(_CDE6.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); |         Assert.IsFalse(string.IsNullOrEmpty(_CDE6.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); | ||||||
|         string[] variables = _CDE6.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); |         string[] variables = _CDE6.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
| @ -7,7 +7,7 @@ using System; | |||||||
| using System.Diagnostics; | using System.Diagnostics; | ||||||
| using System.Reflection; | using System.Reflection; | ||||||
| 
 | 
 | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; | namespace Adaptation._Tests.Extract.Production.v2_57_0; | ||||||
| 
 | 
 | ||||||
| [TestClass] | [TestClass] | ||||||
| public class MET08RESIMAPCDE | public class MET08RESIMAPCDE | ||||||
| @ -16,13 +16,13 @@ public class MET08RESIMAPCDE | |||||||
| #pragma warning disable CA2254 | #pragma warning disable CA2254 | ||||||
| #pragma warning disable IDE0060 | #pragma warning disable IDE0060 | ||||||
| 
 | 
 | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.MET08RESIMAPCDE _MET08RESIMAPCDE; |     private static CreateSelfDescription.Production.v2_57_0.MET08RESIMAPCDE _MET08RESIMAPCDE; | ||||||
| 
 | 
 | ||||||
|     [ClassInitialize] |     [ClassInitialize] | ||||||
|     public static void ClassInitialize(TestContext testContext) |     public static void ClassInitialize(TestContext testContext) | ||||||
|     { |     { | ||||||
|         CreateSelfDescription.Staging.v2_57_0.MET08RESIMAPCDE.ClassInitialize(testContext); |         CreateSelfDescription.Production.v2_57_0.MET08RESIMAPCDE.ClassInitialize(testContext); | ||||||
|         _MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_57_0.MET08RESIMAPCDE.EAFLoggingUnitTesting; |         _MET08RESIMAPCDE = CreateSelfDescription.Production.v2_57_0.MET08RESIMAPCDE.EAFLoggingUnitTesting; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private static void NonThrowTryCatch() |     private static void NonThrowTryCatch() | ||||||
| @ -36,18 +36,18 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles(); |     public void Production__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal() |     public void Production__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles637953064190000000__Normal() | ||||||
|     { |     { | ||||||
|         DateTime dateTime; |         DateTime dateTime; | ||||||
|         string check = "*"; |         string check = "*"; | ||||||
|         bool validatePDSF = false; |         bool validatePDSF = false; | ||||||
|         _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles(); |         _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__MoveMatchingFiles(); | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         Assert.IsFalse(string.IsNullOrEmpty(_MET08RESIMAPCDE.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); |         Assert.IsFalse(string.IsNullOrEmpty(_MET08RESIMAPCDE.AdaptationTesting.TestContext.FullyQualifiedTestClassName)); | ||||||
|         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); |         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); | ||||||
| @ -64,17 +64,17 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer638127615724700306__NewColumn() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer638127615724700306__NewColumn() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); |         _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewer(); | ||||||
|         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); |         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); | ||||||
|         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); |         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); | ||||||
|         Logistics logistics = new(fileRead); |         Logistics logistics = new(fileRead); | ||||||
| @ -85,23 +85,23 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__IQSSi(); |     public void Production__v2_57_0__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__IQSSi(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight(); |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsight(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight638054501710000000__IqsSql() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsight638054501710000000__IqsSql() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight(); |         _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsight(); | ||||||
|         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); |         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); | ||||||
|         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); |         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); | ||||||
|         Logistics logistics = new(fileRead); |         Logistics logistics = new(fileRead); | ||||||
| @ -112,11 +112,11 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight638116271690000000__IqsSql() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsight638116271690000000__IqsSql() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight(); |         _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsight(); | ||||||
|         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); |         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); | ||||||
|         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); |         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); | ||||||
|         Logistics logistics = new(fileRead); |         Logistics logistics = new(fileRead); | ||||||
| @ -127,11 +127,11 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight638159693274771954__IqsSqlButSplit() |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsight638159693274771954__IqsSqlButSplit() | ||||||
|     { |     { | ||||||
|         string check = "*.pdsf"; |         string check = "*.pdsf"; | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |         MethodBase methodBase = new StackFrame().GetMethod(); | ||||||
|         _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsight(); |         _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsight(); | ||||||
|         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); |         string[] variables = _MET08RESIMAPCDE.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); | ||||||
|         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); |         IFileRead fileRead = _MET08RESIMAPCDE.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); | ||||||
|         Logistics logistics = new(fileRead); |         Logistics logistics = new(fileRead); | ||||||
| @ -143,37 +143,37 @@ public class MET08RESIMAPCDE | |||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments(); |     public void Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__APC(); |     public void Production__v2_57_0__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__APC(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__SPaCe(); |     public void Production__v2_57_0__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__SPaCe(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__Processed(); |     public void Production__v2_57_0__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__Processed(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__Archive(); |     public void Production__v2_57_0__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__Archive(); | ||||||
| 
 | 
 | ||||||
| #if DEBUG | #if DEBUG | ||||||
|     [Ignore] |     [Ignore] | ||||||
| #endif | #endif | ||||||
|     [TestMethod] |     [TestMethod] | ||||||
|     public void Staging__v2_57_0__MET08RESIMAPCDE__Dummy() => _MET08RESIMAPCDE.Staging__v2_57_0__MET08RESIMAPCDE__Dummy(); |     public void Production__v2_57_0__MET08RESIMAPCDE__Dummy() => _MET08RESIMAPCDE.Production__v2_57_0__MET08RESIMAPCDE__Dummy(); | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
| @ -1,29 +0,0 @@ | |||||||
| #if v2_57_0 |  | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; |  | ||||||
|  |  | ||||||
| namespace Adaptation._Tests.Extract.Staging.v2_57_0; |  | ||||||
|  |  | ||||||
| [TestClass] |  | ||||||
| public class CDE5_EQPT |  | ||||||
| { |  | ||||||
|  |  | ||||||
| #pragma warning disable CA2254 |  | ||||||
| #pragma warning disable IDE0060 |  | ||||||
|  |  | ||||||
|     private static CreateSelfDescription.Staging.v2_57_0.CDE5_EQPT _CDE5_EQPT; |  | ||||||
|  |  | ||||||
|     [ClassInitialize] |  | ||||||
|     public static void ClassInitialize(TestContext testContext) |  | ||||||
|     { |  | ||||||
|         CreateSelfDescription.Staging.v2_57_0.CDE5_EQPT.ClassInitialize(testContext); |  | ||||||
|         _CDE5_EQPT = CreateSelfDescription.Staging.v2_57_0.CDE5_EQPT.EAFLoggingUnitTesting; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| #if DEBUG |  | ||||||
|     [Ignore] |  | ||||||
| #endif |  | ||||||
|     [TestMethod] |  | ||||||
|     public void Staging__v2_57_0__CDE5_EQPT__DownloadRsMFile() => _CDE5_EQPT.Staging__v2_57_0__CDE5_EQPT__DownloadRsMFile(); |  | ||||||
|  |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
| @ -183,11 +183,9 @@ public class RsM : LoggingUnitTesting, IDisposable | |||||||
|         StringBuilder results = new(); |         StringBuilder results = new(); | ||||||
|         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] |         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] | ||||||
|         { |         { | ||||||
|             new("CDE3", "v2.57.0"), |  | ||||||
|             new("CDE4", "v2.57.0"), |             new("CDE4", "v2.57.0"), | ||||||
|             new("CDE5", "v2.57.0"), |             new("CDE5", "v2.57.0"), | ||||||
|             new("CDE6", "v2.57.0"), |             new("CDE6", "v2.57.0"), | ||||||
|             new("CDE3-EQPT", "v2.57.0"), |  | ||||||
|             new("CDE4-EQPT", "v2.57.0"), |             new("CDE4-EQPT", "v2.57.0"), | ||||||
|             new("CDE5-EQPT", "v2.57.0"), |             new("CDE5-EQPT", "v2.57.0"), | ||||||
|             new("CDE6-EQPT", "v2.57.0"), |             new("CDE6-EQPT", "v2.57.0"), | ||||||
|  | |||||||
| @ -1,244 +0,0 @@ | |||||||
| using Adaptation._Tests.Shared; |  | ||||||
| using Microsoft.Extensions.Logging; |  | ||||||
| using Microsoft.VisualStudio.TestTools.UnitTesting; |  | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Diagnostics; |  | ||||||
| using System.IO; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Reflection; |  | ||||||
| using System.Text; |  | ||||||
|  |  | ||||||
| namespace Adaptation._Tests.Static; |  | ||||||
|  |  | ||||||
| [TestClass] |  | ||||||
| public class TXT : LoggingUnitTesting, IDisposable |  | ||||||
| { |  | ||||||
|  |  | ||||||
| #pragma warning disable CA2254 |  | ||||||
| #pragma warning disable IDE0060 |  | ||||||
|  |  | ||||||
|     internal static TXT LoggingUnitTesting { get; private set; } |  | ||||||
|  |  | ||||||
|     public TXT() : base(testContext: null, declaringType: null) |  | ||||||
|     { |  | ||||||
|         if (LoggingUnitTesting is null) |  | ||||||
|             throw new Exception(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public TXT(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) |  | ||||||
|     { |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     [ClassInitialize] |  | ||||||
|     public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new TXT(testContext); |  | ||||||
|  |  | ||||||
|     [ClassCleanup()] |  | ||||||
|     public static void ClassCleanup() |  | ||||||
|     { |  | ||||||
|         LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); |  | ||||||
|         LoggingUnitTesting?.Dispose(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     private static void NonThrowTryCatch() |  | ||||||
|     { |  | ||||||
|         try |  | ||||||
|         { throw new Exception(); } |  | ||||||
|         catch (Exception) { } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     [TestMethod] |  | ||||||
|     public void TestDateTime() |  | ||||||
|     { |  | ||||||
|         DateTime dateTime = DateTime.Now; |  | ||||||
|         Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     [TestMethod] |  | ||||||
|     public void TestDescriptor() |  | ||||||
|     { |  | ||||||
|         FileHandlers.txt.Descriptor descriptor; |  | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |  | ||||||
|         LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor(string.Empty); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234"); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "12"); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "123456"); |  | ||||||
|         Assert.IsTrue(descriptor.PSN is "1234"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("123456"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "123456"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("1T123456"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "123456"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("MP"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(descriptor.Employee is "MP"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.2-1"); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "12"); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "123456"); |  | ||||||
|         Assert.IsTrue(descriptor.PSN is "1234"); |  | ||||||
|         Assert.IsTrue(descriptor.Layer is "2"); |  | ||||||
|         Assert.IsTrue(descriptor.Zone is "1"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("12-123456-1234.02-1"); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "12"); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "123456"); |  | ||||||
|         Assert.IsTrue(descriptor.PSN is "1234"); |  | ||||||
|         Assert.IsTrue(descriptor.Layer is "2"); |  | ||||||
|         Assert.IsTrue(descriptor.Zone is "1"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20"); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "20"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2"); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "20"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(descriptor.Layer is "2"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.2.1"); |  | ||||||
|         Assert.IsTrue(descriptor.Layer is "2"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "20"); |  | ||||||
|         Assert.IsTrue(descriptor.Zone is "1"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("20.1.1"); |  | ||||||
|         Assert.IsTrue(descriptor.Layer is "1"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "20"); |  | ||||||
|         Assert.IsTrue(descriptor.Zone is "1"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("P2-LOW-RR"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(descriptor.PSN is "RR"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "P2"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("i171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "i171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("o171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "o171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("O171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(descriptor.RDS is "O171308.1.51"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.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)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("75-QP1414-SPLIT4"); |  | ||||||
|         Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Title)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(descriptor.PSN is "SPLIT4"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS)); |  | ||||||
|         Assert.IsTrue(descriptor.Reactor is "75"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("B48"); |  | ||||||
|         Assert.IsTrue(descriptor.Run == "B48"); |  | ||||||
|         descriptor = FileHandlers.txt.ProcessData.GetDescriptor("B48"); |  | ||||||
|         Assert.IsTrue(descriptor.Run == "B48"); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN)); |  | ||||||
|         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")); |  | ||||||
|         NonThrowTryCatch(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| #if DEBUG |  | ||||||
|     [Ignore] |  | ||||||
| #endif |  | ||||||
|     [TestMethod] |  | ||||||
|     public void Production() |  | ||||||
|     { |  | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |  | ||||||
|         StringBuilder results = new(); |  | ||||||
|         (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] |  | ||||||
|         { |  | ||||||
|             new("CDE2", "v2.57.0"), |  | ||||||
|         }; |  | ||||||
|         string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; |  | ||||||
|         Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; |  | ||||||
|         LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); |  | ||||||
|         foreach ((string cellInstanceName, string cellInstanceVersionName) in collection) |  | ||||||
|         { |  | ||||||
|             cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration"); |  | ||||||
|             _ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}"); |  | ||||||
|         } |  | ||||||
|         string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; |  | ||||||
|         if (!Directory.Exists(sourceDirectory)) |  | ||||||
|             _ = Directory.CreateDirectory(sourceDirectory); |  | ||||||
|         File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString()); |  | ||||||
|         LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     [TestMethod] |  | ||||||
|     public void CellInstanceVersionEdaConnectionPortNumber() |  | ||||||
|     { |  | ||||||
|         MethodBase methodBase = new StackFrame().GetMethod(); |  | ||||||
|         string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; |  | ||||||
|         if (Directory.Exists(sourceDirectory)) |  | ||||||
|         { |  | ||||||
|             string destinationDirectory = Path.Combine(sourceDirectory, "All"); |  | ||||||
|             if (!Directory.Exists(destinationDirectory)) |  | ||||||
|                 _ = Directory.CreateDirectory(destinationDirectory); |  | ||||||
|             List<string> lines = new(); |  | ||||||
|             string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly); |  | ||||||
|             foreach (string file in files) |  | ||||||
|                 lines.AddRange(File.ReadAllLines(file)); |  | ||||||
|             File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l)); |  | ||||||
|         } |  | ||||||
|         LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); |  | ||||||
|         NonThrowTryCatch(); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
| } |  | ||||||
| @ -118,7 +118,6 @@ | |||||||
|     <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" /> |     <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" /> |     <Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" /> |     <Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\Complete.cs" /> |  | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\Description.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\Description.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\Descriptor.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\Descriptor.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\Detail.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\Detail.cs" /> | ||||||
| @ -144,12 +143,9 @@ | |||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> |     <Compile Include="Adaptation\FileHandlers\RsM\ProcessData.cs" /> | ||||||
|  |     <Compile Include="Adaptation\FileHandlers\RsM\Row.cs" /> | ||||||
|  |     <Compile Include="Adaptation\FileHandlers\RsM\Run.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" /> |     <Compile Include="Adaptation\FileHandlers\SPaCe\FileRead.cs" /> | ||||||
|     <Compile Include="Adaptation\FileHandlers\txt\Description.cs" /> |  | ||||||
|     <Compile Include="Adaptation\FileHandlers\txt\Descriptor.cs" /> |  | ||||||
|     <Compile Include="Adaptation\FileHandlers\txt\Detail.cs" /> |  | ||||||
|     <Compile Include="Adaptation\FileHandlers\txt\FileRead.cs" /> |  | ||||||
|     <Compile Include="Adaptation\FileHandlers\txt\ProcessData.cs" /> |  | ||||||
|     <Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" /> |     <Compile Include="Adaptation\Ifx\Eaf\Common\Configuration\ConnectionSetting.cs" /> | ||||||
|     <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" /> |     <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\File.cs" /> | ||||||
|     <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\FilePathGenerator.cs" /> |     <Compile Include="Adaptation\Ifx\Eaf\EquipmentConnector\File\Component\FilePathGenerator.cs" /> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user