#pragma warning disable ...
#pragma warning restore ...
This commit is contained in:
1
Adaptation/.vscode/format-report.json
vendored
Normal file
1
Adaptation/.vscode/format-report.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
[]
|
5
Adaptation/.vscode/settings.json
vendored
5
Adaptation/.vscode/settings.json
vendored
@ -5,11 +5,14 @@
|
||||
"datauniqueid",
|
||||
"EQPT",
|
||||
"headerid",
|
||||
"Hmmssffff",
|
||||
"ipdsf",
|
||||
"ISMTP",
|
||||
"MEPI",
|
||||
"PDSF",
|
||||
"STDD",
|
||||
"THFTIRQS",
|
||||
"THFTIRSTRATUS"
|
||||
"THFTIRSTRATUS",
|
||||
"TRDS"
|
||||
]
|
||||
}
|
@ -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;
|
||||
@ -166,7 +168,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
void IFileRead.Callback(object state) => Callback(state);
|
||||
|
||||
protected List<Stratus.Description> GetDescriptions(JsonElement[] jsonElements)
|
||||
protected static List<Stratus.Description> GetDescriptions(JsonElement[] jsonElements)
|
||||
{
|
||||
List<Stratus.Description> results = new();
|
||||
Stratus.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;
|
||||
|
@ -178,7 +178,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;
|
||||
|
@ -118,7 +118,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string directoryName = Path.GetDirectoryName(reportFullPath);
|
||||
string sequenceDirectoryName = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _Logistics.Sequence);
|
||||
string originalDataBioRad = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _OriginalDataBioRad, _Logistics.Sequence, ".txt");
|
||||
List<Tuple<string, bool, DateTime, string>> tuples = ProcessData.GetTuples(this, _Logistics, dateTime, results.Item4, _OriginalDataBioRad);
|
||||
List<Tuple<string, bool, DateTime, string>> tuples = ProcessData.GetTuples(this, _Logistics, results.Item4, _OriginalDataBioRad);
|
||||
if (_IsEAFHosted)
|
||||
{
|
||||
if (tuples.Any())
|
||||
@ -126,7 +126,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!Directory.Exists(sequenceDirectoryName))
|
||||
_ = Directory.CreateDirectory(sequenceDirectoryName);
|
||||
File.Move(reportFullPath, originalDataBioRad);
|
||||
_Log.Debug(string.Concat("****Extract() - Renamed [", reportFullPath, "] to [", originalDataBioRad, "]"));
|
||||
_Log.Debug(string.Concat("****Extract() - Renamed [", reportFullPath, "] to [", originalDataBioRad, "] ", dateTime.Ticks));
|
||||
}
|
||||
foreach (Tuple<string, bool, DateTime, string> tuple in tuples)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ namespace Adaptation.FileHandlers.txt;
|
||||
public partial class ProcessData
|
||||
{
|
||||
|
||||
internal static List<Tuple<string, bool, DateTime, string>> GetTuples(FileRead fileRead, Logistics logistics, DateTime dateTime, List<FileInfo> fileInfoCollection, string originalDataBioRad)
|
||||
internal static List<Tuple<string, bool, DateTime, string>> GetTuples(FileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string originalDataBioRad)
|
||||
{
|
||||
List<Tuple<string, bool, DateTime, string>> results = new();
|
||||
ILog log = LogManager.GetLogger(typeof(ProcessData));
|
||||
@ -365,7 +365,9 @@ public partial class ProcessData
|
||||
stringIndex = dataText.IndexOf(recipeSearch);
|
||||
recipeName = dataText.Substring(stringIndex + recipeSearch.Length);
|
||||
log.Debug($"****Extract(FDR): recipeName = {recipeName}");
|
||||
if (!(string.IsNullOrEmpty(recipeName)) && (recipeName.IndexOf("center", StringComparison.CurrentCultureIgnoreCase) >= 0))
|
||||
#pragma warning disable CA2249
|
||||
if (!string.IsNullOrEmpty(recipeName) && (recipeName.IndexOf("center", StringComparison.CurrentCultureIgnoreCase) >= 0))
|
||||
#pragma warning restore CA2249
|
||||
{
|
||||
/***************************************/
|
||||
/* STRATUS Measurement = FQA Thickness */
|
||||
@ -377,7 +379,9 @@ public partial class ProcessData
|
||||
toolType = "STRATUS";
|
||||
dataType = "FQA Thickness";
|
||||
}
|
||||
else if (!(string.IsNullOrEmpty(recipeName)) && (recipeName.IndexOf("prod_", StringComparison.CurrentCultureIgnoreCase) >= 0))
|
||||
#pragma warning disable CA2249
|
||||
else if (!string.IsNullOrEmpty(recipeName) && (recipeName.IndexOf("prod_", StringComparison.CurrentCultureIgnoreCase) >= 0))
|
||||
#pragma warning restore CA2249
|
||||
{
|
||||
/******************************************/
|
||||
/* BIORAD Measurement = Product Thickness */
|
||||
@ -389,13 +393,15 @@ public partial class ProcessData
|
||||
toolType = "BIORAD";
|
||||
dataType = "Product Thickness";
|
||||
}
|
||||
else if (!(string.IsNullOrEmpty(recipeName)) &&
|
||||
else if (!string.IsNullOrEmpty(recipeName) &&
|
||||
#pragma warning disable CA2249
|
||||
((recipeName.IndexOf("T-Low", StringComparison.CurrentCultureIgnoreCase) >= 0) ||
|
||||
(recipeName.IndexOf("T_Low", StringComparison.CurrentCultureIgnoreCase) >= 0) ||
|
||||
(recipeName.IndexOf("T-Mid", StringComparison.CurrentCultureIgnoreCase) >= 0) ||
|
||||
(recipeName.IndexOf("T_Mid", StringComparison.CurrentCultureIgnoreCase) >= 0) ||
|
||||
(recipeName.IndexOf("T-High", StringComparison.CurrentCultureIgnoreCase) >= 0) ||
|
||||
(recipeName.IndexOf("T_High", StringComparison.CurrentCultureIgnoreCase) >= 0)))
|
||||
#pragma warning restore CA2249
|
||||
{
|
||||
/*************************************/
|
||||
/* BIORAD Measurement = No Uploading */
|
||||
|
@ -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 BIORAD4 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static BIORAD4 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public BIORAD4() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_36_3;
|
||||
[TestClass]
|
||||
public class BIORAD5 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static BIORAD5 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public BIORAD5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_36_3;
|
||||
[TestClass]
|
||||
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public MET08THFTIRSTRATUS() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||
[TestClass]
|
||||
public class BIORAD4 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static BIORAD4 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public BIORAD4() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||
[TestClass]
|
||||
public class BIORAD5 : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static BIORAD5 EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public BIORAD5() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -12,6 +12,10 @@ namespace _Tests.CreateSelfDescription.Staging.v2_39_0;
|
||||
[TestClass]
|
||||
public class MET08THFTIRSTRATUS : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static MET08THFTIRSTRATUS EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
public MET08THFTIRSTRATUS() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_36_3;
|
||||
public class BIORAD4
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_36_3.BIORAD4 _BIORAD4;
|
||||
|
||||
[ClassInitialize]
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_36_3;
|
||||
public class BIORAD5
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_36_3.BIORAD5 _BIORAD5;
|
||||
|
||||
[ClassInitialize]
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_36_3;
|
||||
public class MET08THFTIRSTRATUS
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_36_3.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
|
||||
|
||||
[ClassInitialize]
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_39_0;
|
||||
public class BIORAD4
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_39_0.BIORAD4 _BIORAD4;
|
||||
|
||||
[ClassInitialize]
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_39_0;
|
||||
public class BIORAD5
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_39_0.BIORAD5 _BIORAD5;
|
||||
|
||||
[ClassInitialize]
|
||||
|
@ -14,6 +14,9 @@ namespace _Tests.Extract.Staging.v2_39_0;
|
||||
public class MET08THFTIRSTRATUS
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_39_0.MET08THFTIRSTRATUS _MET08THFTIRSTRATUS;
|
||||
|
||||
[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("}");
|
||||
|
@ -24,11 +24,10 @@ using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading;
|
||||
|
||||
namespace MET08THFTIRSTRATUS.FileHandlers
|
||||
{
|
||||
namespace MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.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 MET08THFTIRSTRATUS.FileHandlers
|
||||
return results;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// 2021-12-16 -> FileRead
|
||||
// 2022-02-15 -> 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