#pragma warning disable ...
#pragma warning restore ...
This commit is contained in:
		
							
								
								
									
										20
									
								
								Adaptation/.vscode/format-report.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Adaptation/.vscode/format-report.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | ||||
| [ | ||||
|   { | ||||
|     "DocumentId": { | ||||
|       "ProjectId": { | ||||
|         "Id": "36ce7503-a7d8-470b-8576-22756424c451" | ||||
|       }, | ||||
|       "Id": "fcfbf07c-6987-4353-afb3-7491fde8d564" | ||||
|     }, | ||||
|     "FileName": "WS.cs", | ||||
|     "FilePath": "T:\\MET08THFTIRQS408M\\06_SourceCode\\MET08THFTIRQS408M\\Adaptation\\Shared\\Metrology\\WS.cs", | ||||
|     "FileChanges": [ | ||||
|       { | ||||
|         "LineNumber": 1, | ||||
|         "CharNumber": 1, | ||||
|         "DiagnosticId": "IMPORTS", | ||||
|         "FormatDescription": "Fix imports ordering." | ||||
|       } | ||||
|     ] | ||||
|   } | ||||
| ] | ||||
							
								
								
									
										10
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| { | ||||
|   "configurations": [ | ||||
|     { | ||||
|       "name": ".NET Core Attach", | ||||
|       "type": "coreclr", | ||||
|       "request": "attach", | ||||
|       "processId": 3316 | ||||
|     } | ||||
|   ] | ||||
| } | ||||
							
								
								
									
										6
									
								
								Adaptation/.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								Adaptation/.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @ -2,12 +2,16 @@ | ||||
|     "cSpell.words": [ | ||||
|         "BIORAD", | ||||
|         "CICN", | ||||
|         "datauniqueid", | ||||
|         "EQPT", | ||||
|         "headerid", | ||||
|         "Hmmssffff", | ||||
|         "ipdsf", | ||||
|         "ISMTP", | ||||
|         "messa", | ||||
|         "ntities", | ||||
|         "PDSF", | ||||
|         "THFTIRQS" | ||||
|         "THFTIRQS", | ||||
|         "uctor" | ||||
|     ] | ||||
| } | ||||
| @ -6,6 +6,11 @@ namespace Adaptation.Eaf.Core; | ||||
|  | ||||
| public class Backbone | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1822 | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public const string STATE_ERROR = "Error"; | ||||
|     public const string STATE_OFFLINE = "Offline"; | ||||
|     public const string STATE_RUNNING = "Running"; | ||||
| @ -44,4 +49,5 @@ public class Backbone | ||||
|     protected void CloseConnectionOfComponents(List<BackboneComponent> components) { } | ||||
|     protected virtual void StopAllComponents() { } | ||||
|     protected void StopComponents(List<BackboneComponent> components) { } | ||||
|  | ||||
| } | ||||
| @ -4,6 +4,10 @@ namespace Adaptation.Eaf.Core.Smtp; | ||||
|  | ||||
| public class EmailMessage | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public EmailMessage() { } | ||||
|     public EmailMessage(string subject, string body, MailPriority priority = MailPriority.Normal) { } | ||||
|  | ||||
|  | ||||
| @ -6,6 +6,11 @@ namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting; | ||||
|  | ||||
| public class ParameterValue | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1822 | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public ParameterValue(EquipmentParameter definition, object value) { } | ||||
|     public ParameterValue(EquipmentParameter definition, object value, DateTime timestamp) { } | ||||
|  | ||||
| @ -16,4 +21,5 @@ public class ParameterValue | ||||
|  | ||||
|     public virtual ParameterValue Clone(EquipmentParameter newDefinition) => throw new NotImplementedException(); | ||||
|     public override string ToString() => base.ToString(); | ||||
|  | ||||
| } | ||||
| @ -4,6 +4,10 @@ namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription; | ||||
|  | ||||
| public class EquipmentParameter | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public EquipmentParameter(EquipmentParameter source, ParameterTypeDefinition typeDefinition) { } | ||||
|     public EquipmentParameter(string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { } | ||||
|     public EquipmentParameter(string id, string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { } | ||||
| @ -19,4 +23,5 @@ public class EquipmentParameter | ||||
|  | ||||
|     public override string ToString() => base.ToString(); | ||||
|     public string ToStringWithDetails() => base.ToString(); | ||||
|  | ||||
| } | ||||
| @ -2,10 +2,15 @@ | ||||
|  | ||||
| public class Field | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public Field(string name, string description, bool canBeNull, ParameterTypeDefinition typeDefinition) { } | ||||
|  | ||||
|     public string Name { get; } | ||||
|     public string Description { get; } | ||||
|     public ParameterTypeDefinition TypeDefinition { get; } | ||||
|     public bool CanBeNull { get; } | ||||
|  | ||||
| } | ||||
| @ -2,10 +2,15 @@ | ||||
|  | ||||
| public abstract class ParameterTypeDefinition | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public ParameterTypeDefinition(string name, string description) { } | ||||
|  | ||||
|     public string Name { get; } | ||||
|     public string Description { get; } | ||||
|  | ||||
|     public override string ToString() => base.ToString(); | ||||
|  | ||||
| } | ||||
| @ -5,7 +5,12 @@ namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; | ||||
| public class StructuredType : ParameterTypeDefinition | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1822 | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public StructuredType(string name, string description, IList<Field> fields) : base(name, description) { } | ||||
|  | ||||
|     public IList<Field> Fields { get; } | ||||
|  | ||||
| } | ||||
| @ -5,6 +5,10 @@ namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; | ||||
| [System.Runtime.Serialization.DataContractAttribute(IsReference = true)] | ||||
| public class ModelObjectParameterDefinition : IConfigurationObject | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public ModelObjectParameterDefinition() { } | ||||
|     public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { } | ||||
|     public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { } | ||||
| @ -22,4 +26,5 @@ public class ModelObjectParameterDefinition : IConfigurationObject | ||||
|  | ||||
|     public virtual ModelObjectParameterDefinition Clone() => null; | ||||
|     public virtual bool IsValidValue(string value) => false; | ||||
|  | ||||
| } | ||||
| @ -21,6 +21,8 @@ namespace Adaptation.FileHandlers.MET08THFTIRQS408M; | ||||
| public class FileRead : Shared.FileRead, IFileRead | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1847 | ||||
|  | ||||
|     private readonly Timer _Timer; | ||||
|     private int _LastDummyRunIndex; | ||||
|     private readonly string _IqsFile; | ||||
| @ -164,7 +166,7 @@ public class FileRead : Shared.FileRead, IFileRead | ||||
|  | ||||
|     void IFileRead.Callback(object state) => Callback(state); | ||||
|  | ||||
|     protected List<QS408M.Description> GetDescriptions(JsonElement[] jsonElements) | ||||
|     protected static List<QS408M.Description> GetDescriptions(JsonElement[] jsonElements) | ||||
|     { | ||||
|         List<QS408M.Description> results = new(); | ||||
|         QS408M.Description description; | ||||
|  | ||||
| @ -217,7 +217,7 @@ public class Description : IDescription, Shared.Properties.IDescription | ||||
|         return results; | ||||
|     } | ||||
|  | ||||
|     private Description GetDisplayNames() | ||||
|     private static Description GetDisplayNames() | ||||
|     { | ||||
|         Description result = new(); | ||||
|         return result; | ||||
|  | ||||
| @ -186,7 +186,7 @@ public partial class ProcessData : IProcessData | ||||
|         return IsNullOrWhiteSpace((num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I))); | ||||
|     } | ||||
|  | ||||
|     private bool IsNullOrWhiteSpace(string text) | ||||
|     private static bool IsNullOrWhiteSpace(string text) | ||||
|     { | ||||
|         bool flag; | ||||
|         int num = 0; | ||||
|  | ||||
| @ -3,10 +3,15 @@ | ||||
| [System.Runtime.Serialization.DataContractAttribute] | ||||
| public class ConnectionSetting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public ConnectionSetting(string name, string value) { } | ||||
|  | ||||
|     [System.Runtime.Serialization.DataMemberAttribute] | ||||
|     public string Name { get; set; } | ||||
|     [System.Runtime.Serialization.DataMemberAttribute] | ||||
|     public string Value { get; set; } | ||||
|  | ||||
| } | ||||
| @ -5,6 +5,10 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; | ||||
|  | ||||
| public class File | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public File(string filePath) => throw new NotImplementedException(); | ||||
|     public File(string filePath, DateTime timeFileFound) => throw new NotImplementedException(); | ||||
|  | ||||
| @ -15,4 +19,5 @@ public class File | ||||
|  | ||||
|     public File UpdateContentParameters(Dictionary<string, string> contentParameters) => throw new NotImplementedException(); | ||||
|     public File UpdateParsingStatus(bool isErrorFile) => throw new NotImplementedException(); | ||||
|  | ||||
| } | ||||
| @ -6,6 +6,11 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; | ||||
|  | ||||
| public class FilePathGenerator | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1822 | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public const char PLACEHOLDER_IDENTIFIER = '%'; | ||||
|     public const char PLACEHOLDER_SEPARATOR = ':'; | ||||
|     public const string PLACEHOLDER_NOT_AVAILABLE = "NA"; | ||||
| @ -31,4 +36,5 @@ public class FilePathGenerator | ||||
|     protected virtual string GetSubFolder(string folderPattern, string subFolderPath) => throw new NotImplementedException(); | ||||
|     protected virtual string PrepareFolderPath(string targetFolderPath, string subFolderPath) => throw new NotImplementedException(); | ||||
|     protected string ReplacePlaceholder(string inputPath) => throw new NotImplementedException(); | ||||
|  | ||||
| } | ||||
| @ -6,8 +6,14 @@ namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription; | ||||
|  | ||||
| public class FileConnectorParameterTypeDefinitionProvider | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1822 | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     public FileConnectorParameterTypeDefinitionProvider() { } | ||||
|  | ||||
|     public IEnumerable<ParameterTypeDefinition> GetAllParameterTypeDefinition() => null; | ||||
|     public ParameterTypeDefinition GetParameterTypeDefinition(string name) => null; | ||||
|  | ||||
| } | ||||
| @ -112,13 +112,13 @@ public class Description : IDescription, Properties.IDescription | ||||
|         return results; | ||||
|     } | ||||
|  | ||||
|     private Description GetDisplayNames() | ||||
|     private static Description GetDisplayNames() | ||||
|     { | ||||
|         Description result = new(); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     private Description GetDefault(IFileRead fileRead, Logistics logistics) | ||||
|     private static Description GetDefault(IFileRead fileRead, Logistics logistics) | ||||
|     { | ||||
|         Description result = new() | ||||
|         { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Net.Http; | ||||
| using System.Text; | ||||
| using System.Text.Json; | ||||
| @ -9,6 +10,8 @@ namespace Adaptation.Shared.Metrology; | ||||
| public partial class WS | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA1847 | ||||
|  | ||||
|     public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120) | ||||
|     { | ||||
|         Results results = new(); | ||||
| @ -16,7 +19,7 @@ public partial class WS | ||||
|         try | ||||
|         { | ||||
|             string json = JsonSerializer.Serialize(payload, payload.GetType()); | ||||
|             if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains(".")) | ||||
|             if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.')) | ||||
|                 throw new Exception("Invalid URL"); | ||||
|             using (HttpClient httpClient = new()) | ||||
|             { | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_36_3; | ||||
| [TestClass] | ||||
| public class BIORAD2 : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static BIORAD2 EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public BIORAD2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_36_3; | ||||
| [TestClass] | ||||
| public class BIORAD3 : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static BIORAD3 EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public BIORAD3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_36_3; | ||||
| [TestClass] | ||||
| public class MET08THFTIRQS408M : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static MET08THFTIRQS408M EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public MET08THFTIRQS408M() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0; | ||||
| [TestClass] | ||||
| public class BIORAD2 : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static BIORAD2 EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public BIORAD2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0; | ||||
| [TestClass] | ||||
| public class BIORAD3 : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static BIORAD3 EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public BIORAD3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0; | ||||
| [TestClass] | ||||
| public class MET08THFTIRQS408M : EAFLoggingUnitTesting | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     internal static MET08THFTIRQS408M EAFLoggingUnitTesting { get; private set; } | ||||
|  | ||||
|     public MET08THFTIRQS408M() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) | ||||
|  | ||||
| @ -6,6 +6,9 @@ namespace _Tests.Extract.Staging.v2_36_3; | ||||
| public class BIORAD2 | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_36_3.BIORAD2 _BIORAD2; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_36_3; | ||||
| public class BIORAD3 | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_36_3.BIORAD3 _BIORAD3; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -6,6 +6,9 @@ namespace _Tests.Extract.Staging.v2_36_3; | ||||
| public class MET08THFTIRQS408M | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M _MET08THFTIRQS408M; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -6,6 +6,9 @@ namespace _Tests.Extract.Staging.v2_39_0; | ||||
| public class BIORAD2 | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_39_0.BIORAD2 _BIORAD2; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_39_0; | ||||
| public class BIORAD3 | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_39_0.BIORAD3 _BIORAD3; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -6,6 +6,9 @@ namespace _Tests.Extract.Staging.v2_39_0; | ||||
| public class MET08THFTIRQS408M | ||||
| { | ||||
|  | ||||
| #pragma warning disable CA2254 | ||||
| #pragma warning disable IDE0060 | ||||
|  | ||||
|     private static CreateSelfDescription.Staging.v2_39_0.MET08THFTIRQS408M _MET08THFTIRQS408M; | ||||
|  | ||||
|     [ClassInitialize] | ||||
|  | ||||
| @ -19,6 +19,10 @@ public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable | ||||
|             _AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary); | ||||
|     } | ||||
|  | ||||
|     public new void Dispose() => base.Dispose(); | ||||
|     public new void Dispose() | ||||
|     { | ||||
|         base.Dispose(); | ||||
|         GC.SuppressFinalize(this); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -102,6 +102,10 @@ public class LoggingUnitTesting : UnitTesting, IDisposable | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     public void Dispose() => _LoggerFactory.Dispose(); | ||||
|     public void Dispose() | ||||
|     { | ||||
|         _LoggerFactory.Dispose(); | ||||
|         GC.SuppressFinalize(this); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @ -9,6 +9,8 @@ | ||||
| public partial class CellInstanceVersion | ||||
| { | ||||
|  | ||||
| #pragma warning disable IDE1006 // Naming Styles | ||||
|  | ||||
|     private string createdByField; | ||||
|  | ||||
|     private System.DateTime creationDateField; | ||||
|  | ||||
| @ -11,6 +11,8 @@ | ||||
| public partial class EquipmentDictionaryVersion | ||||
| { | ||||
|  | ||||
| #pragma warning disable IDE1006 // Naming Styles | ||||
|  | ||||
|     private EquipmentDictionaryVersionAlarms alarmsField; | ||||
|  | ||||
|     private string createdByField; | ||||
|  | ||||
| @ -9,6 +9,8 @@ | ||||
| public partial class EquipmentTypeVersion | ||||
| { | ||||
|  | ||||
| #pragma warning disable IDE1006 // Naming Styles | ||||
|  | ||||
|     private string createdByField; | ||||
|  | ||||
|     private System.DateTime creationDateField; | ||||
|  | ||||
| @ -80,7 +80,7 @@ public class UnitTesting | ||||
|             AppendLine("      \"name\": \".NET Core Attach\","). | ||||
|             AppendLine("      \"type\": \"coreclr\","). | ||||
|             AppendLine("      \"request\": \"attach\","). | ||||
|             AppendLine($"      \"processId\": {Process.GetCurrentProcess().Id}"). | ||||
|             AppendLine($"      \"processId\": {Environment.ProcessId}"). | ||||
|             AppendLine("    }"). | ||||
|             AppendLine("  ]"). | ||||
|             AppendLine("}"); | ||||
|  | ||||
| @ -5,14 +5,14 @@ | ||||
|         "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn", | ||||
|         "pull": "git pull", | ||||
|         "garbage-collect": "git gc", | ||||
|         "AA-CreateSelfDescription.Staging.v2_39_0-BIORAD3_EQPT-Staging__v2_39_0__BIORAD3_EQPT__DownloadRsMFile": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD3_EQPT & Staging__v2_39_0__BIORAD3_EQPT__DownloadRsMFile\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AA-CreateSelfDescription.Staging.v2_39_0-BIORAD3_EQPT-Staging__v2_39_0__BIORAD3__QS408M": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD3_EQPT & Staging__v2_39_0__BIORAD3__QS408M\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AT-CreateSelfDescription.Staging.v2_39_0-MET08THFTIRQS408M": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~MET08THFTIRQS408M\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AV-CreateSelfDescription.Staging.v2_39_0-BIORAD2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD2_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AW-CreateSelfDescription.Staging.v2_39_0-BIORAD2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AX-CreateSelfDescription.Staging.v2_39_0-BIORAD3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD3_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AY-CreateSelfDescription.Staging.v2_39_0-BIORAD3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0 & ClassName~BIORAD3\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "AZ-CreateSelfDescription.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.CreateSelfDescription.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "BA-Extract.Staging.v2_39_0-BIORAD3-Staging__v2_39_0__BIORAD3__RsM643047560320000000__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD3 & Staging__v2_39_0__BIORAD3__RsM643047560320000000__Normal\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "BA-Extract.Staging.v2_39_0-BIORAD3-Staging__v2_39_0__BIORAD3__QS408M637406016892454000__ReactorAndRDS": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD3 & Staging__v2_39_0__BIORAD3__QS408M637406016892454000__ReactorAndRDS\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "BT-Extract.Staging.v2_39_0-MET08THFTIRQS408M": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~MET08THFTIRQS408M\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "BV-Extract.Staging.v2_39_0-BIORAD2_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD2_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|         "BW-Extract.Staging.v2_39_0-BIORAD2": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD2\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", | ||||
|  | ||||
| @ -24,11 +24,10 @@ using System.Text.Json; | ||||
| using System.Text.Json.Serialization; | ||||
| using System.Threading; | ||||
|  | ||||
| namespace MET08THFTIRQS408M.FileHandlers | ||||
| { | ||||
| namespace MET08THFTIRQS408M.FileHandlers; | ||||
|  | ||||
|     public partial class FileRead : FileReaderHandler, ISMTP | ||||
|     { | ||||
| public partial class FileRead : FileReaderHandler, ISMTP | ||||
| { | ||||
|  | ||||
|     private readonly ILog _Log; | ||||
|     private IFileRead _FileRead; | ||||
| @ -39,10 +38,7 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|     private readonly List<EquipmentParameter> _EquipmentParameters; | ||||
|     private static readonly Dictionary<string, List<long>> _DummyRuns; | ||||
|  | ||||
|         static FileRead() | ||||
|         { | ||||
|             _DummyRuns = new Dictionary<string, List<long>>(); | ||||
|         } | ||||
|     static FileRead() => _DummyRuns = new Dictionary<string, List<long>>(); | ||||
|  | ||||
|     public FileRead() | ||||
|     { | ||||
| @ -106,7 +102,7 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|     private void Send(EmailMessage emailMessage) | ||||
|     { | ||||
|         ISmtp smtp = Backbone.Instance.GetBackboneComponentsOfType<ISmtp>().SingleOrDefault(); | ||||
|             if (!(smtp is null)) | ||||
|         if (smtp is not null) | ||||
|             smtp.Send(emailMessage); | ||||
|     } | ||||
|  | ||||
| @ -177,9 +173,9 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|             equipmentParameter = new EquipmentParameter(jsonProperty.Name, parameterTypeDefinitions[jsonProperty.Value.ValueKind], description); | ||||
|             _EquipmentParameters.Add(equipmentParameter); | ||||
|         } | ||||
|             Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddParameterRange(_EquipmentParameters); | ||||
|         _ = Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddParameterRange(_EquipmentParameters); | ||||
|         _EquipmentEvent = new EquipmentEvent(_FileRead.EventName, _FileRead.GetEventDescription(), _EquipmentParameters); | ||||
|             Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddEvent(_EquipmentEvent); | ||||
|         _ = Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddEvent(_EquipmentEvent); | ||||
|     } | ||||
|  | ||||
|     private void CreateSelfDescription(MethodBase methodBase) | ||||
| @ -228,9 +224,9 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|  | ||||
|     private void FilePathGeneratorInfoMove(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception = null) | ||||
|     { | ||||
|             bool isErrorFile = !(exception is null); | ||||
|         bool isErrorFile = exception is not null; | ||||
|         object filePathGeneratorInfo = GetFilePathGeneratorInfo(_FileRead.ReportFullPath, isErrorFile); | ||||
|             if (!(filePathGeneratorInfo is null) && filePathGeneratorInfo is FilePathGeneratorInfo filePathGenerator) | ||||
|         if (filePathGeneratorInfo is not null and FilePathGeneratorInfo filePathGenerator) | ||||
|         { | ||||
|             string[] exceptionLines = _FileRead.Move(extractResults, filePathGenerator.To, filePathGenerator.From, filePathGenerator.ResolvedFileLocation, exception); | ||||
|             if (isErrorFile) | ||||
| @ -239,7 +235,7 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|                 { | ||||
|                     StringBuilder stringBuilder = new(); | ||||
|                     foreach (string item in exceptionLines) | ||||
|                             stringBuilder.Append("<").Append(item).AppendLine(">"); | ||||
|                         _ = stringBuilder.Append("<").Append(item).AppendLine(">"); | ||||
|                     ISmtp smtp = Backbone.Instance.GetBackboneComponentsOfType<ISmtp>().SingleOrDefault(); | ||||
|                     EmailMessage emailMessage = new(_FileRead.ExceptionSubject, stringBuilder.ToString(), MailPriority.High); | ||||
|                     smtp.Send(emailMessage); | ||||
| @ -289,7 +285,7 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|             { | ||||
|                 _Log.Debug(string.Concat("TriggerEvent - {", _FileRead.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length)); | ||||
|                 parameters = GetParameterValues(headerNames, extractResults.Item3, i); | ||||
|                     if (!(_EquipmentEvent is null)) | ||||
|                 if (_EquipmentEvent is not null) | ||||
|                     Equipment.DataCollection.TriggerEvent(_EquipmentEvent, parameters); | ||||
|                 if (_UseCyclicalForDescription) | ||||
|                     break; | ||||
| @ -350,7 +346,5 @@ namespace MET08THFTIRQS408M.FileHandlers | ||||
|         return results; | ||||
|     } | ||||
|  | ||||
|     } | ||||
|  | ||||
| } | ||||
| // 2021-12-16 -> FileRead | ||||
| @ -2,34 +2,19 @@ using System.Collections.Generic; | ||||
| using Ifx.Eaf.EquipmentConnector.File.Component; | ||||
| using Ifx.Eaf.EquipmentConnector.File.Configuration; | ||||
|  | ||||
| namespace Shared | ||||
| { | ||||
| namespace Shared; | ||||
|  | ||||
|     public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FilePathGenerator | ||||
|     { | ||||
| public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FilePathGenerator | ||||
| { | ||||
|  | ||||
|     public FileConnectorConfiguration FileConnectorConfiguration { get; private set; } | ||||
|  | ||||
|         public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) : base(config, customPattern) | ||||
|         { | ||||
|             FileConnectorConfiguration = config; | ||||
|         } | ||||
|     public FilePathGenerator(FileConnectorConfiguration config, Dictionary<string, string> customPattern = null) : base(config, customPattern) => FileConnectorConfiguration = config; | ||||
|  | ||||
|         public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, file, isErrorFile, customPattern) | ||||
|         { | ||||
|             FileConnectorConfiguration = config; | ||||
|         } | ||||
|     public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, file, isErrorFile, customPattern) => FileConnectorConfiguration = config; | ||||
|  | ||||
|         public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, sourceFilePath, isErrorFile, customPattern) | ||||
|         { | ||||
|             FileConnectorConfiguration = config; | ||||
|         } | ||||
|     public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary<string, string> customPattern = null) : base(config, sourceFilePath, isErrorFile, customPattern) => FileConnectorConfiguration = config; | ||||
|  | ||||
|         public string GetSubFolderPath() | ||||
|         { | ||||
|             return SubFolderPath; | ||||
|         } | ||||
|  | ||||
|     } | ||||
|     public string GetSubFolderPath() => SubFolderPath; | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -1,10 +1,9 @@ | ||||
| using System.IO; | ||||
|  | ||||
| namespace Shared | ||||
| { | ||||
| namespace Shared; | ||||
|  | ||||
|     public class FilePathGeneratorInfo | ||||
|     { | ||||
| public class FilePathGeneratorInfo | ||||
| { | ||||
|  | ||||
|     public string To { get; protected set; } | ||||
|     public string From { get; protected set; } | ||||
| @ -44,7 +43,7 @@ namespace Shared | ||||
| #if (true) | ||||
|             if (string.IsNullOrEmpty(original.FileConnectorConfiguration.DefaultPlaceHolderValue)) | ||||
|                 original.FileConnectorConfiguration.DefaultPlaceHolderValue = "NA"; | ||||
|                 if (!(fileParameter is null) && fileParameter.Count == 1 && To.Contains(original.FileConnectorConfiguration.DefaultPlaceHolderValue)) | ||||
|             if (fileParameter is not null && fileParameter.Count == 1 && To.Contains(original.FileConnectorConfiguration.DefaultPlaceHolderValue)) | ||||
|             { | ||||
|                 foreach (System.Collections.Generic.KeyValuePair<string, string> keyValuePair in fileParameter) | ||||
|                     To = To.Replace(string.Concat(original.FileConnectorConfiguration.DefaultPlaceHolderValue), keyValuePair.Value); | ||||
| @ -61,6 +60,4 @@ namespace Shared | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -2,11 +2,10 @@ using System.Collections.Generic; | ||||
| using Eaf.Management.ConfigurationData.CellAutomation; | ||||
| using Ifx.Eaf.EquipmentConnector.File.Configuration; | ||||
|  | ||||
| namespace Shared | ||||
| { | ||||
| namespace Shared; | ||||
|  | ||||
|     public static class Mapper | ||||
|     { | ||||
| public static class Mapper | ||||
| { | ||||
|  | ||||
|     internal static Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration Map(FileConnectorConfiguration configuration) | ||||
|     { | ||||
| @ -72,6 +71,4 @@ namespace Shared | ||||
|         return results; | ||||
|     } | ||||
|  | ||||
|     } | ||||
|  | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user