diff --git a/Adaptation/.vscode/settings.json b/Adaptation/.vscode/settings.json new file mode 100644 index 0000000..54aa980 --- /dev/null +++ b/Adaptation/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "cSpell.words": [ + "BIORAD", + "CICN", + "EQPT", + "Hmmssffff", + "ipdsf", + "ISMTP", + "messa", + "PDSF", + "THFTIRQS" + ] +} \ No newline at end of file diff --git a/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs b/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs index 4b83dcf..06ec233 100644 --- a/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs +++ b/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.Core +namespace Adaptation.Eaf.Core; + +public class BackboneComponent { - public class BackboneComponent - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs b/Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs index 5da2cda..69d3b7a 100644 --- a/Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs +++ b/Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.Core +namespace Adaptation.Eaf.Core; + +public class BackboneStatusCache { - public class BackboneStatusCache - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs b/Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs index ba939e7..62e12d8 100644 --- a/Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs +++ b/Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.Core +namespace Adaptation.Eaf.Core; + +public interface ILoggingSetupManager { - public interface ILoggingSetupManager - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs b/Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs index 4dc8f3b..f981297 100644 --- a/Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs +++ b/Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.Core +namespace Adaptation.Eaf.Core; + +public class StatusItem { - public class StatusItem - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/Backbone.cs b/Adaptation/Eaf/Core/Backbone.cs index d4b6f03..c4d294d 100644 --- a/Adaptation/Eaf/Core/Backbone.cs +++ b/Adaptation/Eaf/Core/Backbone.cs @@ -2,47 +2,46 @@ using System; using System.Collections.Generic; -namespace Adaptation.Eaf.Core +namespace Adaptation.Eaf.Core; + +public class Backbone { - public class Backbone - { - public const string STATE_ERROR = "Error"; - public const string STATE_OFFLINE = "Offline"; - public const string STATE_RUNNING = "Running"; - public const string STATE_SHUTDOWN = "Shutting Down"; - public const string STATE_STARTING = "Starting"; + public const string STATE_ERROR = "Error"; + public const string STATE_OFFLINE = "Offline"; + public const string STATE_RUNNING = "Running"; + public const string STATE_SHUTDOWN = "Shutting Down"; + public const string STATE_STARTING = "Starting"; - protected Backbone() { } + protected Backbone() { } - [NotNull] - public static Backbone Instance { get; } - [NotNull] - public ILoggingSetupManager LoggingConfigurationManager { get; set; } - public BackboneStatusCache Status { get; } - public bool IsAutomatedRestartActive { get; } - public bool IsReadyForRestart { get; } - public string StartTime { get; } - public string State { get; } - public string Name { get; } - public string ConfigurationServiceAddress { get; } - public string CellName { get; } - protected bool IsInitialized { get; set; } - protected Dictionary BackboneComponents { get; } + [NotNull] + public static Backbone Instance { get; } + [NotNull] + public ILoggingSetupManager LoggingConfigurationManager { get; set; } + public BackboneStatusCache Status { get; } + public bool IsAutomatedRestartActive { get; } + public bool IsReadyForRestart { get; } + public string StartTime { get; } + public string State { get; } + public string Name { get; } + public string ConfigurationServiceAddress { get; } + public string CellName { get; } + protected bool IsInitialized { get; set; } + protected Dictionary BackboneComponents { get; } - public void AddBackboneComponent(BackboneComponent backboneComponent) { } - public bool ContainsBackboneComponent(string id) { throw new NotImplementedException(); } - [Obsolete("Use the capabilities exposed via the Status property -> GetAll. Will be removed with next major release.")] - public List GetAllStatuses() { throw new NotImplementedException(); } - public BackboneComponent GetBackboneComponentById(string id) { throw new NotImplementedException(); } - public List GetBackboneComponentsOfType() { throw new NotImplementedException(); } - public List GetBackboneComponentsOfType(Type type) { throw new NotImplementedException(); } - public void RegisterSubprocess(int pid) { } - [Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")] - public void SetStatus(string statusName, string statusValue) { } - [Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")] - public void SetStatus(BackboneComponent source, string statusName, string statusValue) { } - protected void CloseConnectionOfComponents(List components) { } - protected virtual void StopAllComponents() { } - protected void StopComponents(List components) { } - } + public void AddBackboneComponent(BackboneComponent backboneComponent) { } + public bool ContainsBackboneComponent(string id) => throw new NotImplementedException(); + [Obsolete("Use the capabilities exposed via the Status property -> GetAll. Will be removed with next major release.")] + public List GetAllStatuses() => throw new NotImplementedException(); + public BackboneComponent GetBackboneComponentById(string id) => throw new NotImplementedException(); + public List GetBackboneComponentsOfType() => throw new NotImplementedException(); + public List GetBackboneComponentsOfType(Type type) => throw new NotImplementedException(); + public void RegisterSubprocess(int pid) { } + [Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")] + public void SetStatus(string statusName, string statusValue) { } + [Obsolete("Use the capabilities exposed via the Status property -> SetValue. Will be removed with next major release.")] + public void SetStatus(BackboneComponent source, string statusName, string statusValue) { } + protected void CloseConnectionOfComponents(List components) { } + protected virtual void StopAllComponents() { } + protected void StopComponents(List components) { } } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/Smtp/EmailMessage.cs b/Adaptation/Eaf/Core/Smtp/EmailMessage.cs index f0c2baf..7514985 100644 --- a/Adaptation/Eaf/Core/Smtp/EmailMessage.cs +++ b/Adaptation/Eaf/Core/Smtp/EmailMessage.cs @@ -1,24 +1,21 @@ using System; -namespace Adaptation.Eaf.Core.Smtp +namespace Adaptation.Eaf.Core.Smtp; + +public class EmailMessage { + public EmailMessage() { } + public EmailMessage(string subject, string body, MailPriority priority = MailPriority.Normal) { } - public class EmailMessage - { - public EmailMessage() { } - public EmailMessage(string subject, string body, MailPriority priority = MailPriority.Normal) { } + public string Body { get; } + public MailPriority Priority { get; } + public string Subject { get; } - public string Body { get; } - public MailPriority Priority { get; } - public string Subject { get; } - - public EmailMessage PriorityHigh() { throw new NotImplementedException(); } - public EmailMessage PriorityLow() { throw new NotImplementedException(); } - public EmailMessage PriorityNormal() { throw new NotImplementedException(); } - public EmailMessage SetBody(string body) { throw new NotImplementedException(); } - public EmailMessage SetPriority(MailPriority priority) { throw new NotImplementedException(); } - public EmailMessage SetSubject(string subject) { throw new NotImplementedException(); } - - } + public EmailMessage PriorityHigh() => throw new NotImplementedException(); + public EmailMessage PriorityLow() => throw new NotImplementedException(); + public EmailMessage PriorityNormal() => throw new NotImplementedException(); + public EmailMessage SetBody(string body) => throw new NotImplementedException(); + public EmailMessage SetPriority(MailPriority priority) => throw new NotImplementedException(); + public EmailMessage SetSubject(string subject) => throw new NotImplementedException(); } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/Smtp/ISmtp.cs b/Adaptation/Eaf/Core/Smtp/ISmtp.cs index 3a12278..0446065 100644 --- a/Adaptation/Eaf/Core/Smtp/ISmtp.cs +++ b/Adaptation/Eaf/Core/Smtp/ISmtp.cs @@ -1,9 +1,6 @@ -namespace Adaptation.Eaf.Core.Smtp +namespace Adaptation.Eaf.Core.Smtp; + +public interface ISmtp { - - public interface ISmtp - { - void Send(EmailMessage message); - } - + void Send(EmailMessage message); } \ No newline at end of file diff --git a/Adaptation/Eaf/Core/Smtp/MailPriority.cs b/Adaptation/Eaf/Core/Smtp/MailPriority.cs index 18ee1af..b59d146 100644 --- a/Adaptation/Eaf/Core/Smtp/MailPriority.cs +++ b/Adaptation/Eaf/Core/Smtp/MailPriority.cs @@ -1,11 +1,8 @@ -namespace Adaptation.Eaf.Core.Smtp +namespace Adaptation.Eaf.Core.Smtp; + +public enum MailPriority { - - public enum MailPriority - { - Low = 0, - Normal = 1, - High = 2 - } - + Low = 0, + Normal = 1, + High = 2 } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs index 096cfd8..80e911e 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class ChangeDataCollectionHandler { - public class ChangeDataCollectionHandler - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs index f085c14..d49c557 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class DataCollectionRequest { - public class DataCollectionRequest - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs index fd97bcb..9d45cb1 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class EquipmentEvent { - public class EquipmentEvent - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs index 1a3babd..c0cf1c3 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class EquipmentException { - public class EquipmentException - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs index 3697004..92d7722 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class EquipmentSelfDescription { - public class EquipmentSelfDescription - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs index bc26e0f..dca26fc 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class GetParameterValuesHandler { - public class GetParameterValuesHandler - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs index a9e800c..7481501 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IConnectionControl { - public interface IConnectionControl - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs index 3b98f85..cf0602a 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IDataTracingHandler { - public interface IDataTracingHandler - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs index 2a54add..9f6000e 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IEquipmentCommandService { - public interface IEquipmentCommandService - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs index a119d2b..8b4f8d1 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs @@ -1,16 +1,15 @@ using Adaptation.PeerGroup.GCL.Annotations; -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IEquipmentControl : IPackageSource { - public interface IEquipmentControl : IPackageSource - { - [NotNull] - IEquipmentSelfDescriptionBuilder SelfDescriptionBuilder { get; } - [NotNull] - IEquipmentDataCollection DataCollection { get; } - [NotNull] - IEquipmentCommandService Commands { get; } - [NotNull] - IConnectionControl Connection { get; } - } + [NotNull] + IEquipmentSelfDescriptionBuilder SelfDescriptionBuilder { get; } + [NotNull] + IEquipmentDataCollection DataCollection { get; } + [NotNull] + IEquipmentCommandService Commands { get; } + [NotNull] + IConnectionControl Connection { get; } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs index b583e8c..f34413f 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IEquipmentSelfDescriptionBuilder { - public interface IEquipmentSelfDescriptionBuilder - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs index 67ef808..eef26c3 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IPackage { - public interface IPackage - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs index 57b3215..be924e9 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface ISelfDescriptionLookup { - public interface ISelfDescriptionLookup - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs index 64e4621..e7a76fc 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IVirtualParameterValuesHandler { - public interface IVirtualParameterValuesHandler - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs index 200fb13..2615f40 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class SetParameterValuesHandler { - public class SetParameterValuesHandler - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs index 84511e9..8d26e7b 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public class TraceRequest { - public class TraceRequest - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs b/Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs index 7a704b5..d0980ee 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs @@ -3,37 +3,36 @@ using Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription; using System; using System.Collections.Generic; -namespace Adaptation.Eaf.EquipmentCore.Control -{ - public interface IEquipmentDataCollection - { - IVirtualParameterValuesHandler VirtualParameterValuesHandler { get; } - ISelfDescriptionLookup SelfDescriptionLookup { get; } - EquipmentSelfDescription SelfDescription { get; } - IEnumerable ActiveRequests { get; } - IDataTracingHandler DataTracingHandler { get; } +namespace Adaptation.Eaf.EquipmentCore.Control; - ParameterValue CreateParameterValue(EquipmentParameter parameter, object value); - void NotifyDataTracingAvailable(bool isAvailable); - void RegisterChangeDataCollectionHandler(ChangeDataCollectionHandler handler); - void RegisterDataTracingHandler(IDataTracingHandler handler); - void RegisterGetParameterValuesHandler(GetParameterValuesHandler handler); - void RegisterSetParameterValuesHandler(SetParameterValuesHandler handler); - void TriggerDeactivate(DataCollectionRequest deactivateRequest); - void TriggerEvent(EquipmentEvent equipmentEvent, IEnumerable parameters); - void TriggerEvent(EquipmentEvent equipmentEvent, IEnumerable parameters, IPackage sourcePackage); - void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters); - void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, IPackage sourcePackage); - void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride); - void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride, IPackage sourcePackage); - void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride, IPackage sourcePackage); - void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride); - void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, IPackage sourcePackage); - void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters); - void TriggerPerformanceRestored(); - void TriggerPerformanceWarning(); - void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters); - void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters, IPackage sourcePackage); - void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters, DateTime equipmentTimeStamp); - } +public interface IEquipmentDataCollection +{ + IVirtualParameterValuesHandler VirtualParameterValuesHandler { get; } + ISelfDescriptionLookup SelfDescriptionLookup { get; } + EquipmentSelfDescription SelfDescription { get; } + IEnumerable ActiveRequests { get; } + IDataTracingHandler DataTracingHandler { get; } + + ParameterValue CreateParameterValue(EquipmentParameter parameter, object value); + void NotifyDataTracingAvailable(bool isAvailable); + void RegisterChangeDataCollectionHandler(ChangeDataCollectionHandler handler); + void RegisterDataTracingHandler(IDataTracingHandler handler); + void RegisterGetParameterValuesHandler(GetParameterValuesHandler handler); + void RegisterSetParameterValuesHandler(SetParameterValuesHandler handler); + void TriggerDeactivate(DataCollectionRequest deactivateRequest); + void TriggerEvent(EquipmentEvent equipmentEvent, IEnumerable parameters); + void TriggerEvent(EquipmentEvent equipmentEvent, IEnumerable parameters, IPackage sourcePackage); + void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters); + void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, IPackage sourcePackage); + void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride); + void TriggerExceptionClear(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride, IPackage sourcePackage); + void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride, IPackage sourcePackage); + void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, string severityOverride, string descriptionOverride); + void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters, IPackage sourcePackage); + void TriggerExceptionSet(EquipmentException equipmentException, IEnumerable parameters); + void TriggerPerformanceRestored(); + void TriggerPerformanceWarning(); + void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters); + void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters, IPackage sourcePackage); + void TriggerTraceSample(TraceRequest traceRequest, long sampleId, IEnumerable parameters, DateTime equipmentTimeStamp); } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs b/Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs index 2c0371e..86760aa 100644 --- a/Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs +++ b/Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.EquipmentCore.Control +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IPackageSource { - public interface IPackageSource - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs b/Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs index 9f0b794..2c7cd04 100644 --- a/Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs +++ b/Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs @@ -2,19 +2,18 @@ using Adaptation.PeerGroup.GCL.Annotations; using System; -namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting +namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting; + +public class ParameterValue { - public class ParameterValue - { - public ParameterValue(EquipmentParameter definition, object value) { } - public ParameterValue(EquipmentParameter definition, object value, DateTime timestamp) { } + public ParameterValue(EquipmentParameter definition, object value) { } + public ParameterValue(EquipmentParameter definition, object value, DateTime timestamp) { } - public virtual object Value { get; protected internal set; } - [NotNull] - public EquipmentParameter Definition { get; } - public DateTime Timestamp { get; protected set; } + public virtual object Value { get; protected internal set; } + [NotNull] + public EquipmentParameter Definition { get; } + public DateTime Timestamp { get; protected set; } - public virtual ParameterValue Clone(EquipmentParameter newDefinition) { throw new NotImplementedException(); } - public override string ToString() { return base.ToString(); } - } + public virtual ParameterValue Clone(EquipmentParameter newDefinition) => throw new NotImplementedException(); + public override string ToString() => base.ToString(); } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs b/Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs index 852fb8d..30c2956 100644 --- a/Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs @@ -1,24 +1,22 @@ using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; -namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription; + +public class EquipmentParameter { - public class EquipmentParameter - { - 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) { } + 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) { } - public string Name { get; } - public string Id { get; } - public string Description { get; } - public string SourcePath { get; } - public string SourceEquipment { get; } - public ParameterTypeDefinition TypeDefinition { get; } - public bool IsTransient { get; } - public bool IsReadOnly { get; } - - public override string ToString() { return base.ToString(); } - public string ToStringWithDetails() { return base.ToString(); } - } + public string Name { get; } + public string Id { get; } + public string Description { get; } + public string SourcePath { get; } + public string SourceEquipment { get; } + public ParameterTypeDefinition TypeDefinition { get; } + public bool IsTransient { get; } + public bool IsReadOnly { get; } + public override string ToString() => base.ToString(); + public string ToStringWithDetails() => base.ToString(); } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs index a83b45f..57c77e1 100644 --- a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs @@ -1,12 +1,11 @@ -namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes -{ - public class Field - { - public Field(string name, string description, bool canBeNull, ParameterTypeDefinition typeDefinition) { } +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; - public string Name { get; } - public string Description { get; } - public ParameterTypeDefinition TypeDefinition { get; } - public bool CanBeNull { get; } - } +public class Field +{ + 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; } } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs index 65ad7dd..54af381 100644 --- a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs @@ -1,12 +1,11 @@ -namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +public abstract class ParameterTypeDefinition { - public abstract class ParameterTypeDefinition - { - public ParameterTypeDefinition(string name, string description) { } + public ParameterTypeDefinition(string name, string description) { } - public string Name { get; } - public string Description { get; } + public string Name { get; } + public string Description { get; } - public override string ToString() { return base.ToString(); } - } + public override string ToString() => base.ToString(); } \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs index 24c5856..743d38e 100644 --- a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; -namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +public class StructuredType : ParameterTypeDefinition { - public class StructuredType : ParameterTypeDefinition - { - public StructuredType(string name, string description, IList fields) : base(name, description) { } + public StructuredType(string name, string description, IList fields) : base(name, description) { } - public IList Fields { get; } - } + public IList Fields { get; } } \ No newline at end of file diff --git a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs index 597ace3..70ef834 100644 --- a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs @@ -1,6 +1,5 @@ -namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +public interface IConfigurationObject { - public interface IConfigurationObject - { - } } \ No newline at end of file diff --git a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs index 0b772a2..476c2ff 100644 --- a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs @@ -1,26 +1,25 @@ using System; -namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +[System.Runtime.Serialization.DataContractAttribute(IsReference = true)] +public class ModelObjectParameterDefinition : IConfigurationObject { - [System.Runtime.Serialization.DataContractAttribute(IsReference = true)] - public class ModelObjectParameterDefinition : IConfigurationObject - { - public ModelObjectParameterDefinition() { } - public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { } - public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { } + public ModelObjectParameterDefinition() { } + public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { } + public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long Id { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual string Name { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual string Value { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual ModelObjectParameterType ValueType { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual string EnumType { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long Id { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual string Name { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual string Value { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual ModelObjectParameterType ValueType { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual string EnumType { get; set; } - public virtual ModelObjectParameterDefinition Clone() { return null; } - public virtual bool IsValidValue(string value) { return false; } - } + public virtual ModelObjectParameterDefinition Clone() => null; + public virtual bool IsValidValue(string value) => false; } \ No newline at end of file diff --git a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs index 6f779af..c5a85c2 100644 --- a/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs @@ -1,17 +1,16 @@ -namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +public enum ModelObjectParameterType { - public enum ModelObjectParameterType - { - String = 0, - Bool = 1, - Byte = 2, - SignedByte = 3, - Integer = 4, - UnsignedInteger = 5, - LongInteger = 6, - UnsignedLongInteger = 7, - Double = 8, - Float = 9, - Enum = 10 - } + String = 0, + Bool = 1, + Byte = 2, + SignedByte = 3, + Integer = 4, + UnsignedInteger = 5, + LongInteger = 6, + UnsignedLongInteger = 7, + Double = 8, + Float = 9, + Enum = 10 } \ No newline at end of file diff --git a/Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs b/Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs index 91493b0..bea5a40 100644 --- a/Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs +++ b/Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs @@ -1,44 +1,43 @@ using Adaptation.PeerGroup.GCL.SecsDriver; using System; -namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances -{ - [System.Runtime.Serialization.DataContractAttribute] - public class SecsConnectionConfiguration - { - public SecsConnectionConfiguration() { } +namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances; - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T6HsmsControlMessage { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T5ConnectionSeperation { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T4InterBlock { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T3MessageReply { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T2Protocol { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T1InterCharacter { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual SerialBaudRate? BaudRate { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual SecsTransportType? PortType { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? Port { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan LinkTestTimer { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual string Host { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? DeviceId { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual HsmsSessionMode? SessionMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual HsmsConnectionMode? ConnectionMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T7ConnectionIdle { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual TimeSpan T8NetworkIntercharacter { get; set; } - } +[System.Runtime.Serialization.DataContractAttribute] +public class SecsConnectionConfiguration +{ + public SecsConnectionConfiguration() { } + + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T6HsmsControlMessage { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T5ConnectionSeperation { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T4InterBlock { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T3MessageReply { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T2Protocol { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T1InterCharacter { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual SerialBaudRate? BaudRate { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual SecsTransportType? PortType { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? Port { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan LinkTestTimer { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual string Host { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? DeviceId { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual HsmsSessionMode? SessionMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual HsmsConnectionMode? ConnectionMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T7ConnectionIdle { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual TimeSpan T8NetworkIntercharacter { get; set; } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/Archive/FileRead.cs b/Adaptation/FileHandlers/Archive/FileRead.cs new file mode 100644 index 0000000..5a7643d --- /dev/null +++ b/Adaptation/FileHandlers/Archive/FileRead.cs @@ -0,0 +1,141 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Duplicator; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text.Json; + +namespace Adaptation.FileHandlers.Archive; + +public class FileRead : Shared.FileRead, IFileRead +{ + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new Logistics(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults, exception); + + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); + + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } + + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } + + string[] IFileRead.Move(Tuple> 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 IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } + + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } + + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + { + Tuple> 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>(results.Item1, Array.Empty(), JsonSerializer.Deserialize("[]"), results.Item4); + if (results.Item3.Length > 0 && _IsEAFHosted) + WritePDSF(this, results.Item3); + UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); + return results; + } + + Tuple> IFileRead.ReExtract() + { + Tuple> results; + List headerNames = _Description.GetHeaderNames(); + Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); + results = ReExtract(this, headerNames, keyValuePairs); + return results; + } + + void IFileRead.CheckTests(Test[] tests, bool extra) + { + if (_Description is not Description) + throw new Exception(); + } + + void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); + + private void MoveArchive(DateTime dateTime) + { + if (dateTime == DateTime.MinValue) + { } + string logisticsSequence = _Logistics.Sequence.ToString(); + string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd")); + string jobIdDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", _Logistics.JobID); + if (!Directory.Exists(jobIdDirectory)) + _ = Directory.CreateDirectory(jobIdDirectory); + //string destinationArchiveDirectory = string.Concat(jobIdDirectory, @"\!Archive\", weekDirectory); + string destinationArchiveDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\Archive\", _Logistics.JobID, @"\", weekDirectory); + if (!Directory.Exists(destinationArchiveDirectory)) + _ = Directory.CreateDirectory(destinationArchiveDirectory); + string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() }; + if ((matchDirectories is null) || matchDirectories.Length != 1) + throw new Exception("Didn't find directory by logistics sequence"); + string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]); + destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory)); + Directory.Move(sourceDirectory, destinationArchiveDirectory); + } + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) + { + Tuple> results; + Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); + _Logistics = new Logistics(reportFullPath, pdsf.Item1); + SetFileParameterLotIDToLogisticsMID(); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); + List descriptions = GetDuplicatorDescriptions(jsonElements); + Tuple>> tuple = GetTuple(this, descriptions, extra: false); + MoveArchive(dateTime); + results = new Tuple>(pdsf.Item1, tuple.Item1, jsonElements, new List()); + return results; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs index adc3225..a0fe842 100644 --- a/Adaptation/FileHandlers/CellInstanceConnectionName.cs +++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs @@ -4,31 +4,36 @@ using Adaptation.Shared.Methods; using System; using System.Collections.Generic; -namespace Adaptation.FileHandlers +namespace Adaptation.FileHandlers; + +public class CellInstanceConnectionName { - public class CellInstanceConnectionName + internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) { - - internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) + IFileRead result; + bool isDuplicator = cellInstanceConnectionName.StartsWith(cellInstanceName); + if (isDuplicator) { - IFileRead result; - int levelIsArchive = 7; - int levelIsXToArchive = 6; - bool isDuplicator = cellInstanceConnectionName.StartsWith(cellInstanceName); - if (isDuplicator) - result = new MET08THFTIRQS408M.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted, levelIsXToArchive, levelIsArchive); - else + string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty); + int hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length; + result = hyphens switch { - result = cellInstanceConnectionName switch - { - nameof(QS408M) => new QS408M.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted, levelIsXToArchive, levelIsArchive), - _ => throw new Exception(), - }; - } - return result; + (int)MET08THFTIRQS408M.Hyphen.IsArchive => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted), + (int)MET08THFTIRQS408M.Hyphen.IsDummy => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted), + (int)MET08THFTIRQS408M.Hyphen.IsXToArchive => new ToArchive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted), + _ => new MET08THFTIRQS408M.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) + }; } - + else + { + result = cellInstanceConnectionName switch + { + nameof(QS408M) => new QS408M.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted), + _ => throw new Exception(), + }; + } + return result; } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/Dummy/FileRead.cs b/Adaptation/FileHandlers/Dummy/FileRead.cs new file mode 100644 index 0000000..55e61a9 --- /dev/null +++ b/Adaptation/FileHandlers/Dummy/FileRead.cs @@ -0,0 +1,308 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Duplicator; +using Adaptation.Shared.Methods; +using Infineon.Monitoring.MonA; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text.Json; +using System.Threading; + +namespace Adaptation.FileHandlers.Dummy; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private readonly Timer _Timer; + private int _LastDummyRunIndex; + private readonly string[] _CellNames; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new Logistics(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _LastDummyRunIndex = -1; + List cellNames = new(); + _Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite); + ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Alias"); + foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection) + cellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1]); + _CellNames = cellNames.ToArray(); + if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process) + Callback(null); + else + { + TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks); + _ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite); + } + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults, exception); + + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); + + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } + + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } + + string[] IFileRead.Move(Tuple> 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 IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } + + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } + + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) => throw new Exception(string.Concat("See ", nameof(CallbackFileExists))); + + Tuple> IFileRead.ReExtract() => throw new Exception(string.Concat("See ", nameof(CallbackFileExists))); + + void IFileRead.CheckTests(Test[] tests, bool extra) + { + if (_Description is not Description) + throw new Exception(); + } + + void IFileRead.Callback(object state) => Callback(state); + + private void CallbackInProcessCleared(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, string inProcessDirectory, long sequence, bool warning) + { + const string site = "sjc"; + string stateName = string.Concat("Dummy_", _EventName); + const string monInURL = "http://moninhttp.sjc.infineon.com/input/text"; + MonIn monIn = MonIn.GetInstance(monInURL); + try + { + if (warning) + { + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Warning); + for (int i = 1; i < 12; i++) + Thread.Sleep(500); + } + ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory); + string[] files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly); + if (files.Length > 250) + throw new Exception("Safety net!"); + foreach (string file in files) + File.SetLastWriteTime(file, new DateTime(sequence)); + if (!_FileConnectorConfiguration.IncludeSubDirectories.Value) + { + foreach (string file in files) + File.Move(file, Path.Combine(targetFileLocation, Path.GetFileName(file))); + } + else + { + string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories); + foreach (string directory in directories) + _ = Directory.CreateDirectory(string.Concat(targetFileLocation, directory.Substring(inProcessDirectory.Length))); + foreach (string file in files) + File.Move(file, string.Concat(targetFileLocation, file.Substring(inProcessDirectory.Length))); + } + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Ok); + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Critical); + } + } + + private void CallbackFileExists(string sourceArchiveFile, string traceDummyFile, string targetFileLocation, string monARessource, long sequence) + { + string[] files; + bool warning = false; + if (!_DummyRuns.ContainsKey(monARessource)) + _DummyRuns.Add(monARessource, new List()); + if (!_DummyRuns[monARessource].Contains(sequence)) + _DummyRuns[monARessource].Add(sequence); + File.AppendAllLines(traceDummyFile, new string[] { sourceArchiveFile }); + string inProcessDirectory = Path.Combine(_ProgressPath, "Dummy In-Process", sequence.ToString()); + if (!Directory.Exists(inProcessDirectory)) + _ = Directory.CreateDirectory(inProcessDirectory); + files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories); + if (files.Any()) + { + if (files.Length > 250) + throw new Exception("Safety net!"); + try + { + foreach (string file in files) + File.Delete(file); + } + catch (Exception) { } + } + if (_FileConnectorConfiguration.IncludeSubDirectories.Value) + files = Directory.GetFiles(targetFileLocation, "*", SearchOption.AllDirectories); + else + files = Directory.GetFiles(targetFileLocation, "*", SearchOption.TopDirectoryOnly); + foreach (string file in files) + { + if (new FileInfo(file).LastWriteTime.Ticks == sequence) + { + warning = true; + break; + } + } + CallbackInProcessCleared(sourceArchiveFile, traceDummyFile, targetFileLocation, monARessource, inProcessDirectory, sequence, warning); + } + + private string GetCellName(string pathSegment) + { + string result = string.Empty; + foreach (string cellName in _CellNames) + { + if (pathSegment.ToLower().Contains(cellName.ToLower())) + { + result = cellName; + break; + } + } + if (string.IsNullOrEmpty(result)) + { + int count; + List<(string CellName, int Count)> cellNames = new(); + foreach (string cellName in _CellNames) + { + count = 0; + foreach (char @char in cellName.ToLower()) + count += pathSegment.Length - pathSegment.ToLower().Replace(@char.ToString(), string.Empty).Length; + cellNames.Add(new(cellName, count)); + } + result = (from l in cellNames orderby l.CellName.Length, l.Count descending select l.CellName).First(); + } + return result; + } + + private void Callback(object state) + { + try + { + string pathSegment; + string monARessource; + DateTime dateTime = DateTime.Now; + if (!_FileConnectorConfiguration.TargetFileLocation.Contains(_FileConnectorConfiguration.SourceFileLocation)) + throw new Exception("Target must start with source"); + bool check = (dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday); + if (!_IsEAFHosted || check) + { + string checkSegment; + string checkDirectory; + string sourceFileFilter; + string sourceArchiveFile; + string sourceFileLocation; + string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string traceDummyDirectory = Path.Combine(Path.GetPathRoot(_TracePath), "TracesDummy", _CellInstanceName, "Source", $"{dateTime:yyyy}___Week_{weekOfYear}"); + if (!Directory.Exists(traceDummyDirectory)) + _ = Directory.CreateDirectory(traceDummyDirectory); + string traceDummyFile = Path.Combine(traceDummyDirectory, $"{dateTime.Ticks} - {_CellInstanceName}.txt"); + File.AppendAllText(traceDummyFile, string.Empty); + if (_FileConnectorConfiguration.SourceFileLocation.EndsWith("\\")) + sourceFileLocation = _FileConnectorConfiguration.SourceFileLocation; + else + sourceFileLocation = string.Concat(_FileConnectorConfiguration.SourceFileLocation, '\\'); + for (int i = 0; i < _FileConnectorConfiguration.SourceFileFilters.Count; i++) + { + _LastDummyRunIndex += 1; + if (_LastDummyRunIndex >= _FileConnectorConfiguration.SourceFileFilters.Count) + _LastDummyRunIndex = 0; + sourceFileFilter = _FileConnectorConfiguration.SourceFileFilters[_LastDummyRunIndex]; + sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, sourceFileFilter)); + if (File.Exists(sourceArchiveFile)) + { + checkSegment = _FileConnectorConfiguration.TargetFileLocation.Substring(sourceFileLocation.Length); + checkDirectory = Path.GetDirectoryName(sourceArchiveFile); + for (int z = 0; z < int.MaxValue; z++) + { + if (checkDirectory.Length < sourceFileLocation.Length || !checkDirectory.StartsWith(sourceFileLocation)) + break; + checkDirectory = Path.GetDirectoryName(checkDirectory); + if (Directory.Exists(Path.Combine(checkDirectory, checkSegment))) + { + checkDirectory = Path.Combine(checkDirectory, checkSegment); + break; + } + } + if (!checkDirectory.EndsWith(checkSegment)) + throw new Exception("Could not determine dummy target directory for extract!"); + if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence)) + throw new Exception("Invalid file name for source archive file!"); + pathSegment = checkDirectory.Substring(sourceFileLocation.Length); + monARessource = GetCellName(pathSegment); + if (string.IsNullOrEmpty(monARessource)) + throw new Exception("Could not determine which cell archive file is associated with!"); + if (_IsEAFHosted) + CallbackFileExists(sourceArchiveFile, traceDummyFile, checkDirectory, monARessource, sequence); + break; + } + } + } + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } + try + { + TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks); + _ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite); + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/MET08THFTIRQS408M/FileRead.cs b/Adaptation/FileHandlers/MET08THFTIRQS408M/FileRead.cs index 5a3445e..0dbfaa7 100644 --- a/Adaptation/FileHandlers/MET08THFTIRQS408M/FileRead.cs +++ b/Adaptation/FileHandlers/MET08THFTIRQS408M/FileRead.cs @@ -16,526 +16,373 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; -namespace Adaptation.FileHandlers.MET08THFTIRQS408M +namespace Adaptation.FileHandlers.MET08THFTIRQS408M; + +public class FileRead : Shared.FileRead, IFileRead { - public class FileRead : Shared.FileRead, IFileRead + private readonly Timer _Timer; + private int _LastDummyRunIndex; + private readonly string _IqsFile; + private readonly int _HyphenIsDummy; + private readonly int _HyphenIsNaEDA; + private readonly string _MemoryPath; + private readonly int _HyphenIsXToAPC; + private readonly int _HyphenIsXToIQSSi; + private readonly int _HyphenIsXToSPaCe; + private readonly int _HyphenIsXToOpenInsight; + private readonly string _EventNameFileReadDaily; + private readonly string _OpenInsightFilePattern; + private readonly string _OpenInsightMetrologyViewerAPI; + private readonly Dictionary _CellNames; + private readonly int _HyphenIsXToOpenInsightMetrologyViewer; + private readonly int _HyphenIsXToOpenInsightMetrologyViewerAttachments; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) { - - private readonly Timer _Timer; - private int _LastDummyRunIndex; - private readonly string _IqsFile; - private readonly int _HyphenIsDummy; - private readonly int _HyphenIsNaEDA; - private readonly string _MemoryPath; - private readonly int _HyphenIsXToAPC; - private readonly int _HyphenIsXToIQSSi; - private readonly int _HyphenIsXToSPaCe; - private readonly int _HyphenIsXToOpenInsight; - private readonly string _EventNameFileReadDaily; - private readonly string _OpenInsightFilePattern; - private readonly string _OpenInsightMetrologyViewerAPI; - private readonly Dictionary _CellNames; - private readonly int _HyphenIsXToOpenInsightMetrologyViewer; - private readonly int _HyphenIsXToOpenInsightMetrologyViewerAttachments; - - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted, int hyphenXToArchive, int hyphenIsArchive) : - base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted, hyphenXToArchive, hyphenIsArchive) + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new Logistics(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _LastDummyRunIndex = -1; + if (_HyphenIsNaEDA == 0) + { } + if (_HyphenIsXToSPaCe == 0) + { } + if (_HyphenIsXToIQSSi == 0) + { } + _CellNames = new Dictionary(); + _HyphenIsNaEDA = (int)Hyphen.IsNaEDA; + _HyphenIsDummy = (int)Hyphen.IsDummy; + _HyphenIsXToAPC = (int)Hyphen.IsXToAPC; + _HyphenIsXToIQSSi = (int)Hyphen.IsXToIQSSi; + _HyphenIsXToSPaCe = (int)Hyphen.IsXToSPaCe; + _HyphenIsXToOpenInsight = (int)Hyphen.IsXToOpenInsight; + _EventNameFileReadDaily = string.Concat(_EventNameFileRead, "Daily"); + _IqsFile = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.File"); + _MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory"); + _HyphenIsXToOpenInsightMetrologyViewer = (int)Hyphen.IsXToOpenInsightMetrologyViewer; + _HyphenIsXToOpenInsightMetrologyViewerAttachments = (int)Hyphen.IsXToOpenInsightMetrologyViewerAttachments; + _OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern"); + _OpenInsightMetrologyViewerAPI = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerAPI"); + ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Path"); + foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection) + _CellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value); + if (_Hyphens == _HyphenIsDummy) { - _MinFileLength = 10; - _NullData = string.Empty; - _Logistics = new Logistics(this); - if (_FileParameter is null) - throw new Exception(cellInstanceConnectionName); - if (_ModelObjectParameterDefinitions is null) - throw new Exception(cellInstanceConnectionName); - if (!_IsDuplicator) - throw new Exception(cellInstanceConnectionName); - if (hyphenIsArchive != (int)Hyphen.IsArchive) - throw new Exception(cellInstanceConnectionName); - if (hyphenXToArchive != (int)Hyphen.IsXToArchive) - throw new Exception(cellInstanceConnectionName); - _LastDummyRunIndex = -1; - if (_HyphenIsNaEDA == 0) - { } - if (_HyphenIsXToSPaCe == 0) - { } - if (_HyphenIsXToIQSSi == 0) - { } - _CellNames = new Dictionary(); - _HyphenIsNaEDA = (int)Hyphen.IsNaEDA; - _HyphenIsDummy = (int)Hyphen.IsDummy; - _HyphenIsXToAPC = (int)Hyphen.IsXToAPC; - _HyphenIsXToIQSSi = (int)Hyphen.IsXToIQSSi; - _HyphenIsXToSPaCe = (int)Hyphen.IsXToSPaCe; - _HyphenIsXToOpenInsight = (int)Hyphen.IsXToOpenInsight; - _EventNameFileReadDaily = string.Concat(_EventNameFileRead, "Daily"); - _IqsFile = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.File"); - _MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory"); - _HyphenIsXToOpenInsightMetrologyViewer = (int)Hyphen.IsXToOpenInsightMetrologyViewer; - _HyphenIsXToOpenInsightMetrologyViewerAttachments = (int)Hyphen.IsXToOpenInsightMetrologyViewerAttachments; - _OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern"); - _OpenInsightMetrologyViewerAPI = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerAPI"); - ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Path"); - foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection) - _CellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value); - if (_Hyphens == _HyphenIsDummy) + if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process) { - if (Debugger.IsAttached || fileConnectorConfiguration.PreProcessingMode == FileConnectorConfiguration.PreProcessingModeEnum.Process) - { - _Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite); - Callback(null); - } - else - { - int milliSeconds; - milliSeconds = (int)((fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000) / 2); - _Timer = new Timer(Callback, null, milliSeconds, Timeout.Infinite); - milliSeconds += 2000; - } + _Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite); + Callback(null); + } + else + { + int milliSeconds; + milliSeconds = (int)((fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000) / 2); + _Timer = new Timer(Callback, null, milliSeconds, Timeout.Infinite); + milliSeconds += 2000; } } + } - void IFileRead.Move(Tuple> extractResults, Exception exception) - { - Move(this, extractResults, exception); - } + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults, exception); - void IFileRead.WaitForThread() - { - WaitForThread(thread: null, threadExceptions: null); - } + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); - string IFileRead.GetEventDescription() - { - string result = _Description.GetEventDescription(); - return result; - } + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } - List IFileRead.GetHeaderNames() - { - List results = _Description.GetHeaderNames(); - return results; - } + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } - string[] IFileRead.Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception) - { - string[] results = Move(extractResults, to, from, resolvedFileLocation, exception); - return results; - } + string[] IFileRead.Move(Tuple> 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; - } + JsonProperty[] IFileRead.GetDefault() + { + JsonProperty[] results = _Description.GetDefault(this, _Logistics); + return results; + } - Dictionary IFileRead.GetDisplayNamesJsonElement() - { - Dictionary results = _Description.GetDisplayNamesJsonElement(this); - return results; - } + Dictionary IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } - List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) - { - List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); - return results; - } + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } - Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + { + Tuple> 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>(results.Item1, Array.Empty(), JsonSerializer.Deserialize("[]"), results.Item4); + if (results.Item3.Length > 0 && _IsEAFHosted) + WritePDSF(this, results.Item3); + UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); + return results; + } + + Tuple> IFileRead.ReExtract() + { + Tuple> results; + List headerNames = _Description.GetHeaderNames(); + Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); + results = ReExtract(this, headerNames, keyValuePairs); + return results; + } + + void IFileRead.CheckTests(Test[] tests, bool extra) + { + if (_Description is not Description) + throw new Exception(); + } + + void IFileRead.Callback(object state) => Callback(state); + + protected List GetDescriptions(JsonElement[] jsonElements) + { + List results = new(); + QS408M.Description description; + JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; + foreach (JsonElement jsonElement in jsonElements) { - Tuple> results; - if (string.IsNullOrEmpty(eventName)) + if (jsonElement.ValueKind != JsonValueKind.Object) throw new Exception(); - _ReportFullPath = reportFullPath; - DateTime dateTime = DateTime.Now; - results = GetExtractResult(reportFullPath, dateTime); - if (results.Item3 is null) - results = new Tuple>(results.Item1, new Test[] { }, JsonSerializer.Deserialize("[]"), results.Item4); - if (results.Item3.Length > 0 && _IsEAFHosted) - WritePDSF(this, results.Item3); - UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); - return results; + description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); + results.Add(description); } + return results; + } - Tuple> IFileRead.ReExtract() + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) + { + Tuple> results; + string duplicateDirectory; + Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); + _Logistics = new Logistics(reportFullPath, pdsf.Item1); + SetFileParameterLotIDToLogisticsMID(); + JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); + List descriptions = GetDescriptions(jsonElements); + Tuple>> tuple = GetTuple(this, from l in descriptions select (Shared.Properties.IDescription)l, extra: false); + results = new Tuple>(pdsf.Item1, tuple.Item1, jsonElements, new List()); + bool isNotUsedInsightMetrologyViewerAttachments = (!(_FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) && _Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments); + bool isDummyRun = (_DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any()); + if (isDummyRun) { - Tuple> results; - List headerNames = _Description.GetHeaderNames(); - Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); - results = ReExtract(this, headerNames, keyValuePairs); - return results; + try + { File.SetLastWriteTime(reportFullPath, dateTime); } + catch (Exception) { } } - - void IFileRead.CheckTests(Test[] tests, bool extra) + string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_'); + if (_Hyphens != _HyphenIsXToOpenInsight) + duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]); + else + duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data"); + if (segments.Length > 2) + duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]); + if (!Directory.Exists(duplicateDirectory)) + _ = Directory.CreateDirectory(duplicateDirectory); + if ((isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)) { - if (!(_Description is Description)) - throw new Exception(); - } - - void IFileRead.Callback(object state) - { - Callback(state); - } - - void IFileRead.MoveArchive() - { - string logisticsSequence = _Logistics.Sequence.ToString(); + if (!Directory.Exists(duplicateDirectory)) + _ = Directory.CreateDirectory(duplicateDirectory); + string successDirectory; + if (_Hyphens != _HyphenIsXToAPC) + successDirectory = string.Empty; + else + { + successDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\ViewerPath"); + if (!Directory.Exists(successDirectory)) + _ = Directory.CreateDirectory(successDirectory); + } + List> tuples = new(); + string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath)); string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd")); - string jobIdDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", _Logistics.JobID); - if (!Directory.Exists(jobIdDirectory)) - Directory.CreateDirectory(jobIdDirectory); - //string destinationArchiveDirectory = string.Concat(jobIdDirectory, @"\!Archive\", weekDirectory); - string destinationArchiveDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\Archive\", _Logistics.JobID, @"\", weekDirectory); - if (!Directory.Exists(destinationArchiveDirectory)) - Directory.CreateDirectory(destinationArchiveDirectory); - string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() }; - if ((matchDirectories is null) || matchDirectories.Length != 1) - throw new Exception("Didn't find directory by logistics sequence"); - string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]); - destinationArchiveDirectory = string.Concat(destinationArchiveDirectory, @"\", Path.GetFileName(sourceDirectory)); - Directory.Move(sourceDirectory, destinationArchiveDirectory); - } - - protected List GetDescriptions(JsonElement[] jsonElements) - { - List results = new(); - QS408M.Description description; - JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; - foreach (JsonElement jsonElement in jsonElements) + string logisticsSequenceMemoryDirectory = string.Concat(_MemoryPath, @"\", _EquipmentType, @"\Source\", weekDirectory, @"\", _Logistics.Sequence); + if (!Directory.Exists(logisticsSequenceMemoryDirectory)) + _ = Directory.CreateDirectory(logisticsSequenceMemoryDirectory); + if (_Hyphens == _HyphenIsXToAPC) { - if (jsonElement.ValueKind != JsonValueKind.Object) - throw new Exception(); - description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); - results.Add(description); + if (!isDummyRun && _IsEAFHosted) + File.Copy(reportFullPath, duplicateFile, overwrite: true); } - return results; - } - - private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) - { - Tuple> results; - string duplicateDirectory; - Tuple pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath); - _Logistics = new Logistics(reportFullPath, pdsf.Item1); - SetFileParameterLotIDToLogisticsMID(); - JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf); - List descriptions = GetDescriptions(jsonElements); - Tuple>> tuple = GetTuple(this, from l in descriptions select (Shared.Properties.IDescription)l, extra: false); - results = new Tuple>(pdsf.Item1, tuple.Item1, jsonElements, new List()); - bool isNotUsedInsightMetrologyViewerAttachments = (!(_FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) && _Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments); - bool isDummyRun = (_DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any()); - if (isDummyRun) - { - try - { File.SetLastWriteTime(reportFullPath, dateTime); } - catch (Exception) { } - } - string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_'); - if (_Hyphens != _HyphenIsXToOpenInsight) - duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]); else - duplicateDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\Data"); - if (segments.Length > 2) - duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]); - if (!Directory.Exists(duplicateDirectory)) - Directory.CreateDirectory(duplicateDirectory); - if ((isDummyRun || isNotUsedInsightMetrologyViewerAttachments || _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) && _Hyphens != _HyphenIsXToArchive && _Hyphens != _HyphenIsArchive) { - if (!Directory.Exists(duplicateDirectory)) - Directory.CreateDirectory(duplicateDirectory); - string successDirectory; - if (_Hyphens != _HyphenIsXToAPC) - successDirectory = string.Empty; - else - { - successDirectory = string.Concat(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation), @"\ViewerPath"); - if (!Directory.Exists(successDirectory)) - Directory.CreateDirectory(successDirectory); - } - List> tuples = new(); - string duplicateFile = string.Concat(duplicateDirectory, @"\", Path.GetFileName(reportFullPath)); - string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); - string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd")); - string logisticsSequenceMemoryDirectory = string.Concat(_MemoryPath, @"\", _EquipmentType, @"\Source\", weekDirectory, @"\", _Logistics.Sequence); - if (!Directory.Exists(logisticsSequenceMemoryDirectory)) - Directory.CreateDirectory(logisticsSequenceMemoryDirectory); - if (_Hyphens == _HyphenIsXToAPC) - { - if (!isDummyRun && _IsEAFHosted) - File.Copy(reportFullPath, duplicateFile, overwrite: true); - } - else - { - if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewer) - { - WSRequest wsRequest = new(this, _Logistics, descriptions); - if (!isDummyRun && _IsEAFHosted) - { - Tuple wsResults = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest); - if (!wsResults.Item2.Success) - throw new Exception(wsResults.ToString()); - _Log.Debug(wsResults.Item2.HeaderID); - File.WriteAllText(string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json"), wsResults.Item1); - } - } - else - { - Test test; - string lines; - Shared.Properties.IScopeInfo scopeInfo; - foreach (KeyValuePair> keyValuePair in tuple.Item2) - { - test = keyValuePair.Key; - //scopeInfo = new ScopeInfo(test); - if (_Hyphens != _HyphenIsXToOpenInsight) - scopeInfo = new ScopeInfo(test, _IqsFile); - else - scopeInfo = new ScopeInfo(test, _OpenInsightFilePattern); - //lines = ProcessDataStandardFormat.GetLines(this, scopeInfo, names, values, dateFormat: "M/d/yyyy hh:mm:ss tt", timeFormat: string.Empty, pairedColumns: ExtractResultPairedColumns); - lines = ProcessData.GetLines(this, _Logistics, descriptions); - tuples.Add(new Tuple(scopeInfo, lines)); - } - } - if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments) - { - string[] matchDirectories = Shared1567(reportFullPath, tuples); - if (!isDummyRun && _IsEAFHosted && !isNotUsedInsightMetrologyViewerAttachments) - ProcessData.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, logisticsSequenceMemoryDirectory, descriptions, matchDirectories[0]); - } - } - if (_Hyphens != _HyphenIsXToOpenInsightMetrologyViewer && _Hyphens != _HyphenIsXToOpenInsightMetrologyViewerAttachments) - Shared0413(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); - } - if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments) - { - string destinationDirectory; - //string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples); - FileInfo fileInfo = new(reportFullPath); - string logisticsSequence = _Logistics.Sequence.ToString(); - if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime) - File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime); - string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID); - if (!Directory.Exists(jobIdDirectory)) - Directory.CreateDirectory(jobIdDirectory); - string[] matchDirectories; - if (!_IsEAFHosted) - matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) }; - else - matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly); - if ((matchDirectories is null) || matchDirectories.Length != 1) - throw new Exception("Didn't find directory by logistics sequence"); - destinationDirectory = matchDirectories[0]; - if (isDummyRun) - Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory); - else + if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewer) { WSRequest wsRequest = new(this, _Logistics, descriptions); - JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true }; - string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions); - if (_IsEAFHosted) - Shared1277(reportFullPath, destinationDirectory, logisticsSequence, jobIdDirectory, json); - else + if (!isDummyRun && _IsEAFHosted) { - string jsonFileName = Path.ChangeExtension(reportFullPath, ".json"); - string historicalText = File.ReadAllText(jsonFileName); - if (json != historicalText) - throw new Exception("File doesn't match historical!"); + Tuple wsResults = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest); + if (!wsResults.Item2.Success) + throw new Exception(wsResults.ToString()); + _Log.Debug(wsResults.Item2.HeaderID); + File.WriteAllText(string.Concat(logisticsSequenceMemoryDirectory, @"\", nameof(WS.Results), ".json"), wsResults.Item1); } } - } - return results; - } - - private void CallbackIsDummy(string traceDummyFile, List> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra) - { - int fileCount; - string[] files; - string monARessource; - string checkDirectory; - string sourceArchiveFile; - string inProcessDirectory; - const string site = "sjc"; - string stateName = string.Concat("Dummy_", _EventName); - const string monInURL = "http://moninhttp.sjc.infineon.com/input/text"; - MonIn monIn = MonIn.GetInstance(monInURL); - foreach (Tuple item in tuples) - { - monARessource = item.Item1; - sourceArchiveFile = item.Item2; - inProcessDirectory = item.Item3; - checkDirectory = item.Item4; - fileCount = item.Item5; - try + else { - if (fileCount > 0 || string.IsNullOrEmpty(checkDirectory)) + Test test; + string lines; + Shared.Properties.IScopeInfo scopeInfo; + foreach (KeyValuePair> keyValuePair in tuple.Item2) { - File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() }); - monIn.SendStatus(site, monARessource, stateName, State.Warning); - for (int i = 1; i < 12; i++) - Thread.Sleep(500); - } - else if (inProcessDirectory == checkDirectory) - continue; - if (!_IsEAFHosted) - continue; - if (!File.Exists(sourceArchiveFile)) - continue; - if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence)) - continue; - ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory); - if (fileConnectorConfigurationIncludeSubDirectories && includeSubDirectoriesExtra) - { - if (_EventName == _EventNameFileRead) - checkDirectory = string.Concat(checkDirectory, @"\", sequence); - else if (_EventName == _EventNameFileReadDaily) - checkDirectory = string.Concat(checkDirectory, @"\Source\", sequence); + test = keyValuePair.Key; + //scopeInfo = new ScopeInfo(test); + if (_Hyphens != _HyphenIsXToOpenInsight) + scopeInfo = new ScopeInfo(test, _IqsFile); else - throw new Exception(); + scopeInfo = new ScopeInfo(test, _OpenInsightFilePattern); + //lines = ProcessDataStandardFormat.GetLines(this, scopeInfo, names, values, dateFormat: "M/d/yyyy hh:mm:ss tt", timeFormat: string.Empty, pairedColumns: ExtractResultPairedColumns); + lines = ProcessData.GetLines(this, _Logistics, descriptions); + tuples.Add(new Tuple(scopeInfo, lines)); } - if (fileConnectorConfigurationIncludeSubDirectories) - files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories); - else - files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly); - if (files.Length > 250) - throw new Exception("Safety net!"); - foreach (string file in files) - File.SetLastWriteTime(file, new DateTime(sequence)); - if (!fileConnectorConfigurationIncludeSubDirectories) - { - foreach (string file in files) - File.Move(file, string.Concat(checkDirectory, @"\", Path.GetFileName(file))); - } - else - { - string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories); - foreach (string directory in directories) - Directory.CreateDirectory(string.Concat(checkDirectory, directory.Substring(inProcessDirectory.Length))); - foreach (string file in files) - File.Move(file, string.Concat(checkDirectory, file.Substring(inProcessDirectory.Length))); - } - File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() }); - monIn.SendStatus(site, monARessource, stateName, State.Ok); } - catch (Exception exception) + if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments) { - string subject = string.Concat("Exception:", _CellInstanceConnectionName); - string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); - try - { _SMTP.SendHighPriorityEmailMessage(subject, body); } - catch (Exception) { } - File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace }); - monIn.SendStatus(site, monARessource, stateName, State.Critical); + string[] matchDirectories = Shared1567(reportFullPath, tuples); + if (!isDummyRun && _IsEAFHosted && !isNotUsedInsightMetrologyViewerAttachments) + ProcessData.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, logisticsSequenceMemoryDirectory, descriptions, matchDirectories[0]); } } + if (_Hyphens != _HyphenIsXToOpenInsightMetrologyViewer && _Hyphens != _HyphenIsXToOpenInsightMetrologyViewerAttachments) + Shared0413(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile); } - - private void Callback(object state) + if (_Hyphens == _HyphenIsXToOpenInsightMetrologyViewerAttachments) { - if (_Hyphens != _HyphenIsDummy) - throw new Exception(); - try + string destinationDirectory; + //string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples); + FileInfo fileInfo = new(reportFullPath); + string logisticsSequence = _Logistics.Sequence.ToString(); + if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime) + File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime); + string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID); + if (!Directory.Exists(jobIdDirectory)) + _ = Directory.CreateDirectory(jobIdDirectory); + string[] matchDirectories; + if (!_IsEAFHosted) + matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) }; + else + matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly); + if ((matchDirectories is null) || matchDirectories.Length != 1) + throw new Exception("Didn't find directory by logistics sequence"); + destinationDirectory = matchDirectories[0]; + if (isDummyRun) + Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory); + else { - DateTime dateTime = DateTime.Now; - bool check = (dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday); - if (check) + WSRequest wsRequest = new(this, _Logistics, descriptions); + JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true }; + string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions); + if (_IsEAFHosted) + Shared1277(reportFullPath, destinationDirectory, logisticsSequence, jobIdDirectory, json); + else { - int fileCount; - string[] files; - string monARessource; - string checkDirectory; - string sourceArchiveFile; - string sourceFileLocation; - string inProcessDirectory; - string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); - string traceDummyDirectory = string.Concat(Path.GetPathRoot(_TracePath), @"\TracesDummy\", _CellInstanceName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear); - if (!Directory.Exists(traceDummyDirectory)) - Directory.CreateDirectory(traceDummyDirectory); - string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", _CellInstanceName, ".txt"); - File.AppendAllText(traceDummyFile, string.Empty); - List> tuples = new(); - string progressDirectory = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\_ Progress")); - if (progressDirectory != _ProgressPath || !Directory.Exists(progressDirectory)) - throw new Exception("Invalid progress path"); - foreach (KeyValuePair keyValuePair in _CellNames) - { - monARessource = keyValuePair.Key; - if (!keyValuePair.Value.Contains(@"\")) - continue; - foreach (string sourceFileFilter in _FileConnectorConfiguration.SourceFileFilter.Split('|')) - { - if (sourceFileFilter.ToLower().StartsWith(keyValuePair.Value.Replace(@"\", string.Empty))) - sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation); - else if (_FileConnectorConfiguration.SourceFileLocation.ToLower().EndsWith(keyValuePair.Value)) - sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation); - else - sourceFileLocation = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\", keyValuePair.Value)); - sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, @"\", sourceFileFilter)); - if (!File.Exists(sourceArchiveFile)) - continue; - if (!_DummyRuns.ContainsKey(monARessource)) - _DummyRuns.Add(monARessource, new List()); - tuples.Add(new Tuple(monARessource, sourceFileFilter, sourceFileLocation, sourceArchiveFile, 0)); - } - } - File.AppendAllLines(traceDummyFile, from l in tuples select l.Item4); - if (tuples.Any()) - { - _LastDummyRunIndex += 1; - if (_LastDummyRunIndex >= tuples.Count) - _LastDummyRunIndex = 0; - monARessource = tuples[_LastDummyRunIndex].Item1; - string sourceFileFilter = tuples[_LastDummyRunIndex].Item2; - sourceFileLocation = tuples[_LastDummyRunIndex].Item3; - sourceArchiveFile = tuples[_LastDummyRunIndex].Item4; - //fileCount = tuples[_LastDummyRunIndex].Item5; - tuples.Clear(); - if (long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence)) - { - if (!_DummyRuns[monARessource].Contains(sequence)) - _DummyRuns[monARessource].Add(sequence); - inProcessDirectory = string.Concat(progressDirectory, @"\Dummy_in process\", sequence); - checkDirectory = inProcessDirectory; - if (!Directory.Exists(checkDirectory)) - Directory.CreateDirectory(checkDirectory); - files = Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories); - fileCount = files.Length; - if (files.Any()) - { - if (files.Length > 250) - throw new Exception("Safety net!"); - try - { - foreach (string file in files) - File.Delete(file); - } - catch (Exception) { } - } - tuples.Add(new Tuple(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount)); - checkDirectory = sourceFileLocation; - files = Directory.GetFiles(checkDirectory, string.Concat("*", sequence, "*"), SearchOption.TopDirectoryOnly); - fileCount = files.Length; - tuples.Add(new Tuple(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount)); - } - } - if (tuples.Any()) - //CallbackIsDummy(traceDummyFile, tuples, FileConnectorConfiguration.IncludeSubDirectories.Value, includeSubDirectoriesExtra: false); - CallbackIsDummy(traceDummyFile, tuples, fileConnectorConfigurationIncludeSubDirectories: true, includeSubDirectoriesExtra: true); + string jsonFileName = Path.ChangeExtension(reportFullPath, ".json"); + string historicalText = File.ReadAllText(jsonFileName); + if (json != historicalText) + throw new Exception("File doesn't match historical!"); } } - catch (Exception exception) - { - string subject = string.Concat("Exception:", _CellInstanceConnectionName); - string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); - try - { _SMTP.SendHighPriorityEmailMessage(subject, body); } - catch (Exception) { } - } + } + return results; + } + + private void CallbackIsDummy(string traceDummyFile, List> tuples, bool fileConnectorConfigurationIncludeSubDirectories, bool includeSubDirectoriesExtra) + { + int fileCount; + string[] files; + string monARessource; + string checkDirectory; + string sourceArchiveFile; + string inProcessDirectory; + const string site = "sjc"; + string stateName = string.Concat("Dummy_", _EventName); + const string monInURL = "http://moninhttp.sjc.infineon.com/input/text"; + MonIn monIn = MonIn.GetInstance(monInURL); + foreach (Tuple item in tuples) + { + monARessource = item.Item1; + sourceArchiveFile = item.Item2; + inProcessDirectory = item.Item3; + checkDirectory = item.Item4; + fileCount = item.Item5; try { - TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks); - _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite); + if (fileCount > 0 || string.IsNullOrEmpty(checkDirectory)) + { + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Warning.ToString() }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Warning); + for (int i = 1; i < 12; i++) + Thread.Sleep(500); + } + else if (inProcessDirectory == checkDirectory) + continue; + if (!_IsEAFHosted) + continue; + if (!File.Exists(sourceArchiveFile)) + continue; + if (!long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence)) + continue; + ZipFile.ExtractToDirectory(sourceArchiveFile, inProcessDirectory); + if (fileConnectorConfigurationIncludeSubDirectories && includeSubDirectoriesExtra) + { + if (_EventName == _EventNameFileRead) + checkDirectory = string.Concat(checkDirectory, @"\", sequence); + else if (_EventName == _EventNameFileReadDaily) + checkDirectory = string.Concat(checkDirectory, @"\Source\", sequence); + else + throw new Exception(); + } + if (fileConnectorConfigurationIncludeSubDirectories) + files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories); + else + files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.TopDirectoryOnly); + if (files.Length > 250) + throw new Exception("Safety net!"); + foreach (string file in files) + File.SetLastWriteTime(file, new DateTime(sequence)); + if (!fileConnectorConfigurationIncludeSubDirectories) + { + foreach (string file in files) + File.Move(file, string.Concat(checkDirectory, @"\", Path.GetFileName(file))); + } + else + { + string[] directories = Directory.GetDirectories(inProcessDirectory, "*", SearchOption.AllDirectories); + foreach (string directory in directories) + _ = Directory.CreateDirectory(string.Concat(checkDirectory, directory.Substring(inProcessDirectory.Length))); + foreach (string file in files) + File.Move(file, string.Concat(checkDirectory, file.Substring(inProcessDirectory.Length))); + } + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Ok.ToString() }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Ok); } catch (Exception exception) { @@ -544,9 +391,126 @@ namespace Adaptation.FileHandlers.MET08THFTIRQS408M try { _SMTP.SendHighPriorityEmailMessage(subject, body); } catch (Exception) { } + File.AppendAllLines(traceDummyFile, new string[] { site, monARessource, stateName, State.Critical.ToString(), exception.Message, exception.StackTrace }); + _ = monIn.SendStatus(site, monARessource, stateName, State.Critical); } } + } + private void Callback(object state) + { + if (_Hyphens != _HyphenIsDummy) + throw new Exception(); + try + { + DateTime dateTime = DateTime.Now; + bool check = (dateTime.Hour > 7 && dateTime.Hour < 18 && dateTime.DayOfWeek != DayOfWeek.Sunday && dateTime.DayOfWeek != DayOfWeek.Saturday); + if (check) + { + int fileCount; + string[] files; + string monARessource; + string checkDirectory; + string sourceArchiveFile; + string sourceFileLocation; + string inProcessDirectory; + string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string traceDummyDirectory = string.Concat(Path.GetPathRoot(_TracePath), @"\TracesDummy\", _CellInstanceName, @"\Source\", dateTime.ToString("yyyy"), "___Week_", weekOfYear); + if (!Directory.Exists(traceDummyDirectory)) + _ = Directory.CreateDirectory(traceDummyDirectory); + string traceDummyFile = string.Concat(traceDummyDirectory, @"\", dateTime.Ticks, " - ", _CellInstanceName, ".txt"); + File.AppendAllText(traceDummyFile, string.Empty); + List> tuples = new(); + string progressDirectory = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\_ Progress")); + if (progressDirectory != _ProgressPath || !Directory.Exists(progressDirectory)) + throw new Exception("Invalid progress path"); + foreach (KeyValuePair keyValuePair in _CellNames) + { + monARessource = keyValuePair.Key; + if (!keyValuePair.Value.Contains(@"\")) + continue; + foreach (string sourceFileFilter in _FileConnectorConfiguration.SourceFileFilter.Split('|')) + { + if (sourceFileFilter.ToLower().StartsWith(keyValuePair.Value.Replace(@"\", string.Empty))) + sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation); + else if (_FileConnectorConfiguration.SourceFileLocation.ToLower().EndsWith(keyValuePair.Value)) + sourceFileLocation = Path.GetFullPath(_FileConnectorConfiguration.SourceFileLocation); + else + sourceFileLocation = Path.GetFullPath(string.Concat(_FileConnectorConfiguration.SourceFileLocation, @"\", keyValuePair.Value)); + sourceArchiveFile = Path.GetFullPath(string.Concat(sourceFileLocation, @"\", sourceFileFilter)); + if (!File.Exists(sourceArchiveFile)) + continue; + if (!_DummyRuns.ContainsKey(monARessource)) + _DummyRuns.Add(monARessource, new List()); + tuples.Add(new Tuple(monARessource, sourceFileFilter, sourceFileLocation, sourceArchiveFile, 0)); + } + } + File.AppendAllLines(traceDummyFile, from l in tuples select l.Item4); + if (tuples.Any()) + { + _LastDummyRunIndex += 1; + if (_LastDummyRunIndex >= tuples.Count) + _LastDummyRunIndex = 0; + monARessource = tuples[_LastDummyRunIndex].Item1; + string sourceFileFilter = tuples[_LastDummyRunIndex].Item2; + sourceFileLocation = tuples[_LastDummyRunIndex].Item3; + sourceArchiveFile = tuples[_LastDummyRunIndex].Item4; + //fileCount = tuples[_LastDummyRunIndex].Item5; + tuples.Clear(); + if (long.TryParse(Path.GetFileNameWithoutExtension(sourceArchiveFile).Replace("x", string.Empty), out long sequence)) + { + if (!_DummyRuns[monARessource].Contains(sequence)) + _DummyRuns[monARessource].Add(sequence); + inProcessDirectory = string.Concat(progressDirectory, @"\Dummy_in process\", sequence); + checkDirectory = inProcessDirectory; + if (!Directory.Exists(checkDirectory)) + _ = Directory.CreateDirectory(checkDirectory); + files = Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories); + fileCount = files.Length; + if (files.Any()) + { + if (files.Length > 250) + throw new Exception("Safety net!"); + try + { + foreach (string file in files) + File.Delete(file); + } + catch (Exception) { } + } + tuples.Add(new Tuple(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount)); + checkDirectory = sourceFileLocation; + files = Directory.GetFiles(checkDirectory, string.Concat("*", sequence, "*"), SearchOption.TopDirectoryOnly); + fileCount = files.Length; + tuples.Add(new Tuple(monARessource, sourceArchiveFile, inProcessDirectory, checkDirectory, fileCount)); + } + } + if (tuples.Any()) + //CallbackIsDummy(traceDummyFile, tuples, FileConnectorConfiguration.IncludeSubDirectories.Value, includeSubDirectoriesExtra: false); + CallbackIsDummy(traceDummyFile, tuples, fileConnectorConfigurationIncludeSubDirectories: true, includeSubDirectoriesExtra: true); + } + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } + try + { + TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks); + _ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite); + } + catch (Exception exception) + { + string subject = string.Concat("Exception:", _CellInstanceConnectionName); + string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace); + try + { _SMTP.SendHighPriorityEmailMessage(subject, body); } + catch (Exception) { } + } } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/MET08THFTIRQS408M/Hyphen.cs b/Adaptation/FileHandlers/MET08THFTIRQS408M/Hyphen.cs index e054824..66c00fd 100644 --- a/Adaptation/FileHandlers/MET08THFTIRQS408M/Hyphen.cs +++ b/Adaptation/FileHandlers/MET08THFTIRQS408M/Hyphen.cs @@ -1,18 +1,15 @@ -namespace Adaptation.FileHandlers.MET08THFTIRQS408M +namespace Adaptation.FileHandlers.MET08THFTIRQS408M; + +public enum Hyphen { - - public enum Hyphen - { - IsXToOpenInsightMetrologyViewer, //MetrologyWS.SendData(file, string.Concat("http://", serverName, "/api/inbound/BioRad")); - IsXToIQSSi, //NA -361 - IsXToOpenInsight, //bool WriteFileOpenInsight(BioRadFile - IsXToOpenInsightMetrologyViewerAttachments, //Site-None -362 - IsXToAPC, - IsXToSPaCe, - IsXToArchive, - IsArchive, - IsDummy, - IsNaEDA - } - + IsXToOpenInsightMetrologyViewer, //MetrologyWS.SendData(file, string.Concat("http://", serverName, "/api/inbound/BioRad")); + IsXToIQSSi, //NA -361 + IsXToOpenInsight, //bool WriteFileOpenInsight(BioRadFile + IsXToOpenInsightMetrologyViewerAttachments, //Site-None -362 + IsXToAPC, + IsXToSPaCe, + IsXToArchive, + IsArchive, + IsDummy, + IsNaEDA } \ No newline at end of file diff --git a/Adaptation/FileHandlers/MET08THFTIRQS408M/ProcessData.cs b/Adaptation/FileHandlers/MET08THFTIRQS408M/ProcessData.cs index f82f42e..871e37f 100644 --- a/Adaptation/FileHandlers/MET08THFTIRQS408M/ProcessData.cs +++ b/Adaptation/FileHandlers/MET08THFTIRQS408M/ProcessData.cs @@ -4,69 +4,66 @@ using System; using System.Collections.Generic; using System.Text; -namespace Adaptation.FileHandlers.MET08THFTIRQS408M +namespace Adaptation.FileHandlers.MET08THFTIRQS408M; + +public class ProcessData { - public class ProcessData + internal static List> HyphenTuples => new() { + new Tuple(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"), + new Tuple(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"), + new Tuple(-36, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"), + new Tuple(36, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"), + new Tuple(-36, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"), + new Tuple(360, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"), + new Tuple(-36, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"), + new Tuple(180, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"), + new Tuple(36, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed") + //new Tuple("IsDummy" + }; - internal static List> HyphenTuples => new() - { - new Tuple(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"), - new Tuple(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"), - new Tuple(-36, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"), - new Tuple(36, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"), - new Tuple(-36, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"), - new Tuple(360, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"), - new Tuple(-36, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"), - new Tuple(180, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"), - new Tuple(36, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed") - //new Tuple("IsDummy" - }; - - internal static string GetLines(IFileRead fileRead, Logistics logistics, List descriptions) - { - StringBuilder results = new(); - char del = '\t'; - if (fileRead is null) - { } - if (logistics is null) - { } - QS408M.Description x = descriptions[0]; - results.Append(x.UniqueId).Append(del). - Append(x.Date).Append(del). - Append(x.Employee).Append(del). - Append(x.Recipe).Append(del). - Append(x.Reactor).Append(del). - Append(x.RDS).Append(del). - Append(x.PSN).Append(del). - Append(x.Layer).Append(del). - Append(x.Zone).Append(del). - Append(x.Cassette).Append(del). - Append(x.Wafer).Append(del). - Append(x.RVThickness); - return results.ToString(); - } - - internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string logisticsSequenceMemoryDirectory, List descriptions, string matchDirectory) - { - if (fileRead is null) - { } - if (logistics is null) - { } - if (openInsightMetrologyViewerAPI is null) - { } - if (dateTime == DateTime.MinValue) - { } - if (logisticsSequenceMemoryDirectory is null) - { } - if (descriptions is null) - { } - if (matchDirectory is null) - { } - //Not used - } + internal static string GetLines(IFileRead fileRead, Logistics logistics, List descriptions) + { + StringBuilder results = new(); + char del = '\t'; + if (fileRead is null) + { } + if (logistics is null) + { } + QS408M.Description x = descriptions[0]; + _ = results.Append(x.UniqueId).Append(del). + Append(x.Date).Append(del). + Append(x.Employee).Append(del). + Append(x.Recipe).Append(del). + Append(x.Reactor).Append(del). + Append(x.RDS).Append(del). + Append(x.PSN).Append(del). + Append(x.Layer).Append(del). + Append(x.Zone).Append(del). + Append(x.Cassette).Append(del). + Append(x.Wafer).Append(del). + Append(x.RVThickness); + return results.ToString(); + } + internal static void PostOpenInsightMetrologyViewerAttachments(IFileRead fileRead, Logistics logistics, string openInsightMetrologyViewerAPI, DateTime dateTime, string logisticsSequenceMemoryDirectory, List descriptions, string matchDirectory) + { + if (fileRead is null) + { } + if (logistics is null) + { } + if (openInsightMetrologyViewerAPI is null) + { } + if (dateTime == DateTime.MinValue) + { } + if (logisticsSequenceMemoryDirectory is null) + { } + if (descriptions is null) + { } + if (matchDirectory is null) + { } + //Not used } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/MET08THFTIRQS408M/WSRequest.cs b/Adaptation/FileHandlers/MET08THFTIRQS408M/WSRequest.cs index 03ece54..1e65ef8 100644 --- a/Adaptation/FileHandlers/MET08THFTIRQS408M/WSRequest.cs +++ b/Adaptation/FileHandlers/MET08THFTIRQS408M/WSRequest.cs @@ -4,86 +4,83 @@ using System; using System.Collections.Generic; using System.Linq; -namespace Adaptation.FileHandlers.MET08THFTIRQS408M +namespace Adaptation.FileHandlers.MET08THFTIRQS408M; + +public class WSRequest { + public bool SentToMetrology { get; set; } + public bool SentToSPC { get; set; } + // + public long Id { get; set; } + public string Batch { get; set; } + public string Cassette { get; set; } + public string CellName { get; set; } + public string Date { get; set; } + public string FilePath { get; set; } + public string Layer { get; set; } + public string MeanThickness { get; set; } + public string Op { get; set; } + public string PSN { get; set; } + public string PassFail { get; set; } + public string RDS { get; set; } + public string RVThickness { get; set; } + public string Reactor { get; set; } + public string Recipe { get; set; } + public string StdDev { get; set; } + public string Title { get; set; } + public string UniqueId { get; set; } + public string Wafer { get; set; } + public string Zone { get; set; } + public List Details { get; protected set; } - public class WSRequest + [Obsolete("For json")] public WSRequest() { } + + internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions) { - public bool SentToMetrology { get; set; } - public bool SentToSPC { get; set; } - // - public long Id { get; set; } - public string Batch { get; set; } - public string Cassette { get; set; } - public string CellName { get; set; } - public string Date { get; set; } - public string FilePath { get; set; } - public string Layer { get; set; } - public string MeanThickness { get; set; } - public string Op { get; set; } - public string PSN { get; set; } - public string PassFail { get; set; } - public string RDS { get; set; } - public string RVThickness { get; set; } - public string Reactor { get; set; } - public string Recipe { get; set; } - public string StdDev { get; set; } - public string Title { get; set; } - public string UniqueId { get; set; } - public string Wafer { get; set; } - public string Zone { get; set; } - public List Details { get; protected set; } - - [Obsolete("For json")] public WSRequest() { } - - internal WSRequest(IFileRead fileRead, Logistics logistics, List descriptions) + Id = 0; + FilePath = string.Empty; + if (fileRead is null) + { } + CellName = logistics.MesEntity; + if (descriptions[0] is not QS408M.Description x) + throw new Exception(); + Details = new List(); + //Header { - Id = 0; - FilePath = string.Empty; - if (fileRead is null) - { } - CellName = logistics.MesEntity; - if (descriptions[0] is not QS408M.Description x) - throw new Exception(); - Details = new List(); - //Header - { - Batch = x.Lot; - Cassette = x.Cassette; - Date = x.Date; - Op = x.Employee; - Layer = x.Layer; - MeanThickness = x.MeanThickness; - PSN = x.PSN; - PassFail = x.PassFail; - RDS = x.RDS; - RVThickness = x.RVThickness; - Reactor = x.Reactor; - Recipe = x.Recipe; - StdDev = x.StdDev; - Title = x.Title; - UniqueId = x.UniqueId; - Wafer = x.Wafer; - Zone = x.Zone; - } - QS408M.Detail detail; - foreach (QS408M.Description description in descriptions) - { - detail = new QS408M.Detail - { - HeaderUniqueId = description.HeaderUniqueId, - Position = description.Position, - Thickness = description.Thickness, - UniqueId = description.UniqueId - }; - Details.Add(detail); - } - if (Date is null) - Date = logistics.DateTimeFromSequence.ToString(); - if (UniqueId is null && Details.Any()) - UniqueId = Details[0].HeaderUniqueId; + Batch = x.Lot; + Cassette = x.Cassette; + Date = x.Date; + Op = x.Employee; + Layer = x.Layer; + MeanThickness = x.MeanThickness; + PSN = x.PSN; + PassFail = x.PassFail; + RDS = x.RDS; + RVThickness = x.RVThickness; + Reactor = x.Reactor; + Recipe = x.Recipe; + StdDev = x.StdDev; + Title = x.Title; + UniqueId = x.UniqueId; + Wafer = x.Wafer; + Zone = x.Zone; } - + QS408M.Detail detail; + foreach (QS408M.Description description in descriptions) + { + detail = new QS408M.Detail + { + HeaderUniqueId = description.HeaderUniqueId, + Position = description.Position, + Thickness = description.Thickness, + UniqueId = description.UniqueId + }; + Details.Add(detail); + } + if (Date is null) + Date = logistics.DateTimeFromSequence.ToString(); + if (UniqueId is null && Details.Any()) + UniqueId = Details[0].HeaderUniqueId; } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/QS408M/Description.cs b/Adaptation/FileHandlers/QS408M/Description.cs index 2653f20..8299295 100644 --- a/Adaptation/FileHandlers/QS408M/Description.cs +++ b/Adaptation/FileHandlers/QS408M/Description.cs @@ -5,272 +5,265 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; -namespace Adaptation.FileHandlers.QS408M +namespace Adaptation.FileHandlers.QS408M; + +public class Description : IDescription, Shared.Properties.IDescription { - 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 Cassette { get; set; } + public string HeaderUniqueId { get; set; } + public string Layer { get; set; } + public string PassFail { get; set; } + public string Position { get; set; } + public string RDS { get; set; } + public string Title { get; set; } + public string UniqueId { get; set; } + public string Wafer { get; set; } + public string Zone { get; set; } + // + public string MeanThickness { get; set; } + public string RVThickness { get; set; } + public string StdDev { get; set; } + public string Thickness { get; set; } + + string IDescription.GetEventDescription() => "File Has been read and parsed"; + + List IDescription.GetNames(IFileRead fileRead, Logistics logistics) { + List results = new(); + IDescription description = GetDefault(fileRead, logistics); + string json = JsonSerializer.Serialize(description, description.GetType()); + object @object = JsonSerializer.Deserialize(json); + if (@object is not JsonElement jsonElement) + throw new Exception(); + foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) + results.Add(jsonProperty.Name); + return results; + } - - 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 Cassette { get; set; } - public string HeaderUniqueId { get; set; } - public string Layer { get; set; } - public string PassFail { get; set; } - public string Position { get; set; } - public string RDS { get; set; } - public string Title { get; set; } - public string UniqueId { get; set; } - public string Wafer { get; set; } - public string Zone { get; set; } - // - public string MeanThickness { get; set; } - public string RVThickness { get; set; } - public string StdDev { get; set; } - public string Thickness { get; set; } - - string IDescription.GetEventDescription() + List IDescription.GetDetailNames() + { + List results = new() { - return "File Has been read and parsed"; + nameof(Cassette), + nameof(HeaderUniqueId), + nameof(Layer), + nameof(PassFail), + nameof(Position), + nameof(RDS), + nameof(Title), + nameof(UniqueId), + nameof(Wafer), + nameof(Zone) + }; + return results; + } + + List IDescription.GetHeaderNames() + { + List 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 IDescription.GetParameterNames() + { + List results = new() + { + nameof(MeanThickness), + nameof(RVThickness), + nameof(StdDev), + nameof(Thickness) + }; + 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(json); + results = ((JsonElement)@object).EnumerateObject().ToArray(); + return results; + } + + List IDescription.GetPairedParameterNames() + { + List results = new(); + return results; + } + + List IDescription.GetIgnoreParameterNames(Test test) + { + List results = new(); + return results; + } + + IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics) + { + Description result = GetDefault(fileRead, logistics); + return result; + } + + Dictionary IDescription.GetDisplayNamesJsonElement(IFileRead fileRead) + { + Dictionary results = new(); + IDescription description = GetDisplayNames(); + string json = JsonSerializer.Serialize(description, description.GetType()); + JsonElement jsonElement = JsonSerializer.Deserialize(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.GetNames(IFileRead fileRead, Logistics logistics) + List IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData) + { + List results = new(); + if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData) + results.Add(GetDefault(fileRead, logistics)); + else { - List results = new(); - IDescription description = GetDefault(fileRead, logistics); - string json = JsonSerializer.Serialize(description, description.GetType()); - object @object = JsonSerializer.Deserialize(json); - if (@object is not JsonElement jsonElement) - throw new Exception(); - foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) - results.Add(jsonProperty.Name); - return results; - } - - List IDescription.GetDetailNames() - { - List results = new() - { - nameof(Cassette), - nameof(HeaderUniqueId), - nameof(Layer), - nameof(PassFail), - nameof(Position), - nameof(RDS), - nameof(Title), - nameof(UniqueId), - nameof(Wafer), - nameof(Zone) - }; - return results; - } - - List IDescription.GetHeaderNames() - { - List 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 IDescription.GetParameterNames() - { - List results = new() - { - nameof(MeanThickness), - nameof(RVThickness), - nameof(StdDev), - nameof(Thickness) - }; - 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(json); - results = ((JsonElement)@object).EnumerateObject().ToArray(); - return results; - } - - List IDescription.GetPairedParameterNames() - { - List results = new(); - return results; - } - - List IDescription.GetIgnoreParameterNames(Test test) - { - List results = new(); - return results; - } - - IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics) - { - Description result = GetDefault(fileRead, logistics); - return result; - } - - Dictionary IDescription.GetDisplayNamesJsonElement(IFileRead fileRead) - { - Dictionary results = new(); - IDescription description = GetDisplayNames(); - string json = JsonSerializer.Serialize(description, description.GetType()); - JsonElement jsonElement = JsonSerializer.Deserialize(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.GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData) - { - List results = new(); - if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData) - results.Add(GetDefault(fileRead, logistics)); + 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++) { - 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 { - 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, - Employee = processData.Employee, - Lot = processData.Batch, - PSN = processData.PSN, - Reactor = processData.Reactor, - Recipe = processData.Recipe, - // - Cassette = processData.Cassette, - HeaderUniqueId = detail.HeaderUniqueId, - Layer = processData.Layer, - PassFail = processData.PassFail, - Position = detail.Position, - RDS = processData.RDS, - Title = processData.Title, - UniqueId = detail.UniqueId, - Wafer = processData.Wafer, - Zone = processData.Zone, - // - MeanThickness = processData.MeanThickness, - RVThickness = processData.RVThickness, - StdDev = processData.StdDev, - Thickness = detail.Thickness - }; - results.Add(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, + Employee = processData.Employee, + Lot = processData.Batch, + PSN = processData.PSN, + Reactor = processData.Reactor, + Recipe = processData.Recipe, + // + Cassette = processData.Cassette, + HeaderUniqueId = detail.HeaderUniqueId, + Layer = processData.Layer, + PassFail = processData.PassFail, + Position = detail.Position, + RDS = processData.RDS, + Title = processData.Title, + UniqueId = detail.UniqueId, + Wafer = processData.Wafer, + Zone = processData.Zone, + // + MeanThickness = processData.MeanThickness, + RVThickness = processData.RVThickness, + StdDev = processData.StdDev, + Thickness = detail.Thickness + }; + results.Add(description); } - return results; } + return results; + } - private Description GetDisplayNames() + private Description GetDisplayNames() + { + Description result = new(); + return result; + } + + private Description GetDefault(IFileRead fileRead, Logistics logistics) + { + Description result = new() { - 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), - // - Cassette = nameof(Cassette), - HeaderUniqueId = nameof(HeaderUniqueId), - Layer = nameof(Layer), - PassFail = nameof(PassFail), - Position = nameof(Position), - RDS = nameof(RDS), - Title = nameof(Title), - UniqueId = nameof(UniqueId), - Wafer = nameof(Wafer), - Zone = nameof(Zone), - // - MeanThickness = nameof(MeanThickness), - RVThickness = nameof(RVThickness), - StdDev = nameof(StdDev), - Thickness = nameof(Thickness) - }; - return result; - } - + 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), + // + Cassette = nameof(Cassette), + HeaderUniqueId = nameof(HeaderUniqueId), + Layer = nameof(Layer), + PassFail = nameof(PassFail), + Position = nameof(Position), + RDS = nameof(RDS), + Title = nameof(Title), + UniqueId = nameof(UniqueId), + Wafer = nameof(Wafer), + Zone = nameof(Zone), + // + MeanThickness = nameof(MeanThickness), + RVThickness = nameof(RVThickness), + StdDev = nameof(StdDev), + Thickness = nameof(Thickness) + }; + return result; } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/QS408M/Detail.cs b/Adaptation/FileHandlers/QS408M/Detail.cs index 567e9d4..c09e73b 100644 --- a/Adaptation/FileHandlers/QS408M/Detail.cs +++ b/Adaptation/FileHandlers/QS408M/Detail.cs @@ -1,19 +1,13 @@ -namespace Adaptation.FileHandlers.QS408M +namespace Adaptation.FileHandlers.QS408M; + +public class Detail { - public class Detail - { + public string HeaderUniqueId { get; set; } + public string Position { get; set; } + public string Thickness { get; set; } + public string UniqueId { get; set; } - public string HeaderUniqueId { get; set; } - public string Position { get; set; } - public string Thickness { get; set; } - public string UniqueId { get; set; } - - public override string ToString() - { - return string.Concat(Position, ";", Thickness, ";"); - } - - } + public override string ToString() => string.Concat(Position, ";", Thickness, ";"); } \ No newline at end of file diff --git a/Adaptation/FileHandlers/QS408M/FileRead.cs b/Adaptation/FileHandlers/QS408M/FileRead.cs index 66a78b9..ad3c99a 100644 --- a/Adaptation/FileHandlers/QS408M/FileRead.cs +++ b/Adaptation/FileHandlers/QS408M/FileRead.cs @@ -9,142 +9,122 @@ using System.Linq; using System.Text.Json; using System.Text.RegularExpressions; -namespace Adaptation.FileHandlers.QS408M +namespace Adaptation.FileHandlers.QS408M; + +public class FileRead : Shared.FileRead, IFileRead { - public class FileRead : Shared.FileRead, IFileRead + private readonly string _OriginalDataBioRad; + private readonly ProcessData _LastProcessData; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new Logistics(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _OriginalDataBioRad = "OriginalDataBioRad_"; + _LastProcessData = new(); + } - private readonly string _OriginalDataBioRad; - private readonly ProcessData _LastProcessData; + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults, exception); - public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted, int hyphenXToArchive, int hyphenIsArchive) : - base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted, hyphenXToArchive, hyphenIsArchive) + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); + + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } + + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } + + string[] IFileRead.Move(Tuple> 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 IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } + + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } + + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + { + Tuple> 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>(results.Item1, Array.Empty(), JsonSerializer.Deserialize("[]"), results.Item4); + if (results.Item3.Length > 0 && _IsEAFHosted) + WritePDSF(this, results.Item3); + UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); + return results; + } + + Tuple> IFileRead.ReExtract() + { + Tuple> results; + List headerNames = _Description.GetHeaderNames(); + Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); + results = ReExtract(this, headerNames, keyValuePairs); + return results; + } + + void IFileRead.CheckTests(Test[] tests, bool extra) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); + + void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) + { + Tuple> results = new(string.Empty, null, null, new List()); + _Logistics = new Logistics(this, reportFullPath, useSplitForMID: true); + SetFileParameterLotIDToLogisticsMID(); + if (reportFullPath.Length < _MinFileLength) + results.Item4.Add(new FileInfo(reportFullPath)); + else { - _MinFileLength = 10; - _NullData = string.Empty; - _Logistics = new Logistics(this); - if (_FileParameter is null) - throw new Exception(cellInstanceConnectionName); - if (_ModelObjectParameterDefinitions is null) - throw new Exception(cellInstanceConnectionName); - if (_IsDuplicator) - throw new Exception(cellInstanceConnectionName); - _OriginalDataBioRad = "OriginalDataBioRad_"; - _LastProcessData = new(); - } - - void IFileRead.Move(Tuple> extractResults, Exception exception) - { - Move(this, extractResults, exception); - } - - void IFileRead.WaitForThread() - { - WaitForThread(thread: null, threadExceptions: null); - } - - string IFileRead.GetEventDescription() - { - string result = _Description.GetEventDescription(); - return result; - } - - List IFileRead.GetHeaderNames() - { - List results = _Description.GetHeaderNames(); - return results; - } - - string[] IFileRead.Move(Tuple> 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 IFileRead.GetDisplayNamesJsonElement() - { - Dictionary results = _Description.GetDisplayNamesJsonElement(this); - return results; - } - - List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) - { - List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); - return results; - } - - Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) - { - Tuple> 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>(results.Item1, new Test[] { }, JsonSerializer.Deserialize("[]"), results.Item4); - if (results.Item3.Length > 0 && _IsEAFHosted) - WritePDSF(this, results.Item3); - UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); - return results; - } - - Tuple> IFileRead.ReExtract() - { - Tuple> results; - List headerNames = _Description.GetHeaderNames(); - Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); - results = ReExtract(this, headerNames, keyValuePairs); - return results; - } - - void IFileRead.CheckTests(Test[] tests, bool extra) - { - throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); - } - - void IFileRead.MoveArchive() - { - throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); - } - - void IFileRead.Callback(object state) - { - throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); - } - - private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) - { - Tuple> results = new(string.Empty, null, null, new List()); - _Logistics = new Logistics(this, reportFullPath, useSplitForMID: true); - SetFileParameterLotIDToLogisticsMID(); - if (reportFullPath.Length < _MinFileLength) - results.Item4.Add(new FileInfo(reportFullPath)); - else + IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, lastProcessData: _LastProcessData); + if (iProcessData is ProcessData processData) { - IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _OriginalDataBioRad, lastProcessData: _LastProcessData); - if (iProcessData is ProcessData processData) - { - string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); - mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; - _Logistics.MID = mid; - SetFileParameterLotID(mid); - _Logistics.ProcessJobID = processData.Reactor; - } - if (!iProcessData.Details.Any()) - throw new Exception(string.Concat("No Data - ", dateTime.Ticks)); - results = iProcessData.GetResults(this, _Logistics, results.Item4); + string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN); + mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + _Logistics.MID = mid; + SetFileParameterLotID(mid); + _Logistics.ProcessJobID = processData.Reactor; } - return results; + if (!iProcessData.Details.Any()) + throw new Exception(string.Concat("No Data - ", dateTime.Ticks)); + results = iProcessData.GetResults(this, _Logistics, results.Item4); } - + return results; } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/QS408M/ProcessData.cs b/Adaptation/FileHandlers/QS408M/ProcessData.cs index d0881ab..dc65880 100644 --- a/Adaptation/FileHandlers/QS408M/ProcessData.cs +++ b/Adaptation/FileHandlers/QS408M/ProcessData.cs @@ -11,425 +11,419 @@ using System.Text; using System.Text.Json; using System.Text.RegularExpressions; -namespace Adaptation.FileHandlers.QS408M +namespace Adaptation.FileHandlers.QS408M; + +public partial class ProcessData : IProcessData { - public partial class ProcessData : IProcessData + private readonly List _Details; + + public string JobID { get; set; } + public string MesEntity { get; set; } + public string Batch { get; set; } + public string Cassette { get; set; } + public string Date { get; set; } + public string Employee { get; set; } + public string Layer { get; set; } + public string MeanThickness { get; set; } + public string PSN { get; set; } + public string PassFail { get; set; } + public string RDS { get; set; } + public string RVThickness { get; set; } + public string Reactor { get; set; } + public string Recipe { get; set; } + public string StdDev { get; set; } + public string Title { get; set; } + public string UniqueId { get; set; } + public string Wafer { get; set; } + public string Zone { get; set; } + + List Shared.Properties.IProcessData.Details => _Details; + + private int _I; + private string _Data; + private readonly ILog _Log; + + public ProcessData() { + } - private readonly List _Details; + public ProcessData(IFileRead fileRead, Logistics logistics, List fileInfoCollection, string originalDataBioRad, ProcessData lastProcessData) + { + JobID = logistics.JobID; + fileInfoCollection.Clear(); + _Details = new List(); + MesEntity = logistics.MesEntity; + _Log = LogManager.GetLogger(typeof(ProcessData)); + Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, lastProcessData); + } - public string JobID { get; set; } - public string MesEntity { get; set; } - public string Batch { get; set; } - public string Cassette { get; set; } - public string Date { get; set; } - public string Employee { get; set; } - public string Layer { get; set; } - public string MeanThickness { get; set; } - public string PSN { get; set; } - public string PassFail { get; set; } - public string RDS { get; set; } - public string RVThickness { get; set; } - public string Reactor { get; set; } - public string Recipe { get; set; } - public string StdDev { get; set; } - public string Title { get; set; } - public string UniqueId { get; set; } - public string Wafer { get; set; } - public string Zone { get; set; } + string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors) => throw new Exception(string.Concat("See ", nameof(Parse))); - List Shared.Properties.IProcessData.Details => _Details; - - private int _I; - private string _Data; - private readonly ILog _Log; - - public ProcessData() + Tuple> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection) + { + Tuple> results; + List tests = new(); + foreach (object item in _Details) + tests.Add(Test.BioRadQS408M); + List descriptions = fileRead.GetDescriptions(fileRead, tests, this); + if (tests.Count != descriptions.Count) + throw new Exception(); + for (int i = 0; i < tests.Count; i++) { - } - - public ProcessData(IFileRead fileRead, Logistics logistics, List fileInfoCollection, string originalDataBioRad, ProcessData lastProcessData) - { - JobID = logistics.JobID; - fileInfoCollection.Clear(); - _Details = new List(); - MesEntity = logistics.MesEntity; - _Log = LogManager.GetLogger(typeof(ProcessData)); - Parse(fileRead, logistics, fileInfoCollection, originalDataBioRad, lastProcessData); - } - - string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors) - { - throw new Exception(string.Concat("See ", nameof(Parse))); - } - - Tuple> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection) - { - Tuple> results; - List tests = new(); - foreach (object item in _Details) - tests.Add(Test.BioRadQS408M); - List descriptions = fileRead.GetDescriptions(fileRead, tests, this); - if (tests.Count != descriptions.Count) + if (descriptions[i] is not Description description) + throw new Exception(); + if (description.Test != (int)tests[i]) 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 fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); - string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); - JsonElement[] jsonElements = JsonSerializer.Deserialize(json); - results = new Tuple>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); - return results; } + List fileReadDescriptions = (from l in descriptions select (Description)l).ToList(); + string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType()); + JsonElement[] jsonElements = JsonSerializer.Deserialize(json); + results = new Tuple>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection); + return results; + } - private string GetBefore(string text) + 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) { - string str; - string str1; int num = _Data.IndexOf(text, _I); if (num <= -1) { str = _Data.Substring(_I); _I = _Data.Length; - str1 = str.Trim(); + before = str; } else { str = _Data.Substring(_I, num - _I); _I = num + text.Length; - str1 = str.Trim(); + before = str; } - return str1; } - - private string GetBefore(string text, bool trim) + else { - string str; - string before; - if (!trim) + before = GetBefore(text); + } + return before; + } + + private string GetToEOL() + { + string result; + if (_Data.IndexOf("\n", _I) > -1) + result = GetBefore("\n"); + else + result = GetBefore(Environment.NewLine); + return result; + } + + private string GetToEOL(bool trim) + { + string str; + if (_Data.IndexOf("\n", _I) > -1) + str = (!trim ? GetBefore("\n", false) : GetToEOL()); + else + str = (!trim ? GetBefore(Environment.NewLine, false) : GetToEOL()); + return str; + } + + private string GetToken() + { + while (true) + { + if (_I >= _Data.Length || !IsNullOrWhiteSpace(_Data.Substring(_I, 1))) { - 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; - } + break; } - else + _I++; + } + int num = _I; + while (true) + { + if (num >= _Data.Length || IsNullOrWhiteSpace(_Data.Substring(num, 1))) { - before = GetBefore(text); + break; } - return before; + num++; } + string str = _Data.Substring(_I, num - _I); + _I = num; + return str.Trim(); + } - private string GetToEOL() - { - string result; - if (_Data.IndexOf("\n", _I) > -1) - result = GetBefore("\n"); - else - result = GetBefore(Environment.NewLine); - return result; - } + private string GetToText(string text) + { + string str = _Data.Substring(_I, _Data.IndexOf(text, _I) - _I).Trim(); + return str; + } - private string GetToEOL(bool trim) - { - string str; - if (_Data.IndexOf("\n", _I) > -1) - str = (!trim ? GetBefore("\n", false) : GetToEOL()); - else - str = (!trim ? GetBefore(Environment.NewLine, false) : GetToEOL()); - return str; - } + private bool IsBlankLine() + { + int num = _Data.IndexOf("\n", _I); + return IsNullOrWhiteSpace((num > -1 ? _Data.Substring(_I, num - _I) : _Data.Substring(_I))); + } - private string GetToken() + private bool IsNullOrWhiteSpace(string text) + { + bool flag; + int num = 0; + while (true) { - while (true) + if (num >= text.Length) { - if (_I >= _Data.Length || !IsNullOrWhiteSpace(_Data.Substring(_I, 1))) - { - break; - } - _I++; + flag = true; + break; } - int num = _I; - while (true) + else if (char.IsWhiteSpace(text[num])) { - 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 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; + flag = false; + break; } } + return flag; + } - internal static DateTime GetDateTime(Logistics logistics, string dateTimeText) + 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) { - DateTime result; - string inputDateFormat = "ddd mmm dd HH:mm:ss yyyy"; - if (dateTimeText.Length != inputDateFormat.Length) + _I = _Data.Length; + } + else + { + _I = num + text.Length; + } + } + + internal static DateTime GetDateTime(Logistics logistics, string dateTimeText) + { + DateTime result; + string inputDateFormat = "ddd mmm dd HH:mm:ss yyyy"; + 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 (!DateTime.TryParseExact(dateTimeText, inputDateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed)) - result = logistics.DateTimeFromSequence; + if (dateTimeParsed < logistics.DateTimeFromSequence.AddDays(1) && dateTimeParsed > logistics.DateTimeFromSequence.AddDays(-1)) + result = dateTimeParsed; else - { - if (dateTimeParsed < logistics.DateTimeFromSequence.AddDays(1) && dateTimeParsed > logistics.DateTimeFromSequence.AddDays(-1)) - result = dateTimeParsed; - else - result = logistics.DateTimeFromSequence; - } + result = logistics.DateTimeFromSequence; } - return result; } + return result; + } - private void Parse(IFileRead fileRead, Logistics logistics, List fileInfoCollection, string originalDataBioRad, ProcessData lastProcessData) + private void Parse(IFileRead fileRead, Logistics logistics, List fileInfoCollection, string originalDataBioRad, ProcessData lastProcessData) + { + if (fileRead is null) + { } + _I = 0; + _Data = string.Empty; + List details = new(); + string receivedData = File.ReadAllText(logistics.ReportFullPath); + _Log.Debug($"****ParseData - Source file contents:"); + _Log.Debug(receivedData); + string[] files = Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), string.Concat(originalDataBioRad, logistics.Sequence, "*"), SearchOption.TopDirectoryOnly); + foreach (string file in files) + fileInfoCollection.Add(new FileInfo(file)); + // occasionally there are multiple blocks of results, get the last one as earlier ones may be aborted runs. + int index = receivedData.LastIndexOf("Bio-Rad"); + if (index > -1) + receivedData = receivedData.Substring(index); + _Log.Debug($"****ParseData - Source file contents to be parsed:"); + _Log.Debug(receivedData); + if (!string.IsNullOrEmpty(receivedData)) { - if (fileRead is null) - { } _I = 0; - _Data = string.Empty; - List details = new(); - string receivedData = File.ReadAllText(logistics.ReportFullPath); - _Log.Debug($"****ParseData - Source file contents:"); - _Log.Debug(receivedData); - string[] files = Directory.GetFiles(Path.GetDirectoryName(logistics.ReportFullPath), string.Concat(originalDataBioRad, logistics.Sequence, "*"), SearchOption.TopDirectoryOnly); - foreach (string file in files) - fileInfoCollection.Add(new FileInfo(file)); - // occasionally there are multiple blocks of results, get the last one as earlier ones may be aborted runs. - int index = receivedData.LastIndexOf("Bio-Rad"); - if (index > -1) - receivedData = receivedData.Substring(index); - _Log.Debug($"****ParseData - Source file contents to be parsed:"); - _Log.Debug(receivedData); - if (!string.IsNullOrEmpty(receivedData)) + _Data = receivedData; + Title = GetBefore("Recipe:"); + Recipe = GetToken(); + string dateTimeText = GetToEOL(); + if (dateTimeText.EndsWith(".")) + dateTimeText = dateTimeText.Remove(dateTimeText.Length - 1, 1); + DateTime dateTime = GetDateTime(logistics, dateTimeText); + Date = dateTime.ToString(); + ScanPast("operator:"); + Employee = GetBefore("batch:"); + Batch = GetToEOL(); + // Remove illegal characters \/:*?"<>| found in the Batch + Batch = Regex.Replace(Batch, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + ScanPast("cassette:"); + Cassette = GetBefore("wafer:"); + if (string.IsNullOrEmpty(Batch)) { _I = 0; _Data = receivedData; - Title = GetBefore("Recipe:"); - Recipe = GetToken(); - string dateTimeText = GetToEOL(); - if (dateTimeText.EndsWith(".")) - dateTimeText = dateTimeText.Remove(dateTimeText.Length - 1, 1); - DateTime dateTime = GetDateTime(logistics, dateTimeText); - Date = dateTime.ToString(); - ScanPast("operator:"); - Employee = GetBefore("batch:"); - Batch = GetToEOL(); - // Remove illegal characters \/:*?"<>| found in the Batch - Batch = Regex.Replace(Batch, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; - ScanPast("cassette:"); - Cassette = GetBefore("wafer:"); - if (string.IsNullOrEmpty(Batch)) + ScanPast("wafer:"); + } + Wafer = GetToEOL(); + _ = GetToEOL(); + _ = GetToEOL(); + string token = GetToken(); + int counter = 1; + while (true) + { + if ((string.IsNullOrEmpty(token) || !char.IsDigit(token[0]))) + break; + Detail detail = new() { - _I = 0; - _Data = receivedData; - ScanPast("wafer:"); - } - Wafer = GetToEOL(); - GetToEOL(); - GetToEOL(); - string token = GetToken(); - int counter = 1; - while (true) - { - if ((string.IsNullOrEmpty(token) || !char.IsDigit(token[0]))) - break; - Detail detail = new() - { - Position = token, - Thickness = GetToken(), - UniqueId = string.Concat("_Point-", counter) - }; - details.Add(detail); - token = GetToken(); - counter++; - } - ScanPast("mean thickness ="); - MeanThickness = GetBefore(", std. dev ="); - StdDev = GetToken(); - PassFail = GetToEOL(); - ScanPast("thickness"); - RVThickness = GetToEOL(); + Position = token, + Thickness = GetToken(), + UniqueId = string.Concat("_Point-", counter) + }; + details.Add(detail); + token = GetToken(); + counter++; } - - if (string.IsNullOrEmpty(Wafer)) - throw new Exception("Wafer field is missing."); - - //parse out batch and validate - string[] parsedBatch = Wafer.Split('-'); - if (parsedBatch.Length >= 1) - Reactor = parsedBatch[0]; - if (parsedBatch.Length >= 2) - RDS = parsedBatch[1]; - if (parsedBatch.Length >= 3) - { - string[] parsedPSN = parsedBatch[2].Split('.'); - if (parsedPSN.Length >= 1) - PSN = parsedPSN[0]; - if (parsedPSN.Length >= 2) - Layer = parsedPSN[1]; - } - if (parsedBatch.Length >= 4) - Zone = parsedBatch[3]; - - JobID = logistics.JobID; - - if (logistics.DateTimeFromSequence > DateTime.Now.AddHours(-24)) - { - if (string.IsNullOrEmpty(lastProcessData.Wafer)) - { - lastProcessData.Batch = JobID; - lastProcessData.Cassette = JobID; - lastProcessData.Employee = JobID; - lastProcessData.Recipe = JobID; - lastProcessData.Title = JobID; - } - lastProcessData.Wafer = Wafer; - lastProcessData.Reactor = Reactor; - lastProcessData.RDS = RDS; - - string check = "--------"; - if (string.IsNullOrEmpty(Batch) || Batch.Contains(check)) - Batch = lastProcessData.Batch; - else - lastProcessData.Batch = Batch; - if (string.IsNullOrEmpty(Cassette) || Cassette.Contains(check)) - Cassette = lastProcessData.Cassette; - else - lastProcessData.Cassette = Cassette; - if (string.IsNullOrEmpty(Employee) || Employee.Contains(check)) - Employee = lastProcessData.Employee; - else - lastProcessData.Employee = Employee; - if (string.IsNullOrEmpty(Recipe) || Recipe.Contains(check)) - Recipe = lastProcessData.Recipe; - else - lastProcessData.Recipe = Recipe; - if (string.IsNullOrEmpty(Title) || Title.Contains(check)) - Title = lastProcessData.Title; - else - lastProcessData.Title = Title; - } - - //fix title - StringBuilder titleFixed = new(); - foreach (char c in Title) - { - if (char.IsLetterOrDigit(c) || c == '-' || c == '.') - titleFixed.Append(c); - } - Title = titleFixed.ToString(); - - //fix wafer - StringBuilder waferFixed = new(); - foreach (char c in Wafer) - { - if (char.IsLetterOrDigit(c) || c == '-' || c == '.') - waferFixed.Append(c); - } - Wafer = waferFixed.ToString(); - - //create filename / unique id - UniqueId = string.Concat(Title, "_", Wafer, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff")); - foreach (Detail detail in details) - { - detail.HeaderUniqueId = UniqueId; - detail.UniqueId = string.Concat(UniqueId, detail.UniqueId); - } - - //trace datatype - _Log.Debug("BioRad parsed infomation:"); - _Log.Debug(string.Format("Batch: {0}", Batch)); - _Log.Debug(string.Format("Cassette: {0}", Cassette)); - _Log.Debug(string.Format("Date: {0}", Date)); - foreach (Detail bioRadDetail in details) - _Log.Debug(string.Format("Details: {0} - {1}", bioRadDetail.Position, bioRadDetail.Thickness)); - _Log.Debug(string.Format("Mean Thickness: {0}", MeanThickness)); - _Log.Debug(string.Format("Operator: {0}", Employee)); - _Log.Debug(string.Format("Pass/Fail: {0}", PassFail)); - _Log.Debug(string.Format("Recipe: {0}", Recipe)); - _Log.Debug(string.Format("RV Thickness: {0}", RVThickness)); - _Log.Debug(string.Format("Std Dev: {0}", StdDev)); - _Log.Debug(string.Format("Title: {0}", Title)); - _Log.Debug(string.Format("Wafer: {0}", Wafer)); - fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath)); - _Details.AddRange(details); + ScanPast("mean thickness ="); + MeanThickness = GetBefore(", std. dev ="); + StdDev = GetToken(); + PassFail = GetToEOL(); + ScanPast("thickness"); + RVThickness = GetToEOL(); } + if (string.IsNullOrEmpty(Wafer)) + throw new Exception("Wafer field is missing."); + + //parse out batch and validate + string[] parsedBatch = Wafer.Split('-'); + if (parsedBatch.Length >= 1) + Reactor = parsedBatch[0]; + if (parsedBatch.Length >= 2) + RDS = parsedBatch[1]; + if (parsedBatch.Length >= 3) + { + string[] parsedPSN = parsedBatch[2].Split('.'); + if (parsedPSN.Length >= 1) + PSN = parsedPSN[0]; + if (parsedPSN.Length >= 2) + Layer = parsedPSN[1]; + } + if (parsedBatch.Length >= 4) + Zone = parsedBatch[3]; + + JobID = logistics.JobID; + + if (logistics.DateTimeFromSequence > DateTime.Now.AddHours(-24)) + { + if (string.IsNullOrEmpty(lastProcessData.Wafer)) + { + lastProcessData.Batch = JobID; + lastProcessData.Cassette = JobID; + lastProcessData.Employee = JobID; + lastProcessData.Recipe = JobID; + lastProcessData.Title = JobID; + } + lastProcessData.Wafer = Wafer; + lastProcessData.Reactor = Reactor; + lastProcessData.RDS = RDS; + + string check = "--------"; + if (string.IsNullOrEmpty(Batch) || Batch.Contains(check)) + Batch = lastProcessData.Batch; + else + lastProcessData.Batch = Batch; + if (string.IsNullOrEmpty(Cassette) || Cassette.Contains(check)) + Cassette = lastProcessData.Cassette; + else + lastProcessData.Cassette = Cassette; + if (string.IsNullOrEmpty(Employee) || Employee.Contains(check)) + Employee = lastProcessData.Employee; + else + lastProcessData.Employee = Employee; + if (string.IsNullOrEmpty(Recipe) || Recipe.Contains(check)) + Recipe = lastProcessData.Recipe; + else + lastProcessData.Recipe = Recipe; + if (string.IsNullOrEmpty(Title) || Title.Contains(check)) + Title = lastProcessData.Title; + else + lastProcessData.Title = Title; + } + + //fix title + StringBuilder titleFixed = new(); + foreach (char c in Title) + { + if (char.IsLetterOrDigit(c) || c == '-' || c == '.') + _ = titleFixed.Append(c); + } + Title = titleFixed.ToString(); + + //fix wafer + StringBuilder waferFixed = new(); + foreach (char c in Wafer) + { + if (char.IsLetterOrDigit(c) || c == '-' || c == '.') + _ = waferFixed.Append(c); + } + Wafer = waferFixed.ToString(); + + //create filename / unique id + UniqueId = string.Concat(Title, "_", Wafer, "_", logistics.DateTimeFromSequence.ToString("yyyyMMddHHmmssffff")); + foreach (Detail detail in details) + { + detail.HeaderUniqueId = UniqueId; + detail.UniqueId = string.Concat(UniqueId, detail.UniqueId); + } + + //trace datatype + _Log.Debug("BioRad parsed infomation:"); + _Log.Debug(string.Format("Batch: {0}", Batch)); + _Log.Debug(string.Format("Cassette: {0}", Cassette)); + _Log.Debug(string.Format("Date: {0}", Date)); + foreach (Detail bioRadDetail in details) + _Log.Debug(string.Format("Details: {0} - {1}", bioRadDetail.Position, bioRadDetail.Thickness)); + _Log.Debug(string.Format("Mean Thickness: {0}", MeanThickness)); + _Log.Debug(string.Format("Operator: {0}", Employee)); + _Log.Debug(string.Format("Pass/Fail: {0}", PassFail)); + _Log.Debug(string.Format("Recipe: {0}", Recipe)); + _Log.Debug(string.Format("RV Thickness: {0}", RVThickness)); + _Log.Debug(string.Format("Std Dev: {0}", StdDev)); + _Log.Debug(string.Format("Title: {0}", Title)); + _Log.Debug(string.Format("Wafer: {0}", Wafer)); + fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath)); + _Details.AddRange(details); } } \ No newline at end of file diff --git a/Adaptation/FileHandlers/ToArchive/FileRead.cs b/Adaptation/FileHandlers/ToArchive/FileRead.cs new file mode 100644 index 0000000..236f390 --- /dev/null +++ b/Adaptation/FileHandlers/ToArchive/FileRead.cs @@ -0,0 +1,140 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Duplicator; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Json; + +namespace Adaptation.FileHandlers.ToArchive; + +public class FileRead : Shared.FileRead, IFileRead +{ + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new Logistics(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) + { + bool isErrorFile = exception is not null; + if (!isErrorFile && !string.IsNullOrEmpty(_Logistics.ReportFullPath)) + { + FileInfo fileInfo = new(_Logistics.ReportFullPath); + if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime) + File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime); + } + Move(extractResults, exception); + } + + void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null); + + string IFileRead.GetEventDescription() + { + string result = _Description.GetEventDescription(); + return result; + } + + List IFileRead.GetHeaderNames() + { + List results = _Description.GetHeaderNames(); + return results; + } + + string[] IFileRead.Move(Tuple> 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 IFileRead.GetDisplayNamesJsonElement() + { + Dictionary results = _Description.GetDisplayNamesJsonElement(this); + return results; + } + + List IFileRead.GetDescriptions(IFileRead fileRead, List tests, IProcessData processData) + { + List results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData); + return results; + } + + Tuple> IFileRead.GetExtractResult(string reportFullPath, string eventName) + { + Tuple> 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>(results.Item1, Array.Empty(), JsonSerializer.Deserialize("[]"), results.Item4); + if (results.Item3.Length > 0 && _IsEAFHosted) + WritePDSF(this, results.Item3); + UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks); + return results; + } + + Tuple> IFileRead.ReExtract() + { + Tuple> results; + List headerNames = _Description.GetHeaderNames(); + Dictionary keyValuePairs = _Description.GetDisplayNamesJsonElement(this); + results = ReExtract(this, headerNames, keyValuePairs); + return results; + } + + void IFileRead.CheckTests(Test[] tests, bool extra) + { + if (_Description is not Description) + throw new Exception(); + } + + void IFileRead.Callback(object state) => throw new Exception(string.Concat("Not ", nameof(_IsDuplicator))); + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) + { + if (dateTime == DateTime.MinValue) + { } + Tuple> results = new(string.Empty, null, null, new List()); + _Logistics = new Logistics(this, reportFullPath, useSplitForMID: true); + SetFileParameterLotIDToLogisticsMID(); + + string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_'); + string duplicateDirectory = string.Concat(_FileConnectorConfiguration.TargetFileLocation, @"\", segments[0]); + if (segments.Length > 2) + duplicateDirectory = string.Concat(duplicateDirectory, @"-", segments[2]); + if (!Directory.Exists(duplicateDirectory)) + _ = Directory.CreateDirectory(duplicateDirectory); + + string logisticsSequence = _Logistics.Sequence.ToString(); + bool isDummyRun = _DummyRuns.Any() && _DummyRuns.ContainsKey(_Logistics.JobID) && _DummyRuns[_Logistics.JobID].Any() && (from l in _DummyRuns[_Logistics.JobID] where l == _Logistics.Sequence select 1).Any(); + + List> tuples = new(); + + string destinationDirectory = WriteScopeInfo(_ProgressPath, _Logistics, dateTime, duplicateDirectory, tuples); + if (isDummyRun) + Shared0607(reportFullPath, duplicateDirectory, logisticsSequence, destinationDirectory); + return results; + } + +} \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs b/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs index b6cb4b8..59d1883 100644 --- a/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs +++ b/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs @@ -1,13 +1,12 @@ -namespace Adaptation.Ifx.Eaf.Common.Configuration -{ - [System.Runtime.Serialization.DataContractAttribute] - public class ConnectionSetting - { - public ConnectionSetting(string name, string value) { } +namespace Adaptation.Ifx.Eaf.Common.Configuration; - [System.Runtime.Serialization.DataMemberAttribute] - public string Name { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string Value { get; set; } - } +[System.Runtime.Serialization.DataContractAttribute] +public class ConnectionSetting +{ + public ConnectionSetting(string name, string value) { } + + [System.Runtime.Serialization.DataMemberAttribute] + public string Name { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string Value { get; set; } } \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs index 4726692..c5d559e 100644 --- a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs @@ -1,19 +1,18 @@ using System; using System.Collections.Generic; -namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; + +public class File { - public class File - { - public File(string filePath) { throw new NotImplementedException(); } - public File(string filePath, DateTime timeFileFound) { throw new NotImplementedException(); } + public File(string filePath) => throw new NotImplementedException(); + public File(string filePath, DateTime timeFileFound) => throw new NotImplementedException(); - public string Path { get; } - public DateTime TimeFound { get; } - public bool IsErrorFile { get; } - public Dictionary ContentParameters { get; } + public string Path { get; } + public DateTime TimeFound { get; } + public bool IsErrorFile { get; } + public Dictionary ContentParameters { get; } - public File UpdateContentParameters(Dictionary contentParameters) { throw new NotImplementedException(); } - public File UpdateParsingStatus(bool isErrorFile) { throw new NotImplementedException(); } - } + public File UpdateContentParameters(Dictionary contentParameters) => throw new NotImplementedException(); + public File UpdateParsingStatus(bool isErrorFile) => throw new NotImplementedException(); } \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs index 561725e..32e7628 100644 --- a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs @@ -2,34 +2,33 @@ using System; using System.Collections.Generic; -namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; + +public class FilePathGenerator { - public class FilePathGenerator - { - public const char PLACEHOLDER_IDENTIFIER = '%'; - public const char PLACEHOLDER_SEPARATOR = ':'; - public const string PLACEHOLDER_NOT_AVAILABLE = "NA"; - public const string PLACEHOLDER_ORIGINAL_FILE_NAME = "OriginalFileName"; - public const string PLACEHOLDER_ORIGINAL_FILE_EXTENSION = "OriginalFileExtension"; - public const string PLACEHOLDER_DATE_TIME = "DateTime"; - public const string PLACEHOLDER_SUB_FOLDER = "SubFolder"; - public const string PLACEHOLDER_CELL_NAME = "CellName"; + public const char PLACEHOLDER_IDENTIFIER = '%'; + public const char PLACEHOLDER_SEPARATOR = ':'; + public const string PLACEHOLDER_NOT_AVAILABLE = "NA"; + public const string PLACEHOLDER_ORIGINAL_FILE_NAME = "OriginalFileName"; + public const string PLACEHOLDER_ORIGINAL_FILE_EXTENSION = "OriginalFileExtension"; + public const string PLACEHOLDER_DATE_TIME = "DateTime"; + public const string PLACEHOLDER_SUB_FOLDER = "SubFolder"; + public const string PLACEHOLDER_CELL_NAME = "CellName"; - public FilePathGenerator(FileConnectorConfiguration config, Dictionary customPattern = null) { throw new NotImplementedException(); } - public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary customPattern = null) { throw new NotImplementedException(); } - public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary customPattern = null) { throw new NotImplementedException(); } + public FilePathGenerator(FileConnectorConfiguration config, Dictionary customPattern = null) => throw new NotImplementedException(); + public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary customPattern = null) => throw new NotImplementedException(); + public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary customPattern = null) => throw new NotImplementedException(); - protected string SubFolderPath { get; } - protected FileConnectorConfiguration Configuration { get; } - protected File File { get; } - protected bool IsErrorFile { get; } - protected string DefaultPlaceHolderValue { get; } + protected string SubFolderPath { get; } + protected FileConnectorConfiguration Configuration { get; } + protected File File { get; } + protected bool IsErrorFile { get; } + protected string DefaultPlaceHolderValue { get; } - public string GetFullTargetPath() { throw new NotImplementedException(); } - public virtual string GetTargetFileName() { throw new NotImplementedException(); } - public string GetTargetFolder(bool throwExceptionIfNotExist = true) { throw new NotImplementedException(); } - 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(); } - } + public string GetFullTargetPath() => throw new NotImplementedException(); + public virtual string GetTargetFileName() => throw new NotImplementedException(); + public string GetTargetFolder(bool throwExceptionIfNotExist = true) => throw new NotImplementedException(); + 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(); } \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs index 5eafd1c..4e4aa83 100644 --- a/Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs @@ -2,134 +2,133 @@ using System; using System.Collections.Generic; -namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; + +[System.Runtime.Serialization.DataContractAttribute] +public class FileConnectorConfiguration { - [System.Runtime.Serialization.DataContractAttribute] - public class FileConnectorConfiguration + public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360; + public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15; + + [System.Runtime.Serialization.DataMemberAttribute] + public virtual bool? TriggerOnChanged { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? PostProcessingRetries { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual bool? CopySourceFolderStructure { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string AlternateTargetFolder { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public long? FileHandleTimeout { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public bool? DeleteEmptySourceSubFolders { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public long? IdleEventWaitTimeInSeconds { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string FileAgeThreshold { get; set; } + public bool? FolderAgeCheckIndividualSubFolders { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual ZipModeEnum? ZipMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public FileAgeFilterEnum? FileAgeFilterMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string ZipTargetFileName { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string ZipErrorTargetFileName { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public long? ZipFileSubFolderLevel { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string DefaultPlaceHolderValue { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public bool? UseZip64Mode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public List ConnectionSettings { get; set; } + public string SourceDirectoryCloaking { get; set; } + public string FolderAgeThreshold { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? FileScanningIntervalInSeconds { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual bool? TriggerOnCreated { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? ZipFileTime { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string SourceFileLocation { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string SourceFileFilter { get; set; } + public List SourceFileFilters { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual bool? IncludeSubDirectories { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual FileScanningOptionEnum? FileScanningOption { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string TargetFileLocation { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string ErrorTargetFileLocation { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string TargetFileName { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? FileHandleWaitTime { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public IfFileExistEnum? IfFileExistAction { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public long? ConnectionRetryInterval { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public PreProcessingModeEnum? PreProcessingMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public PostProcessingModeEnum? PostProcessingMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public virtual long? ZipFileAmount { get; set; } + [System.Runtime.Serialization.DataMemberAttribute] + public string ErrorTargetFileName { get; set; } + + public void Initialize() => throw new NotImplementedException(); + + public enum PostProcessingModeEnum { - public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360; - public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15; - - [System.Runtime.Serialization.DataMemberAttribute] - public virtual bool? TriggerOnChanged { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? PostProcessingRetries { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual bool? CopySourceFolderStructure { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string AlternateTargetFolder { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public long? FileHandleTimeout { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public bool? DeleteEmptySourceSubFolders { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public long? IdleEventWaitTimeInSeconds { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string FileAgeThreshold { get; set; } - public bool? FolderAgeCheckIndividualSubFolders { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual ZipModeEnum? ZipMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public FileAgeFilterEnum? FileAgeFilterMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string ZipTargetFileName { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string ZipErrorTargetFileName { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public long? ZipFileSubFolderLevel { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string DefaultPlaceHolderValue { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public bool? UseZip64Mode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public List ConnectionSettings { get; set; } - public string SourceDirectoryCloaking { get; set; } - public string FolderAgeThreshold { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? FileScanningIntervalInSeconds { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual bool? TriggerOnCreated { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? ZipFileTime { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string SourceFileLocation { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string SourceFileFilter { get; set; } - public List SourceFileFilters { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual bool? IncludeSubDirectories { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual FileScanningOptionEnum? FileScanningOption { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string TargetFileLocation { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string ErrorTargetFileLocation { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string TargetFileName { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? FileHandleWaitTime { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public IfFileExistEnum? IfFileExistAction { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public long? ConnectionRetryInterval { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public PreProcessingModeEnum? PreProcessingMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public PostProcessingModeEnum? PostProcessingMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public virtual long? ZipFileAmount { get; set; } - [System.Runtime.Serialization.DataMemberAttribute] - public string ErrorTargetFileName { get; set; } - - public void Initialize() { throw new NotImplementedException(); } - - public enum PostProcessingModeEnum - { - None = 0, - Move = 1, - Copy = 2, - Rename = 3, - Zip = 4, - Delete = 5, - MoveFolder = 6, - CopyFolder = 7, - DeleteFolder = 8 - } - public enum PreProcessingModeEnum - { - None = 0, - Process = 1 - } - public enum IfFileExistEnum - { - Overwrite = 0, - LeaveFiles = 1, - Delete = 2 - } - public enum IfPostProcessingFailsEnum - { - LeaveFiles = 0, - Delete = 1 - } - public enum FileScanningOptionEnum - { - FileWatcher = 0, - TimeBased = 1 - } - public enum ZipModeEnum - { - ZipByAmountOrTime = 0, - ZipByFileName = 1, - ZipBySubFolderName = 2 - } - public enum FileAgeFilterEnum - { - IgnoreNewer = 0, - IgnoreOlder = 1 - } + None = 0, + Move = 1, + Copy = 2, + Rename = 3, + Zip = 4, + Delete = 5, + MoveFolder = 6, + CopyFolder = 7, + DeleteFolder = 8 + } + public enum PreProcessingModeEnum + { + None = 0, + Process = 1 + } + public enum IfFileExistEnum + { + Overwrite = 0, + LeaveFiles = 1, + Delete = 2 + } + public enum IfPostProcessingFailsEnum + { + LeaveFiles = 0, + Delete = 1 + } + public enum FileScanningOptionEnum + { + FileWatcher = 0, + TimeBased = 1 + } + public enum ZipModeEnum + { + ZipByAmountOrTime = 0, + ZipByFileName = 1, + ZipBySubFolderName = 2 + } + public enum FileAgeFilterEnum + { + IgnoreNewer = 0, + IgnoreOlder = 1 } } \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs b/Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs index 55d81fd..5994ad0 100644 --- a/Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs @@ -2,13 +2,12 @@ using System; using System.Collections.Generic; -namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription -{ - public class FileConnectorParameterTypeDefinitionProvider - { - public FileConnectorParameterTypeDefinitionProvider() { } +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription; - public IEnumerable GetAllParameterTypeDefinition() { return null; } - public ParameterTypeDefinition GetParameterTypeDefinition(string name) { return null; } - } +public class FileConnectorParameterTypeDefinitionProvider +{ + public FileConnectorParameterTypeDefinitionProvider() { } + + public IEnumerable GetAllParameterTypeDefinition() => null; + public ParameterTypeDefinition GetParameterTypeDefinition(string name) => null; } \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs b/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs index c4e64f0..e32df4c 100644 --- a/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs +++ b/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs @@ -1,10 +1,9 @@ using System; -namespace Adaptation.PeerGroup.GCL.Annotations +namespace Adaptation.PeerGroup.GCL.Annotations; + +[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)] +public sealed class NotNullAttribute : Attribute { - [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = false, Inherited = true)] - public sealed class NotNullAttribute : Attribute - { - public NotNullAttribute() { } - } + public NotNullAttribute() { } } \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs index 82138e2..af1ea65 100644 --- a/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs +++ b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs @@ -1,8 +1,7 @@ -namespace Adaptation.PeerGroup.GCL.SecsDriver +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum HsmsConnectionMode { - public enum HsmsConnectionMode - { - Active = 0, - Passive = 1 - } + Active = 0, + Passive = 1 } \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs index b52c7a3..eecd8b7 100644 --- a/Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs +++ b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs @@ -1,8 +1,7 @@ -namespace Adaptation.PeerGroup.GCL.SecsDriver +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum HsmsSessionMode { - public enum HsmsSessionMode - { - MultiSession = 0, - SingleSession = 1 - } + MultiSession = 0, + SingleSession = 1 } \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs b/Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs index 81181f0..5e68d64 100644 --- a/Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs +++ b/Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs @@ -1,8 +1,7 @@ -namespace Adaptation.PeerGroup.GCL.SecsDriver +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum SecsTransportType { - public enum SecsTransportType - { - HSMS = 0, - Serial = 1 - } + HSMS = 0, + Serial = 1 } \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs b/Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs index 4511319..a5bd2c3 100644 --- a/Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs +++ b/Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs @@ -1,16 +1,15 @@ -namespace Adaptation.PeerGroup.GCL.SecsDriver +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum SerialBaudRate { - public enum SerialBaudRate - { - Baud9600 = 0, - Baud19200 = 1, - Baud4800 = 2, - Baud2400 = 3, - Baud1200 = 4, - Baud300 = 5, - Baud150 = 6, - Baud38400 = 7, - Baud57600 = 8, - Baud115200 = 9 - } + Baud9600 = 0, + Baud19200 = 1, + Baud4800 = 2, + Baud2400 = 3, + Baud1200 = 4, + Baud300 = 5, + Baud150 = 6, + Baud38400 = 7, + Baud57600 = 8, + Baud115200 = 9 } \ No newline at end of file diff --git a/Adaptation/Shared/Duplicator/Description.cs b/Adaptation/Shared/Duplicator/Description.cs index e0031fe..bae163f 100644 --- a/Adaptation/Shared/Duplicator/Description.cs +++ b/Adaptation/Shared/Duplicator/Description.cs @@ -4,145 +4,139 @@ using System.Collections.Generic; using System.Linq; using System.Text.Json; -namespace Adaptation.Shared.Duplicator +namespace Adaptation.Shared.Duplicator; + +public class Description : IDescription, Properties.IDescription { - public class Description : IDescription, 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; } //2021-10-23 + + string IDescription.GetEventDescription() => "File Has been read and parsed"; + + List IDescription.GetNames(IFileRead fileRead, Logistics logistics) { + List results = new(); + IDescription description = GetDefault(fileRead, logistics); + string json = JsonSerializer.Serialize(description, description.GetType()); + object @object = JsonSerializer.Deserialize(json); + if (@object is not JsonElement jsonElement) + throw new Exception(); + foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) + results.Add(jsonProperty.Name); + return results; + } - 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; } //2021-10-23 + List IDescription.GetDetailNames() + { + List results = new(); + return results; + } - string IDescription.GetEventDescription() + List IDescription.GetHeaderNames() + { + List results = new(); + return results; + } + + IDescription IDescription.GetDisplayNames() + { + Description result = GetDisplayNames(); + return result; + } + + List IDescription.GetParameterNames() + { + List results = new(); + 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(json); + results = ((JsonElement)@object).EnumerateObject().ToArray(); + return results; + } + + List IDescription.GetPairedParameterNames() + { + List results = new(); + return results; + } + + List IDescription.GetIgnoreParameterNames(Test test) + { + List results = new(); + return results; + } + + IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics) + { + Description result = GetDefault(fileRead, logistics); + return result; + } + + Dictionary IDescription.GetDisplayNamesJsonElement(IFileRead fileRead) + { + Dictionary results = new(); + IDescription description = GetDisplayNames(); + string json = JsonSerializer.Serialize(description, description.GetType()); + JsonElement jsonElement = JsonSerializer.Deserialize(json); + foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) { - return "File Has been read and parsed"; + 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.GetNames(IFileRead fileRead, Logistics logistics) + List IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData) + { + List results = new(); + return results; + } + + private Description GetDisplayNames() + { + Description result = new(); + return result; + } + + private Description GetDefault(IFileRead fileRead, Logistics logistics) + { + Description result = new() { - List results = new(); - IDescription description = GetDefault(fileRead, logistics); - string json = JsonSerializer.Serialize(description, description.GetType()); - object @object = JsonSerializer.Deserialize(json); - if (@object is not JsonElement jsonElement) - throw new Exception(); - foreach (JsonProperty jsonProperty in jsonElement.EnumerateObject()) - results.Add(jsonProperty.Name); - return results; - } - - List IDescription.GetDetailNames() - { - List results = new(); - return results; - } - - List IDescription.GetHeaderNames() - { - List results = new(); - return results; - } - - IDescription IDescription.GetDisplayNames() - { - Description result = GetDisplayNames(); - return result; - } - - List IDescription.GetParameterNames() - { - List results = new(); - 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(json); - results = ((JsonElement)@object).EnumerateObject().ToArray(); - return results; - } - - List IDescription.GetPairedParameterNames() - { - List results = new(); - return results; - } - - List IDescription.GetIgnoreParameterNames(Test test) - { - List results = new(); - return results; - } - - IDescription IDescription.GetDefaultDescription(IFileRead fileRead, Logistics logistics) - { - Description result = GetDefault(fileRead, logistics); - return result; - } - - Dictionary IDescription.GetDisplayNamesJsonElement(IFileRead fileRead) - { - Dictionary results = new(); - IDescription description = GetDisplayNames(); - string json = JsonSerializer.Serialize(description, description.GetType()); - JsonElement jsonElement = JsonSerializer.Deserialize(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.GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData) - { - List results = new(); - return results; - } - - private 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 = logistics.DateTimeFromSequence.ToUniversalTime().ToString("MM/dd/yyyy HH:mm:ss") - }; - return result; - } - + 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 = logistics.DateTimeFromSequence.ToUniversalTime().ToString("MM/dd/yyyy HH:mm:ss") + }; + return result; } } \ No newline at end of file diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 1615183..c30ebf5 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -1,4 +1,4 @@ -using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; using Adaptation.Shared.Methods; using log4net; @@ -12,823 +12,802 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public class FileRead : Properties.IFileRead { - public class FileRead : Properties.IFileRead + protected string _NullData; + protected readonly ILog _Log; + protected long _MinFileLength; + protected Logistics _Logistics; + protected readonly ISMTP _SMTP; + protected readonly int _Hyphens; + protected readonly bool _IsEvent; + protected string _ReportFullPath; + protected long _LastTicksDuration; + protected readonly bool _IsEAFHosted; + protected readonly string _EventName; + protected readonly string _MesEntity; + protected readonly string _TracePath; + protected readonly bool _IsDuplicator; + protected readonly Calendar _Calendar; + protected readonly bool _IsSourceTimer; + protected readonly string _VillachPath; + protected readonly string _ProgressPath; + protected readonly string _EquipmentType; + protected readonly long _BreakAfterSeconds; + protected readonly string _ExceptionSubject; + protected readonly string _CellInstanceName; + protected readonly string _EventNameFileRead; + protected readonly IDescription _Description; + protected readonly bool _UseCyclicalForDescription; + protected readonly string _CellInstanceConnectionName; + protected readonly string _CellInstanceConnectionNameBase; + protected readonly Dictionary> _DummyRuns; + protected readonly Dictionary _FileParameter; + protected readonly string _ParameterizedModelObjectDefinitionType; + protected readonly FileConnectorConfiguration _FileConnectorConfiguration; + protected readonly IList _ModelObjectParameterDefinitions; + + bool Properties.IFileRead.IsEvent => _IsEvent; + string Properties.IFileRead.NullData => _NullData; + string Properties.IFileRead.EventName => _EventName; + string Properties.IFileRead.MesEntity => _MesEntity; + bool Properties.IFileRead.IsEAFHosted => _IsEAFHosted; + string Properties.IFileRead.EquipmentType => _EquipmentType; + string Properties.IFileRead.ReportFullPath => _ReportFullPath; + string Properties.IFileRead.CellInstanceName => _CellInstanceName; + string Properties.IFileRead.ExceptionSubject => _ExceptionSubject; + bool Properties.IFileRead.UseCyclicalForDescription => _UseCyclicalForDescription; + string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName; + string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType; + + public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) { - - protected string _NullData; - protected readonly ILog _Log; - protected long _MinFileLength; - protected Logistics _Logistics; - protected readonly ISMTP _SMTP; - protected readonly int _Hyphens; - protected readonly bool _IsEvent; - protected string _ReportFullPath; - protected long _LastTicksDuration; - protected readonly bool _IsEAFHosted; - protected readonly string _EventName; - protected readonly string _MesEntity; - protected readonly string _TracePath; - protected readonly bool _IsDuplicator; - protected readonly Calendar _Calendar; - protected readonly bool _IsSourceTimer; - protected readonly string _VillachPath; - protected readonly int _HyphenIsArchive; - protected readonly string _ProgressPath; - protected readonly string _EquipmentType; - protected readonly int _HyphenIsXToArchive; - protected readonly long _BreakAfterSeconds; - protected readonly string _ExceptionSubject; - protected readonly string _CellInstanceName; - protected readonly string _EventNameFileRead; - protected readonly IDescription _Description; - protected readonly bool _UseCyclicalForDescription; - protected readonly string _CellInstanceConnectionName; - protected readonly string _CellInstanceConnectionNameBase; - protected readonly Dictionary> _DummyRuns; - protected readonly Dictionary _FileParameter; - protected readonly string _ParameterizedModelObjectDefinitionType; - protected readonly FileConnectorConfiguration _FileConnectorConfiguration; - protected readonly IList _ModelObjectParameterDefinitions; - - bool Properties.IFileRead.IsEvent => _IsEvent; - string Properties.IFileRead.NullData => _NullData; - string Properties.IFileRead.EventName => _EventName; - string Properties.IFileRead.MesEntity => _MesEntity; - bool Properties.IFileRead.IsEAFHosted => _IsEAFHosted; - string Properties.IFileRead.EquipmentType => _EquipmentType; - string Properties.IFileRead.ReportFullPath => _ReportFullPath; - string Properties.IFileRead.CellInstanceName => _CellInstanceName; - string Properties.IFileRead.ExceptionSubject => _ExceptionSubject; - bool Properties.IFileRead.UseCyclicalForDescription => _UseCyclicalForDescription; - string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName; - string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType; - - public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted, int hyphenXToArchive, int hyphenIsArchive) + _SMTP = smtp; + _IsEvent = isEvent; + _DummyRuns = dummyRuns; + _LastTicksDuration = 0; + _IsEAFHosted = isEAFHosted; + _Description = description; + _FileParameter = fileParameter; + _ReportFullPath = string.Empty; + _CellInstanceName = cellInstanceName; + _Calendar = new CultureInfo("en-US").Calendar; + _Log = LogManager.GetLogger(typeof(FileRead)); + _UseCyclicalForDescription = useCyclicalForDescription; + _CellInstanceConnectionName = cellInstanceConnectionName; + _ModelObjectParameterDefinitions = modelObjectParameters; + _FileConnectorConfiguration = fileConnectorConfiguration; + _ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType; + _IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt"); + string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty); + _Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length; + _ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking); + string suffix; + string[] segments = _ParameterizedModelObjectDefinitionType.Split('.'); + string @namespace = segments[0]; + string eventNameFileRead = "FileRead"; + string eventName = segments[segments.Length - 1]; + bool isDuplicator = segments[0] == cellInstanceName; + _IsDuplicator = isDuplicator; + _CellInstanceConnectionNameBase = cellInstanceConnectionNameBase; + if (eventName == eventNameFileRead) + suffix = string.Empty; + else + suffix = string.Concat('_', eventName.Split(new string[] { eventNameFileRead }, StringSplitOptions.RemoveEmptyEntries)[1]); + string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix); + if (!isEAFHosted) { - _SMTP = smtp; - _IsEvent = isEvent; - _DummyRuns = dummyRuns; - _LastTicksDuration = 0; - _IsEAFHosted = isEAFHosted; - _Description = description; - _FileParameter = fileParameter; - _ReportFullPath = string.Empty; - _HyphenIsArchive = hyphenIsArchive; - _CellInstanceName = cellInstanceName; - _HyphenIsXToArchive = hyphenXToArchive; - _Calendar = new CultureInfo("en-US").Calendar; - _Log = LogManager.GetLogger(typeof(FileRead)); - _UseCyclicalForDescription = useCyclicalForDescription; - _CellInstanceConnectionName = cellInstanceConnectionName; - _ModelObjectParameterDefinitions = modelObjectParameters; - _FileConnectorConfiguration = fileConnectorConfiguration; - _ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType; - _IsSourceTimer = (fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt")); - string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty); - _Hyphens = (cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length); - _ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking); - string suffix; - string[] segments = _ParameterizedModelObjectDefinitionType.Split('.'); - string @namespace = segments[0]; - string eventNameFileRead = "FileRead"; - string eventName = segments[segments.Length - 1]; - bool isDuplicator = segments[0] == cellInstanceName; - _IsDuplicator = isDuplicator; - _CellInstanceConnectionNameBase = cellInstanceConnectionNameBase; - if (eventName == eventNameFileRead) - suffix = string.Empty; - else - suffix = string.Concat('_', eventName.Split(new string[] { eventNameFileRead }, StringSplitOptions.RemoveEmptyEntries)[1]); - string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix); - if (!isEAFHosted) - { - if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended) - throw new Exception(cellInstanceConnectionName); - if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) - throw new Exception(cellInstanceConnectionName); - if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) - throw new Exception(cellInstanceConnectionName); - // if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) - // throw new Exception(cellInstanceConnectionName); - // if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) - // throw new Exception(cellInstanceConnectionName); - } - ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path."); - if (paths.Length < 4) + if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended) throw new Exception(cellInstanceConnectionName); - if (isDuplicator) - _MesEntity = string.Empty; - else - _MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias")); - _TracePath = (from l in paths where l.Name.EndsWith("Trace") select l.Value).FirstOrDefault(); - _VillachPath = (from l in paths where l.Name.EndsWith("Villach") select l.Value).FirstOrDefault(); - _ProgressPath = (from l in paths where l.Name.EndsWith("Progress") select l.Value).FirstOrDefault(); - _EventName = eventName; - _EventNameFileRead = eventNameFileRead; - _EquipmentType = parameterizedModelObjectDefinitionTypeAppended; - long breakAfterSeconds; - if (_FileConnectorConfiguration is null) + if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) + throw new Exception(cellInstanceConnectionName); + if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) + throw new Exception(cellInstanceConnectionName); + // if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) + // throw new Exception(cellInstanceConnectionName); + // if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) + // throw new Exception(cellInstanceConnectionName); + } + ModelObjectParameterDefinition[] paths = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Path."); + if (paths.Length < 4) + throw new Exception(cellInstanceConnectionName); + if (isDuplicator) + _MesEntity = string.Empty; + else + _MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias")); + _TracePath = (from l in paths where l.Name.EndsWith("Trace") select l.Value).FirstOrDefault(); + _VillachPath = (from l in paths where l.Name.EndsWith("Villach") select l.Value).FirstOrDefault(); + _ProgressPath = (from l in paths where l.Name.EndsWith("Progress") select l.Value).FirstOrDefault(); + _EventName = eventName; + _EventNameFileRead = eventNameFileRead; + _EquipmentType = parameterizedModelObjectDefinitionTypeAppended; + long breakAfterSeconds; + if (_FileConnectorConfiguration is null) + breakAfterSeconds = 360; + else + { + if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased) breakAfterSeconds = 360; else + breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value); + } + _BreakAfterSeconds = breakAfterSeconds; + UpdateLastTicksDuration(breakAfterSeconds * 10000000); + if (_IsDuplicator) + { + if (string.IsNullOrEmpty(_FileConnectorConfiguration.TargetFileLocation) || string.IsNullOrEmpty(_FileConnectorConfiguration.ErrorTargetFileLocation)) + throw new Exception("_Configuration is empty?"); + if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%')) + throw new Exception("_Configuration is incorrect for a duplicator!"); + if (_FileConnectorConfiguration is not null) { - if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased) - breakAfterSeconds = 360; - else - breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value); - } - _BreakAfterSeconds = breakAfterSeconds; - UpdateLastTicksDuration(breakAfterSeconds * 10000000); - if (_IsDuplicator) - { - if (string.IsNullOrEmpty(_FileConnectorConfiguration.TargetFileLocation) || string.IsNullOrEmpty(_FileConnectorConfiguration.ErrorTargetFileLocation)) - throw new Exception("_Configuration is empty?"); - if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%')) - throw new Exception("_Configuration is incorrect for a duplicator!"); - if (!(_FileConnectorConfiguration is null)) - { - if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking)) - throw new Exception("SourceDirectoryCloaking is empty?"); - if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~")) - throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!"); - } + if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking)) + throw new Exception("SourceDirectoryCloaking is empty?"); + if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~")) + throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!"); } } + } - protected string GetPropertyValue(string cellInstanceConnectionName, IList modelObjectParameters, string propertyName) - { - string result; - List results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList(); - if (results.Count != 1) - throw new Exception(cellInstanceConnectionName); - result = results[0]; - return result; - } + protected static string GetPropertyValue(string cellInstanceConnectionName, IList modelObjectParameters, string propertyName) + { + string result; + List results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList(); + if (results.Count != 1) + throw new Exception(cellInstanceConnectionName); + result = results[0]; + return result; + } - protected ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList modelObjectParameters, string propertyNamePrefix) - { - ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray(); - if (!results.Any()) - throw new Exception(cellInstanceConnectionName); - return results; - } + protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList modelObjectParameters, string propertyNamePrefix) + { + ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray(); + if (!results.Any()) + throw new Exception(cellInstanceConnectionName); + return results; + } - protected ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix) - { - ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray(); - if (!results.Any()) - throw new Exception(cellInstanceConnectionName); - return results; - } + protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix) + { + ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray(); + if (!results.Any()) + throw new Exception(cellInstanceConnectionName); + return results; + } - protected void UpdateLastTicksDuration(long ticksDuration) - { - if (ticksDuration < 50000000) - ticksDuration = 50000000; - _LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667); - } + protected void UpdateLastTicksDuration(long ticksDuration) + { + if (ticksDuration < 50000000) + ticksDuration = 50000000; + _LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667); + } - protected void WaitForThread(Thread thread, List threadExceptions) + protected void WaitForThread(Thread thread, List threadExceptions) + { + if (thread is not null) { - if (!(thread is null)) - { - ThreadState threadState; - for (short i = 0; i < short.MaxValue; i++) - { - if (thread is null) - break; - else - { - threadState = thread.ThreadState; - if (threadState != ThreadState.Running && threadState != ThreadState.WaitSleepJoin) - break; - } - Thread.Sleep(500); - } - lock (threadExceptions) - { - if (threadExceptions.Any()) - { - foreach (Exception item in threadExceptions) - _Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace)); - Exception exception = threadExceptions[0]; - threadExceptions.Clear(); - throw exception; - } - } - } - } - - protected void CreateProgressDirectory(string progressPath, Logistics logistics, int? duplicator, string[] exceptionLines) - { - string progressDirectory; - StringBuilder stringBuilder = new(); - if (duplicator is null || duplicator.Value == 0) - progressDirectory = string.Concat(progressPath, @"\EquipmentIntegration"); - else - { - stringBuilder.Clear(); - for (int i = 0; i < duplicator.Value; i++) - { - if (i > 0 && (i % 2) == 0) - stringBuilder.Append(' '); - stringBuilder.Append('-'); - } - progressDirectory = string.Concat(progressPath, @"\", (duplicator.Value + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim(); - } - DateTime dateTime = DateTime.Now; - string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); - progressDirectory = string.Concat(progressDirectory, @"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", logistics.MID, "_", logistics.Sequence, "_", DateTime.Now.Ticks - logistics.Sequence); - if (!Directory.Exists(progressDirectory)) - Directory.CreateDirectory(progressDirectory); - if (!(exceptionLines is null)) - { - string fileName = string.Concat(progressDirectory, @"\readme.txt"); - try - { File.WriteAllLines(fileName, exceptionLines); } - catch (Exception) { } - } - } - - protected string[] Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception) - { - string[] results; - bool isErrorFile = !(exception is null); - if (!to.EndsWith(@"\")) - string.Concat(to, @"\"); - if (!isErrorFile) - results = new string[] { }; - else - { - results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace }; - Shared0449(to, results); - } - if (!(extractResults is null) && !(extractResults.Item4 is null) && extractResults.Item4.Any()) - { - string itemFile; - List directories = new(); - foreach (FileInfo sourceFile in extractResults.Item4) - { - if (sourceFile.FullName != _Logistics.ReportFullPath) - { - itemFile = sourceFile.FullName.Replace(from, to); - Shared1880(itemFile, directories, sourceFile, isErrorFile); - } - else if (!isErrorFile && !(_Logistics is null)) - Shared1811(to, sourceFile); - } - Shared0231(directories); - } - return results; - } - - protected IEnumerable GetDirectoriesRecursively(string path, string directoryNameSegment = null) - { - Queue queue = new(); - queue.Enqueue(path); - while (queue.Count > 0) - { - path = queue.Dequeue(); - foreach (string subDirectory in Directory.GetDirectories(path)) - { - queue.Enqueue(subDirectory); - if (string.IsNullOrEmpty(directoryNameSegment) || Path.GetFileName(subDirectory).Contains(directoryNameSegment)) - yield return subDirectory; - } - } - } - - protected string GetProcessedDirectory(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory) - { - string result = duplicateDirectory; - string logisticsSequence = logistics.Sequence.ToString(); - string[] matchDirectories; - if (!_IsEAFHosted) - matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(logistics.ReportFullPath)) }; - else - matchDirectories = new string[] { GetDirectoriesRecursively(Path.GetDirectoryName(progressPath), logisticsSequence).FirstOrDefault() }; - if (matchDirectories.Length == 0 || string.IsNullOrEmpty(matchDirectories[0])) - matchDirectories = Directory.GetDirectories(duplicateDirectory, string.Concat('*', logisticsSequence, '*'), SearchOption.AllDirectories); - if ((matchDirectories is null) || matchDirectories.Length != 1) - throw new Exception("Didn't find directory by logistics sequence"); - if (!matchDirectories[0].Contains("_processed")) - { - result = string.Concat(matchDirectories[0].Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), dateTime.Ticks - logistics.Sequence, "_processed"); - Directory.Move(matchDirectories[0], result); - result = string.Concat(result, @"\", logistics.Sequence); - if (!Directory.Exists(result)) - Directory.CreateDirectory(result); - } - return result; - } - - protected string WriteScopeInfo(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory, List> tuples) - { - string result = GetProcessedDirectory(progressPath, logistics, dateTime, duplicateDirectory); - string tupleFile; - string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); - string duplicateFile = string.Concat(result, @"\", fileName, ".pdsf"); - foreach (Tuple tuple in tuples) - { - if (tuple.Item1.FileName.StartsWith(@"\")) - tupleFile = tuple.Item1.FileName; - else - tupleFile = string.Concat(result, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); - File.WriteAllText(tupleFile, tuple.Item2); - } - File.Copy(logistics.ReportFullPath, duplicateFile, overwrite: true); - return result; - } - - protected string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory) - { - string result; - string rds; - string dateValue; - string datePlaceholder; - string[] segments = logistics.MID.Split('-'); - if (segments.Length < 2) - rds = "%RDS%"; - else - rds = segments[1]; - segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); - if (segments.Length == 0) - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace("%RDS%", rds)); - else - { - datePlaceholder = "%DateTime%"; - segments = segments[1].Split('%'); - dateValue = logistics.DateTimeFromSequence.ToString(segments[0]); - foreach (string segment in scopeInfo.FileName.Split('%')) - { - if (!segment.Contains(segments[0])) - continue; - datePlaceholder = string.Concat('%', segment, '%'); - } - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace("%RDS%", rds).Replace(datePlaceholder, dateValue)); - } - if (result.Contains('%')) - throw new Exception("Placeholder exists!"); - return result; - } - - protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List> tuples) - { - bool check; - long preWait; - string tupleFile; - List consumedFileIndices = new(); - List duplicateFiles = new(); - bool moreThanAnHour = (_BreakAfterSeconds > 3600); - StringBuilder stringBuilder = new(); - long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; - if (moreThanAnHour) - preWait = dateTime.AddSeconds(30).Ticks; - else - preWait = dateTime.AddTicks(_LastTicksDuration).Ticks; - if (!tuples.Any()) - duplicateFiles.Add(duplicateFile); - string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); - string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath)); - foreach (Tuple tuple in tuples) - { - if (tuple.Item1.FileName.StartsWith(@"\")) - tupleFile = tuple.Item1.FileName; - else if (!tuple.Item1.FileName.Contains('%')) - tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); - else - tupleFile = GetTupleFile(logistics, tuple.Item1, duplicateDirectory); - duplicateFiles.Add(tupleFile); - File.WriteAllText(tupleFile, tuple.Item2); - } + ThreadState threadState; for (short i = 0; i < short.MaxValue; i++) { - if (DateTime.Now.Ticks > preWait) + if (thread is null) break; + else + { + threadState = thread.ThreadState; + if (threadState is not ThreadState.Running and not ThreadState.WaitSleepJoin) + break; + } Thread.Sleep(500); } - if (!moreThanAnHour) + lock (threadExceptions) { - for (short z = 0; z < short.MaxValue; z++) + if (threadExceptions.Any()) { - try - { - check = (string.IsNullOrEmpty(successDirectory) || File.Exists(successFile)); - if (check) - { - consumedFileIndices.Clear(); - for (int i = 0; i < duplicateFiles.Count; i++) - { - if (!File.Exists(duplicateFiles[i])) - consumedFileIndices.Add(i); - } - if (consumedFileIndices.Count == duplicateFiles.Count) - break; - } - } - catch (Exception) { } - if (DateTime.Now.Ticks > breakAfter) - { - for (int i = 0; i < duplicateFiles.Count; i++) - { - if (File.Exists(duplicateFiles[i])) - { - try - { File.Delete(duplicateFiles[i]); } - catch (Exception) { } - stringBuilder.Append("<").Append(duplicateFiles[i]).Append("> "); - } - } - throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder)); - } - Thread.Sleep(500); + foreach (Exception item in threadExceptions) + _Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace)); + Exception exception = threadExceptions[0]; + threadExceptions.Clear(); + throw exception; } } } + } - protected void SetFileParameter(string key, string value) + protected void CreateProgressDirectory(string[] exceptionLines) + { + string progressDirectory; + StringBuilder stringBuilder = new(); + if (_Hyphens == 0) + progressDirectory = Path.Combine(_ProgressPath, _CellInstanceConnectionName); + else { - if (_FileConnectorConfiguration is null || _FileConnectorConfiguration.TargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.TargetFileName.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileName.Contains(string.Concat("%", key, "%"))) + _ = stringBuilder.Clear(); + for (int i = 0; i < _Hyphens; i++) { - if (_FileParameter.ContainsKey(key)) - _FileParameter[key] = value; - else - _FileParameter.Add(key, value); + if (i > 0 && (i % 2) == 0) + _ = stringBuilder.Append(' '); + _ = stringBuilder.Append('-'); + } + progressDirectory = string.Concat(_ProgressPath, @"\", (_Hyphens + 1).ToString().PadLeft(2, '0'), " ", stringBuilder).Trim(); + } + DateTime dateTime = DateTime.Now; + string weekOfYear = _Calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + progressDirectory = string.Concat(progressDirectory, @"\", dateTime.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence); + if (!Directory.Exists(progressDirectory)) + _ = Directory.CreateDirectory(progressDirectory); + if (exceptionLines is not null) + { + string fileName = string.Concat(progressDirectory, @"\readme.txt"); + try + { File.WriteAllLines(fileName, exceptionLines); } + catch (Exception) { } + } + } + + protected string[] Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception) + { + string[] results; + bool isErrorFile = exception is not null; + if (!to.EndsWith(@"\")) + _ = string.Concat(to, @"\"); + if (!isErrorFile) + results = Array.Empty(); + else + { + results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace }; + Shared0449(to, results); + } + if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any()) + { + string itemFile; + List directories = new(); + foreach (FileInfo sourceFile in extractResults.Item4) + { + if (sourceFile.FullName != _Logistics.ReportFullPath) + { + itemFile = sourceFile.FullName.Replace(from, to); + Shared1880(itemFile, directories, sourceFile, isErrorFile); + } + else if (!isErrorFile && _Logistics is not null) + Shared1811(to, sourceFile); + } + Shared0231(directories); + } + return results; + } + + protected static IEnumerable GetDirectoriesRecursively(string path, string directoryNameSegment = null) + { + Queue queue = new(); + queue.Enqueue(path); + while (queue.Count > 0) + { + path = queue.Dequeue(); + foreach (string subDirectory in Directory.GetDirectories(path)) + { + queue.Enqueue(subDirectory); + if (string.IsNullOrEmpty(directoryNameSegment) || Path.GetFileName(subDirectory).Contains(directoryNameSegment)) + yield return subDirectory; } } + } - protected void SetFileParameterLotIDToLogisticsMID(bool includeLogisticsSequence = true) + protected string GetProcessedDirectory(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory) + { + string result = duplicateDirectory; + string logisticsSequence = logistics.Sequence.ToString(); + string[] matchDirectories; + if (!_IsEAFHosted) + matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(logistics.ReportFullPath)) }; + else + matchDirectories = new string[] { GetDirectoriesRecursively(Path.GetDirectoryName(progressPath), logisticsSequence).FirstOrDefault() }; + if (matchDirectories.Length == 0 || string.IsNullOrEmpty(matchDirectories[0])) + matchDirectories = Directory.GetDirectories(duplicateDirectory, string.Concat('*', logisticsSequence, '*'), SearchOption.AllDirectories); + if ((matchDirectories is null) || matchDirectories.Length != 1) + throw new Exception("Didn't find directory by logistics sequence"); + if (!matchDirectories[0].Contains("_processed")) { - string key; - if (!includeLogisticsSequence) - key = "LotID"; - else - key = "LotIDWithLogisticsSequence"; - string value = string.Concat(_Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence); - SetFileParameter(key, value); + result = string.Concat(matchDirectories[0].Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), dateTime.Ticks - logistics.Sequence, "_processed"); + Directory.Move(matchDirectories[0], result); + result = string.Concat(result, @"\", logistics.Sequence); + if (!Directory.Exists(result)) + _ = Directory.CreateDirectory(result); } + return result; + } - protected void SetFileParameterLotID(string value, bool includeLogisticsSequence = true) + protected string WriteScopeInfo(string progressPath, Logistics logistics, DateTime dateTime, string duplicateDirectory, List> tuples) + { + string result = GetProcessedDirectory(progressPath, logistics, dateTime, duplicateDirectory); + string tupleFile; + string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); + string duplicateFile = string.Concat(result, @"\", fileName, ".pdsf"); + foreach (Tuple tuple in tuples) { - string key; - if (!includeLogisticsSequence) - key = "LotID"; + if (tuple.Item1.FileName.StartsWith(@"\")) + tupleFile = tuple.Item1.FileName; else + tupleFile = string.Concat(result, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); + File.WriteAllText(tupleFile, tuple.Item2); + } + File.Copy(logistics.ReportFullPath, duplicateFile, overwrite: true); + return result; + } + + protected static string GetTupleFile(Logistics logistics, Properties.IScopeInfo scopeInfo, string duplicateDirectory) + { + string result; + string rds; + string dateValue; + string datePlaceholder; + string[] segments = logistics.MID.Split('-'); + if (segments.Length < 2) + rds = "%RDS%"; + else + rds = segments[1]; + segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); + if (segments.Length == 0) + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace("%RDS%", rds)); + else + { + datePlaceholder = "%DateTime%"; + segments = segments[1].Split('%'); + dateValue = logistics.DateTimeFromSequence.ToString(segments[0]); + foreach (string segment in scopeInfo.FileName.Split('%')) { - key = "LotIDWithLogisticsSequence"; - value = string.Concat(value, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence); + if (!segment.Contains(segments[0])) + continue; + datePlaceholder = string.Concat('%', segment, '%'); } - SetFileParameter(key, value); + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace("%RDS%", rds).Replace(datePlaceholder, dateValue)); } + if (result.Contains('%')) + throw new Exception("Placeholder exists!"); + return result; + } - protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements) + protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, string successDirectory, string duplicateDirectory, string duplicateFile, List> tuples) + { + bool check; + long preWait; + string tupleFile; + List consumedFileIndices = new(); + List duplicateFiles = new(); + bool moreThanAnHour = (_BreakAfterSeconds > 3600); + StringBuilder stringBuilder = new(); + long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; + if (moreThanAnHour) + preWait = dateTime.AddSeconds(30).Ticks; + else + preWait = dateTime.AddTicks(_LastTicksDuration).Ticks; + if (!tuples.Any()) + duplicateFiles.Add(duplicateFile); + string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); + string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath)); + foreach (Tuple tuple in tuples) { - string directory; - if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType) - directory = Path.Combine(_VillachPath, _EquipmentType, "Target"); + if (tuple.Item1.FileName.StartsWith(@"\")) + tupleFile = tuple.Item1.FileName; + else if (!tuple.Item1.FileName.Contains('%')) + tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); else - directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName); - if (!Directory.Exists(directory)) - Directory.CreateDirectory(directory); - string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf")); - string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty); - File.WriteAllText(file, lines); - if (_Logistics.TotalSecondsSinceLastWriteTimeFromSequence > 600) + tupleFile = GetTupleFile(logistics, tuple.Item1, duplicateDirectory); + duplicateFiles.Add(tupleFile); + File.WriteAllText(tupleFile, tuple.Item2); + } + for (short i = 0; i < short.MaxValue; i++) + { + if (DateTime.Now.Ticks > preWait) + break; + Thread.Sleep(500); + } + if (!moreThanAnHour) + { + for (short z = 0; z < short.MaxValue; z++) { try - { File.SetLastWriteTime(file, _Logistics.DateTimeFromSequence); } - catch (Exception) { } - } - } - - protected void Move(IFileRead fileRead, Tuple> extractResults, Exception exception) - { - bool isErrorFile = !(exception is null); - if (!isErrorFile && _IsDuplicator) - { - if (_Hyphens == _HyphenIsXToArchive) - Shared0192(); - else if (_IsEAFHosted && _Hyphens == _HyphenIsArchive) - fileRead.MoveArchive(); - if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath)) - CreateProgressDirectory(_ProgressPath, _Logistics, _Hyphens, exceptionLines: null); - } - if (!_IsEAFHosted) - { - string to; - if (!_FileConnectorConfiguration.TargetFileLocation.EndsWith(Path.DirectorySeparatorChar.ToString())) - to = _FileConnectorConfiguration.TargetFileLocation; - else - to = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation); - foreach (KeyValuePair keyValuePair in _FileParameter) - to = to.Replace(string.Concat('%', keyValuePair.Key, '%'), keyValuePair.Value); - if (to.Contains("%")) - _Log.Debug("Can't debug without EAF Hosting"); - else - Move(extractResults, to, _FileConnectorConfiguration.SourceFileLocation, resolvedFileLocation: string.Empty, exception: null); - } - } - - protected void TriggerEvents(Tuple> extractResults, List headerNames, Dictionary keyValuePairs) - { - object value; - string description; - List list; - for (int i = 0; i < extractResults.Item3.Length; i++) - { - _Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length)); - foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject()) { - if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name)) - description = string.Empty; - else - description = keyValuePairs[jsonProperty.Name].Split('|')[0]; - if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name)) - value = jsonProperty.Value.ToString(); - else + check = (string.IsNullOrEmpty(successDirectory) || File.Exists(successFile)); + if (check) { - list = new List(); - for (int z = 0; z < extractResults.Item3.Length; z++) - list.Add(new object[] { z, extractResults.Item3[z].GetProperty(jsonProperty.Name).ToString() }); - value = list; + consumedFileIndices.Clear(); + for (int i = 0; i < duplicateFiles.Count; i++) + { + if (!File.Exists(duplicateFiles[i])) + consumedFileIndices.Add(i); + } + if (consumedFileIndices.Count == duplicateFiles.Count) + break; } } - if (_UseCyclicalForDescription) - break; + catch (Exception) { } + if (DateTime.Now.Ticks > breakAfter) + { + for (int i = 0; i < duplicateFiles.Count; i++) + { + if (File.Exists(duplicateFiles[i])) + { + try + { File.Delete(duplicateFiles[i]); } + catch (Exception) { } + _ = stringBuilder.Append('<').Append(duplicateFiles[i]).Append("> "); + } + } + throw new Exception(string.Concat("After {", _BreakAfterSeconds, "} seconds, right side of {", sourceDirectoryCloaking, "} didn't consume file(s) ", stringBuilder)); + } + Thread.Sleep(500); } } + } - protected Tuple> ReExtract(IFileRead fileRead, List headerNames, Dictionary keyValuePairs) + protected void SetFileParameter(string key, string value) + { + if (_FileConnectorConfiguration is null || _FileConnectorConfiguration.TargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.TargetFileName.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileName.Contains(string.Concat("%", key, "%"))) { - Tuple> results; - if (!Directory.Exists(_FileConnectorConfiguration.SourceFileLocation)) + if (_FileParameter.ContainsKey(key)) + _FileParameter[key] = value; + else + _FileParameter.Add(key, value); + } + } + + protected void SetFileParameterLotIDToLogisticsMID(bool includeLogisticsSequence = true) + { + string key; + if (!includeLogisticsSequence) + key = "LotID"; + else + key = "LotIDWithLogisticsSequence"; + string value = string.Concat(_Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence); + SetFileParameter(key, value); + } + + protected void SetFileParameterLotID(string value, bool includeLogisticsSequence = true) + { + string key; + if (!includeLogisticsSequence) + key = "LotID"; + else + { + key = "LotIDWithLogisticsSequence"; + value = string.Concat(value, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence); + } + SetFileParameter(key, value); + } + + protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements) + { + string directory; + if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType) + directory = Path.Combine(_VillachPath, _EquipmentType, "Target"); + else + directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf")); + string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty); + File.WriteAllText(file, lines); + if (_Logistics.TotalSecondsSinceLastWriteTimeFromSequence > 600) + { + try + { File.SetLastWriteTime(file, _Logistics.DateTimeFromSequence); } + catch (Exception) { } + } + } + + protected void Move(Tuple> extractResults, Exception exception) + { + bool isErrorFile = exception is not null; + if (!isErrorFile && _IsDuplicator) + { + if (_IsEAFHosted && !string.IsNullOrEmpty(_ProgressPath)) + CreateProgressDirectory(exceptionLines: null); + } + if (!_IsEAFHosted) + { + string to; + if (!_FileConnectorConfiguration.TargetFileLocation.EndsWith(Path.DirectorySeparatorChar.ToString())) + to = _FileConnectorConfiguration.TargetFileLocation; + else + to = Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation); + foreach (KeyValuePair keyValuePair in _FileParameter) + to = to.Replace(string.Concat('%', keyValuePair.Key, '%'), keyValuePair.Value); + if (to.Contains('%')) + _Log.Debug("Can't debug without EAF Hosting"); + else + _ = Move(extractResults, to, _FileConnectorConfiguration.SourceFileLocation, resolvedFileLocation: string.Empty, exception: null); + } + } + + protected void TriggerEvents(Tuple> extractResults, List headerNames, Dictionary keyValuePairs) + { + object value; + string description; + List list; + for (int i = 0; i < extractResults.Item3.Length; i++) + { + _Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length)); + foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject()) + { + if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name)) + description = string.Empty; + else + description = keyValuePairs[jsonProperty.Name].Split('|')[0]; + if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name)) + value = jsonProperty.Value.ToString(); + else + { + list = new List(); + for (int z = 0; z < extractResults.Item3.Length; z++) + list.Add(new object[] { z, extractResults.Item3[z].GetProperty(jsonProperty.Name).ToString() }); + value = list; + } + } + if (_UseCyclicalForDescription) + break; + } + } + + protected Tuple> ReExtract(IFileRead fileRead, List headerNames, Dictionary keyValuePairs) + { + Tuple> results; + if (!Directory.Exists(_FileConnectorConfiguration.SourceFileLocation)) + results = null; + else + { + string[] segments; + string[] matches = null; + foreach (string subSourceFileFilter in _FileConnectorConfiguration.SourceFileFilters) + { + segments = subSourceFileFilter.Split('\\'); + if (_FileConnectorConfiguration.IncludeSubDirectories.Value) + matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories); + else + matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly); + if (matches.Any()) + break; + } + if (matches is null || !matches.Any()) results = null; else { - string[] segments; - string[] matches = null; - foreach (string subSourceFileFilter in _FileConnectorConfiguration.SourceFileFilters) - { - segments = subSourceFileFilter.Split('\\'); - if (_FileConnectorConfiguration.IncludeSubDirectories.Value) - matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories); - else - matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly); - if (matches.Any()) - break; - } - if (matches is null || !matches.Any()) - results = null; - else - { - _ReportFullPath = matches[0]; - results = fileRead.GetExtractResult(_ReportFullPath, _EventName); - if (!_IsEAFHosted) - TriggerEvents(results, headerNames, keyValuePairs); - } + _ReportFullPath = matches[0]; + results = fileRead.GetExtractResult(_ReportFullPath, _EventName); + if (!_IsEAFHosted) + TriggerEvents(results, headerNames, keyValuePairs); } - return results; } + return results; + } - protected Dictionary> GetKeyValuePairs(List descriptions) + protected static Dictionary> GetKeyValuePairs(List descriptions) + { + Dictionary> results = new(); + Test testKey; + for (int i = 0; i < descriptions.Count; i++) { - Dictionary> results = new(); - Test testKey; - for (int i = 0; i < descriptions.Count; i++) + testKey = (Test)descriptions[i].Test; + if (!results.ContainsKey(testKey)) + results.Add(testKey, new List()); + results[testKey].Add(descriptions[i]); + } + return results; + } + + protected static List GetDuplicatorDescriptions(JsonElement[] jsonElements) + { + List results = new(); + Duplicator.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(jsonElement.ToString(), jsonSerializerOptions); + results.Add(description); + } + return results; + } + + protected static Tuple>> GetTuple(IFileRead fileRead, IEnumerable descriptions, bool extra = false) + { + Tuple>> result; + Dictionary> keyValuePairs = GetKeyValuePairs(descriptions.ToList()); + Test[] tests = (from l in keyValuePairs select l.Key).ToArray(); + fileRead.CheckTests(tests, extra); + result = new Tuple>>(tests, keyValuePairs); + return result; + } + + protected void Shared0449(string to, string[] exceptionLines) + { + if (_IsDuplicator) + CreateProgressDirectory(exceptionLines: null); + else + { + string fileName = string.Concat(to, @"\readme.txt"); + try { - testKey = (Test)descriptions[i].Test; - if (!results.ContainsKey(testKey)) - results.Add(testKey, new List()); - results[testKey].Add(descriptions[i]); + if (!Directory.Exists(to)) + _ = Directory.CreateDirectory(to); + File.WriteAllLines(fileName, exceptionLines); } - return results; + catch (Exception ex) { _Log.Error(ex.Message); } } + } - protected List GetDuplicatorDescriptions(JsonElement[] jsonElements) + protected void Shared1880(string itemFile, List directories, FileInfo sourceFile, bool isErrorFile) + { + string itemDirectory; + directories.Add(Path.GetDirectoryName(sourceFile.FullName)); + itemDirectory = Path.GetDirectoryName(itemFile); + FileConnectorConfiguration.PostProcessingModeEnum processingModeEnum; + if (!isErrorFile) + processingModeEnum = _FileConnectorConfiguration.PostProcessingMode.Value; + else + processingModeEnum = _FileConnectorConfiguration.ErrorPostProcessingMode.Value; + if (processingModeEnum != FileConnectorConfiguration.PostProcessingModeEnum.Delete && !Directory.Exists(itemDirectory)) { - List results = new(); - Duplicator.Description description; - JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; - foreach (JsonElement jsonElement in jsonElements) + _ = Directory.CreateDirectory(itemDirectory); + FileInfo fileInfo = new(_Logistics.ReportFullPath); + Directory.SetCreationTime(itemDirectory, fileInfo.LastWriteTime); + } + if (_IsEAFHosted) + { + switch (processingModeEnum) { - if (jsonElement.ValueKind != JsonValueKind.Object) + case FileConnectorConfiguration.PostProcessingModeEnum.Move: + File.Move(sourceFile.FullName, itemFile); + break; + case FileConnectorConfiguration.PostProcessingModeEnum.Copy: + File.Copy(sourceFile.FullName, itemFile); + break; + case FileConnectorConfiguration.PostProcessingModeEnum.Delete: + File.Delete(sourceFile.FullName); + break; + default: throw new Exception(); - description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); - results.Add(description); } - return results; } + } - protected Tuple>> GetTuple(IFileRead fileRead, IEnumerable descriptions, bool extra = false) + protected void Shared1811(string to, FileInfo sourceFile) + { + if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength) { - Tuple>> result; - Dictionary> keyValuePairs = GetKeyValuePairs(descriptions.ToList()); - Test[] tests = (from l in keyValuePairs select l.Key).ToArray(); - fileRead.CheckTests(tests, extra); - result = new Tuple>>(tests, keyValuePairs); - return result; - } - - protected void Shared0449(string to, string[] exceptionLines) - { - if (_IsDuplicator) - CreateProgressDirectory(_ProgressPath, _Logistics, _Hyphens, exceptionLines); - else + string directoryName = Path.GetFileName(to); + string jobIdDirectory = Path.GetDirectoryName(to); + DateTime dateTime = DateTime.Now.AddMinutes(-15); + string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd")); + string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName); + if (!Directory.Exists(destinationDirectory)) + _ = Directory.CreateDirectory(destinationDirectory); + File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name)); + try { - string fileName = string.Concat(to, @"\readme.txt"); - try + string[] checkDirectories = Directory.GetDirectories(jobIdDirectory, "*", SearchOption.TopDirectoryOnly); + foreach (string checkDirectory in checkDirectories) { - if (!Directory.Exists(to)) - Directory.CreateDirectory(to); - File.WriteAllLines(fileName, exceptionLines); + if (!checkDirectory.Contains('_')) + continue; + if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) + continue; + if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) + continue; + if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any()) + continue; + if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any()) + continue; + if (new DirectoryInfo(checkDirectory).CreationTime > dateTime) + continue; + Directory.Delete(checkDirectory, recursive: false); } - catch (Exception ex) { _Log.Error(ex.Message); } + } + catch (Exception) { throw; } + } + } + + protected void Shared0231(List directories) + { + if (_FileConnectorConfiguration.PostProcessingMode != FileConnectorConfiguration.PostProcessingModeEnum.Copy) + { + foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct()) + { + if (Directory.Exists(directory) && !Directory.GetFiles(directory).Any()) + Directory.Delete(directory); } } + } - protected void Shared1880(string itemFile, List directories, FileInfo sourceFile, bool isErrorFile) + protected void Shared0413(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List> tuples, string duplicateFile) + { + if (!isDummyRun && _IsEAFHosted) + WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples); + else { - string itemDirectory; - directories.Add(Path.GetDirectoryName(sourceFile.FullName)); - itemDirectory = Path.GetDirectoryName(itemFile); - FileConnectorConfiguration.PostProcessingModeEnum processingModeEnum; - if (!isErrorFile) - processingModeEnum = _FileConnectorConfiguration.PostProcessingMode.Value; - else - processingModeEnum = _FileConnectorConfiguration.ErrorPostProcessingMode.Value; - if (processingModeEnum != FileConnectorConfiguration.PostProcessingModeEnum.Delete && !Directory.Exists(itemDirectory)) + long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks; + for (short i = 0; i < short.MaxValue; i++) { - Directory.CreateDirectory(itemDirectory); - FileInfo fileInfo = new(_Logistics.ReportFullPath); - Directory.SetCreationTime(itemDirectory, fileInfo.LastWriteTime); + if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter) + break; + Thread.Sleep(500); } + } + } + + protected static void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory) + { + if (destinationDirectory == duplicateDirectory) + throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)"); + if (destinationDirectory.EndsWith(logisticsSequence)) + destinationDirectory = Path.GetDirectoryName(destinationDirectory); + string[] deleteFiles = Directory.GetFiles(destinationDirectory, "*", SearchOption.AllDirectories); + if (deleteFiles.Length > 250) + throw new Exception("Safety net!"); + foreach (string file in deleteFiles) + File.Delete(file); + Directory.Delete(destinationDirectory, recursive: true); + File.Delete(reportFullPath); + } + + protected string[] Shared1567(string reportFullPath, List> tuples) + { + string[] results; + string historicalText; + string logisticsSequence = _Logistics.Sequence.ToString(); + string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID); + if (!Directory.Exists(jobIdDirectory)) + _ = Directory.CreateDirectory(jobIdDirectory); + string[] matchDirectories; + if (!_IsEAFHosted) + matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) }; + else + matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly); + if ((matchDirectories is null) || matchDirectories.Length != 1) + throw new Exception("Didn't find directory by logistics sequence"); + string fileName = Path.GetFileNameWithoutExtension(reportFullPath); + string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence); + if (!Directory.Exists(sequenceDirectory)) + _ = Directory.CreateDirectory(sequenceDirectory); + foreach (Tuple tuple in tuples) + { + fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); if (_IsEAFHosted) - { - switch (processingModeEnum) - { - case FileConnectorConfiguration.PostProcessingModeEnum.Move: - File.Move(sourceFile.FullName, itemFile); - break; - case FileConnectorConfiguration.PostProcessingModeEnum.Copy: - File.Copy(sourceFile.FullName, itemFile); - break; - case FileConnectorConfiguration.PostProcessingModeEnum.Delete: - File.Delete(sourceFile.FullName); - break; - default: - throw new Exception(); - } - } - } - - protected void Shared1811(string to, FileInfo sourceFile) - { - if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength) - { - string directoryName = Path.GetFileName(to); - string jobIdDirectory = Path.GetDirectoryName(to); - DateTime dateTime = DateTime.Now.AddMinutes(-15); - string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); - string weekDirectory = string.Concat(_Logistics.DateTimeFromSequence.ToString("yyyy"), "_Week_", weekOfYear, @"\", _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd")); - string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName); - if (!Directory.Exists(destinationDirectory)) - Directory.CreateDirectory(destinationDirectory); - File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name)); - try - { - string[] checkDirectories = Directory.GetDirectories(jobIdDirectory, "*", SearchOption.TopDirectoryOnly); - foreach (string checkDirectory in checkDirectories) - { - if (!checkDirectory.Contains("_")) - continue; - if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) - continue; - if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any()) - continue; - if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any()) - continue; - if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any()) - continue; - if (new DirectoryInfo(checkDirectory).CreationTime > dateTime) - continue; - Directory.Delete(checkDirectory, recursive: false); - } - } - catch (Exception) { throw; } - } - } - - protected void Shared0231(List directories) - { - if (_FileConnectorConfiguration.PostProcessingMode != FileConnectorConfiguration.PostProcessingModeEnum.Copy) - { - foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct()) - { - if (Directory.Exists(directory) && !Directory.GetFiles(directory).Any()) - Directory.Delete(directory); - } - } - } - - protected void Shared0413(DateTime dateTime, bool isDummyRun, string successDirectory, string duplicateDirectory, List> tuples, string duplicateFile) - { - if (!isDummyRun && _IsEAFHosted) - WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, successDirectory, duplicateDirectory, duplicateFile, tuples); + File.WriteAllText(fileName, tuple.Item2); else { - long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks; - for (short i = 0; i < short.MaxValue; i++) + if (File.Exists(fileName)) { - if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter) - break; - Thread.Sleep(500); + historicalText = File.ReadAllText(fileName); + if (tuple.Item2 != historicalText) + throw new Exception("File doesn't match historical!"); } } } + results = matchDirectories; + return results; + } - protected void Shared0607(string reportFullPath, string duplicateDirectory, string logisticsSequence, string destinationDirectory) - { - if (destinationDirectory == duplicateDirectory) - throw new Exception("Check Target File Folder for %LotIDWithLogisticsSequence%_in process on CI (not Duplicator)"); - if (destinationDirectory.EndsWith(logisticsSequence)) - destinationDirectory = Path.GetDirectoryName(destinationDirectory); - string[] deleteFiles = Directory.GetFiles(destinationDirectory, "*", SearchOption.AllDirectories); - if (deleteFiles.Length > 250) - throw new Exception("Safety net!"); - foreach (string file in deleteFiles) - File.Delete(file); - Directory.Delete(destinationDirectory, recursive: true); - File.Delete(reportFullPath); - } - - protected void Shared0192() - { - if (!string.IsNullOrEmpty(_Logistics.ReportFullPath)) - { - FileInfo fileInfo = new(_Logistics.ReportFullPath); - if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime) - File.SetLastWriteTime(_Logistics.ReportFullPath, fileInfo.CreationTime); - } - } - - protected string[] Shared1567(string reportFullPath, List> tuples) - { - string[] results; - string historicalText; - string logisticsSequence = _Logistics.Sequence.ToString(); - string jobIdDirectory = string.Concat(Path.GetDirectoryName(Path.GetDirectoryName(_FileConnectorConfiguration.TargetFileLocation)), @"\", _Logistics.JobID); - if (!Directory.Exists(jobIdDirectory)) - Directory.CreateDirectory(jobIdDirectory); - string[] matchDirectories; - if (!_IsEAFHosted) - matchDirectories = new string[] { Path.GetDirectoryName(Path.GetDirectoryName(reportFullPath)) }; - else - matchDirectories = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly); - if ((matchDirectories is null) || matchDirectories.Length != 1) - throw new Exception("Didn't find directory by logistics sequence"); - string fileName = Path.GetFileNameWithoutExtension(reportFullPath); - string sequenceDirectory = string.Concat(matchDirectories[0], @"\", logisticsSequence); - if (!Directory.Exists(sequenceDirectory)) - Directory.CreateDirectory(sequenceDirectory); - foreach (Tuple tuple in tuples) - { - fileName = string.Concat(sequenceDirectory, @"\", fileName, "_", tuple.Item1.FileNameWithoutExtension, ".pdsfc"); - if (_IsEAFHosted) - File.WriteAllText(fileName, tuple.Item2); - else - { - if (File.Exists(fileName)) - { - historicalText = File.ReadAllText(fileName); - if (tuple.Item2 != historicalText) - throw new Exception("File doesn't match historical!"); - } - } - } - results = matchDirectories; - return results; - } - - protected void Shared1277(string reportFullPath, string destinationDirectory, string logisticsSequence, string jobIdDirectory, string json) - { - string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory)); - string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID); - if (!Directory.Exists(destinationJobIdDirectory)) - Directory.CreateDirectory(destinationJobIdDirectory); - destinationJobIdDirectory = string.Concat(destinationJobIdDirectory, @"\", Path.GetFileName(destinationDirectory).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), DateTime.Now.Ticks - _Logistics.Sequence); - string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence); - string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json"); - Directory.Move(destinationDirectory, destinationJobIdDirectory); - if (!Directory.Exists(sequenceDirectory)) - Directory.CreateDirectory(sequenceDirectory); - File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true); - File.WriteAllText(jsonFileName, json); - } - + protected void Shared1277(string reportFullPath, string destinationDirectory, string logisticsSequence, string jobIdDirectory, string json) + { + string ecCharacterizationSi = Path.GetDirectoryName(Path.GetDirectoryName(jobIdDirectory)); + string destinationJobIdDirectory = string.Concat(ecCharacterizationSi, @"\Processed\", _Logistics.JobID); + if (!Directory.Exists(destinationJobIdDirectory)) + _ = Directory.CreateDirectory(destinationJobIdDirectory); + destinationJobIdDirectory = string.Concat(destinationJobIdDirectory, @"\", Path.GetFileName(destinationDirectory).Split(new string[] { logisticsSequence }, StringSplitOptions.None)[0], _Logistics.DateTimeFromSequence.ToString("yyyy-MM-dd_hh;mm_tt_"), DateTime.Now.Ticks - _Logistics.Sequence); + string sequenceDirectory = string.Concat(destinationJobIdDirectory, @"\", logisticsSequence); + string jsonFileName = string.Concat(sequenceDirectory, @"\", Path.GetFileNameWithoutExtension(reportFullPath), ".json"); + Directory.Move(destinationDirectory, destinationJobIdDirectory); + if (!Directory.Exists(sequenceDirectory)) + _ = Directory.CreateDirectory(sequenceDirectory); + File.Copy(reportFullPath, string.Concat(sequenceDirectory, @"\", Path.GetFileName(reportFullPath)), overwrite: true); + File.WriteAllText(jsonFileName, json); } } -// 2021-12-17 -> Shared - FileRead \ No newline at end of file +// 2022-02-14 -> Shared - FileRead \ No newline at end of file diff --git a/Adaptation/Shared/Logistics.cs b/Adaptation/Shared/Logistics.cs index fed85b3..c441b3f 100644 --- a/Adaptation/Shared/Logistics.cs +++ b/Adaptation/Shared/Logistics.cs @@ -1,223 +1,208 @@ -using Adaptation.Shared.Methods; +using Adaptation.Shared.Methods; using System; using System.Collections.Generic; using System.IO; using System.Linq; -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public class Logistics : ILogistics { - public class Logistics : ILogistics + public object NullData { get; private set; } + public string JobID { get; private set; } //CellName + public long Sequence { get; private set; } //Ticks + public DateTime DateTimeFromSequence { get; private set; } + public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; } + public string MesEntity { get; private set; } //SPC + public string ReportFullPath { get; private set; } //Extract file + public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics) + public string MID { get; set; } //Lot & Pocket || Lot + public List Tags { get; set; } + public List Logistics1 { get; set; } + public List Logistics2 { get; set; } + + public Logistics(IFileRead fileRead) { + DateTime dateTime = DateTime.Now; + NullData = null; + Sequence = dateTime.Ticks; + DateTimeFromSequence = dateTime; + JobID = fileRead.CellInstanceName; + TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; + MesEntity = DefaultMesEntity(dateTime); + ReportFullPath = string.Empty; + ProcessJobID = nameof(ProcessJobID); + MID = nameof(MID); + Tags = new List(); + Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); + Logistics2 = new List(); + } - public object NullData { get; private set; } - public string JobID { get; private set; } //CellName - public long Sequence { get; private set; } //Ticks - public DateTime DateTimeFromSequence { get; private set; } - public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; } - public string MesEntity { get; private set; } //SPC - public string ReportFullPath { get; private set; } //Extract file - public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics) - public string MID { get; set; } //Lot & Pocket || Lot - public List Tags { get; set; } - public List Logistics1 { get; set; } - public List Logistics2 { get; set; } - - public Logistics(IFileRead fileRead) + public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) + { + if (string.IsNullOrEmpty(fileRead.CellInstanceName)) + throw new Exception(); + if (string.IsNullOrEmpty(fileRead.MesEntity)) + throw new Exception(); + NullData = fileRead.NullData; + FileInfo fileInfo = new(reportFullPath); + DateTime dateTime = fileInfo.LastWriteTime; + if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value) + dateTime = dateTime.AddTicks(-1); + JobID = fileRead.CellInstanceName; + Sequence = dateTime.Ticks; + DateTimeFromSequence = dateTime; + TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; + MesEntity = fileRead.MesEntity; + ReportFullPath = fileInfo.FullName; + ProcessJobID = nameof(ProcessJobID); + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName); + if (useSplitForMID) + { + if (fileNameWithoutExtension.IndexOf(".") > -1) + fileNameWithoutExtension = fileNameWithoutExtension.Split('.')[0].Trim(); + if (fileNameWithoutExtension.IndexOf("_") > -1) + fileNameWithoutExtension = fileNameWithoutExtension.Split('_')[0].Trim(); + if (fileNameWithoutExtension.IndexOf("-") > -1) + fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim(); + } + MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower()); + Tags = new List(); + Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); + Logistics2 = new List(); + } + + public Logistics(string reportFullPath, string logistics) + { + string key; + DateTime dateTime; + string[] segments; + Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1")) { - DateTime dateTime = DateTime.Now; NullData = null; + JobID = "null"; + dateTime = new FileInfo(reportFullPath).LastWriteTime; Sequence = dateTime.Ticks; DateTimeFromSequence = dateTime; - JobID = fileRead.CellInstanceName; TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; MesEntity = DefaultMesEntity(dateTime); - ReportFullPath = string.Empty; - ProcessJobID = nameof(ProcessJobID); - MID = nameof(MID); + ReportFullPath = reportFullPath; + ProcessJobID = "R##"; + MID = "null"; Tags = new List(); Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); Logistics2 = new List(); } - - public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null) + else { - if (string.IsNullOrEmpty(fileRead.CellInstanceName)) - throw new Exception(); - if (string.IsNullOrEmpty(fileRead.MesEntity)) - throw new Exception(); - NullData = fileRead.NullData; - FileInfo fileInfo = new(reportFullPath); - DateTime dateTime = fileInfo.LastWriteTime; - if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value) - dateTime = dateTime.AddTicks(-1); - JobID = fileRead.CellInstanceName; + string logistics1Line1 = Logistics1[0]; + key = "NULL_DATA="; + if (!logistics1Line1.Contains(key)) + NullData = null; + else + { + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + NullData = segments[1].Split(';')[0]; + } + key = "JOBID="; + if (!logistics1Line1.Contains(key)) + JobID = "null"; + else + { + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + JobID = segments[1].Split(';')[0]; + } + key = "SEQUENCE="; + if (!logistics1Line1.Contains(key)) + dateTime = new FileInfo(reportFullPath).LastWriteTime; + else + { + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks) + dateTime = new FileInfo(reportFullPath).LastWriteTime; + else + dateTime = new DateTime(sequence); + } Sequence = dateTime.Ticks; DateTimeFromSequence = dateTime; TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; - MesEntity = fileRead.MesEntity; - ReportFullPath = fileInfo.FullName; - ProcessJobID = nameof(ProcessJobID); - string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName); - if (useSplitForMID) + DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime; + if (TotalSecondsSinceLastWriteTimeFromSequence > 600) { - if (fileNameWithoutExtension.IndexOf(".") > -1) - fileNameWithoutExtension = fileNameWithoutExtension.Split('.')[0].Trim(); - if (fileNameWithoutExtension.IndexOf("_") > -1) - fileNameWithoutExtension = fileNameWithoutExtension.Split('_')[0].Trim(); - if (fileNameWithoutExtension.IndexOf("-") > -1) - fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim(); + if (lastWriteTime != dateTime) + try + { File.SetLastWriteTime(reportFullPath, dateTime); } + catch (Exception) { } } - MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower()); - Tags = new List(); - Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); - Logistics2 = new List(); - } - - public Logistics(string reportFullPath, string logistics) - { - string key; - DateTime dateTime; - string[] segments; - Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); - if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1")) - { - NullData = null; - JobID = "null"; - dateTime = new FileInfo(reportFullPath).LastWriteTime; - Sequence = dateTime.Ticks; - DateTimeFromSequence = dateTime; - TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; + key = "MES_ENTITY="; + if (!logistics1Line1.Contains(key)) MesEntity = DefaultMesEntity(dateTime); - ReportFullPath = reportFullPath; - ProcessJobID = "R##"; - MID = "null"; - Tags = new List(); - Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); - Logistics2 = new List(); - } else { - string logistics1Line1 = Logistics1[0]; - key = "NULL_DATA="; - if (!logistics1Line1.Contains(key)) - NullData = null; - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - NullData = segments[1].Split(';')[0]; - } - key = "JOBID="; - if (!logistics1Line1.Contains(key)) - JobID = "null"; - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - JobID = segments[1].Split(';')[0]; - } - key = "SEQUENCE="; - if (!logistics1Line1.Contains(key)) - dateTime = new FileInfo(reportFullPath).LastWriteTime; - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks) - dateTime = new FileInfo(reportFullPath).LastWriteTime; - else - dateTime = new DateTime(sequence); - } - Sequence = dateTime.Ticks; - DateTimeFromSequence = dateTime; - TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; - DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime; - if (TotalSecondsSinceLastWriteTimeFromSequence > 600) - { - if (lastWriteTime != dateTime) - try - { File.SetLastWriteTime(reportFullPath, dateTime); } - catch (Exception) { } - } - key = "MES_ENTITY="; - if (!logistics1Line1.Contains(key)) - MesEntity = DefaultMesEntity(dateTime); - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - MesEntity = segments[1].Split(';')[0]; - } - ReportFullPath = reportFullPath; - key = "PROCESS_JOBID="; - if (!logistics1Line1.Contains(key)) - ProcessJobID = "R##"; - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - ProcessJobID = segments[1].Split(';')[0]; - } - key = "MID="; - if (!logistics1Line1.Contains(key)) - MID = "null"; - else - { - segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - MID = segments[1].Split(';')[0]; - } + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + MesEntity = segments[1].Split(';')[0]; } - Logistics2 logistics2; - Tags = new List(); - Logistics2 = new List(); - for (int i = 1; i < Logistics1.Count(); i++) + ReportFullPath = reportFullPath; + key = "PROCESS_JOBID="; + if (!logistics1Line1.Contains(key)) + ProcessJobID = "R##"; + else { - if (Logistics1[i].StartsWith("LOGISTICS_2")) - { - logistics2 = new Logistics2(Logistics1[i]); - Logistics2.Add(logistics2); - } + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + ProcessJobID = segments[1].Split(';')[0]; } - for (int i = Logistics1.Count() - 1; i > -1; i--) + key = "MID="; + if (!logistics1Line1.Contains(key)) + MID = "null"; + else { - if (Logistics1[i].StartsWith("LOGISTICS_2")) - Logistics1.RemoveAt(i); + segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + MID = segments[1].Split(';')[0]; } } - - public Logistics ShallowCopy() + Logistics2 logistics2; + Tags = new List(); + Logistics2 = new List(); + for (int i = 1; i < Logistics1.Count; i++) { - return (Logistics)MemberwiseClone(); + if (Logistics1[i].StartsWith("LOGISTICS_2")) + { + logistics2 = new Logistics2(Logistics1[i]); + Logistics2.Add(logistics2); + } } - - private string DefaultMesEntity(DateTime dateTime) + for (int i = Logistics1.Count - 1; i > -1; i--) { - return string.Concat(dateTime.Ticks, "_MES_ENTITY"); - } - - internal string GetLotViaMostCommonMethod() - { - return MID.Substring(0, MID.Length - 2); - } - - internal string GetPocketNumberViaMostCommonMethod() - { - return MID.Substring(MID.Length - 2); - } - - internal void Update(string dateTime, string processJobID, string mid) - { - if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted)) - dateTimeCasted = DateTime.Now; - NullData = null; - //JobID = Description.GetCellName(); - Sequence = dateTimeCasted.Ticks; - DateTimeFromSequence = dateTimeCasted; - TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds; - //MesEntity = DefaultMesEntity(dateTime); - //ReportFullPath = string.Empty; - ProcessJobID = processJobID; - MID = mid; - Tags = new List(); - Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); - Logistics2 = new List(); + if (Logistics1[i].StartsWith("LOGISTICS_2")) + Logistics1.RemoveAt(i); } } + public Logistics ShallowCopy() => (Logistics)MemberwiseClone(); + + private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY"); + + internal string GetLotViaMostCommonMethod() => MID.Substring(0, MID.Length - 2); + + internal string GetPocketNumberViaMostCommonMethod() => MID.Substring(MID.Length - 2); + + internal void Update(string dateTime, string processJobID, string mid) + { + if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted)) + dateTimeCasted = DateTime.Now; + NullData = null; + //JobID = Description.GetCellName(); + Sequence = dateTimeCasted.Ticks; + DateTimeFromSequence = dateTimeCasted; + TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds; + //MesEntity = DefaultMesEntity(dateTime); + //ReportFullPath = string.Empty; + ProcessJobID = processJobID; + MID = mid; + Tags = new List(); + Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); + Logistics2 = new List(); + } } \ No newline at end of file diff --git a/Adaptation/Shared/Logistics2.cs b/Adaptation/Shared/Logistics2.cs index eaab290..a067258 100644 --- a/Adaptation/Shared/Logistics2.cs +++ b/Adaptation/Shared/Logistics2.cs @@ -1,81 +1,78 @@ -using System; +using System; -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public class Logistics2 : Methods.ILogistics2 { - public class Logistics2 : Methods.ILogistics2 + public string MID { get; private set; } + public string RunNumber { get; private set; } + public string SatelliteGroup { get; private set; } + public string PartNumber { get; private set; } + public string PocketNumber { get; private set; } + public string WaferLot { get; private set; } + public string Recipe { get; private set; } + + public Logistics2(string logistics2) { - - public string MID { get; private set; } - public string RunNumber { get; private set; } - public string SatelliteGroup { get; private set; } - public string PartNumber { get; private set; } - public string PocketNumber { get; private set; } - public string WaferLot { get; private set; } - public string Recipe { get; private set; } - - public Logistics2(string logistics2) + string key; + string[] segments; + key = "JOBID="; + if (!logistics2.Contains(key)) + MID = "null"; + else { - string key; - string[] segments; - key = "JOBID="; - if (!logistics2.Contains(key)) - MID = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - MID = segments[1].Split(';')[0]; - } - key = "MID="; - if (!logistics2.Contains(key)) - RunNumber = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - RunNumber = segments[1].Split(';')[0]; - } - key = "INFO="; - if (!logistics2.Contains(key)) - SatelliteGroup = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - SatelliteGroup = segments[1].Split(';')[0]; - } - key = "PRODUCT="; - if (!logistics2.Contains(key)) - PartNumber = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - PartNumber = segments[1].Split(';')[0]; - } - key = "CHAMBER="; - if (!logistics2.Contains(key)) - PocketNumber = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - PocketNumber = segments[1].Split(';')[0]; - } - key = "WAFER_ID="; - if (!logistics2.Contains(key)) - WaferLot = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - WaferLot = segments[1].Split(';')[0]; - } - key = "PPID="; - if (!logistics2.Contains(key)) - Recipe = "null"; - else - { - segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); - Recipe = segments[1].Split(';')[0]; - } + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + MID = segments[1].Split(';')[0]; + } + key = "MID="; + if (!logistics2.Contains(key)) + RunNumber = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + RunNumber = segments[1].Split(';')[0]; + } + key = "INFO="; + if (!logistics2.Contains(key)) + SatelliteGroup = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + SatelliteGroup = segments[1].Split(';')[0]; + } + key = "PRODUCT="; + if (!logistics2.Contains(key)) + PartNumber = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + PartNumber = segments[1].Split(';')[0]; + } + key = "CHAMBER="; + if (!logistics2.Contains(key)) + PocketNumber = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + PocketNumber = segments[1].Split(';')[0]; + } + key = "WAFER_ID="; + if (!logistics2.Contains(key)) + WaferLot = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + WaferLot = segments[1].Split(';')[0]; + } + key = "PPID="; + if (!logistics2.Contains(key)) + Recipe = "null"; + else + { + segments = logistics2.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries); + Recipe = segments[1].Split(';')[0]; } - } } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/IDescription.cs b/Adaptation/Shared/Methods/IDescription.cs index 1891e5a..30dc635 100644 --- a/Adaptation/Shared/Methods/IDescription.cs +++ b/Adaptation/Shared/Methods/IDescription.cs @@ -1,25 +1,22 @@ using System.Collections.Generic; using System.Text.Json; -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface IDescription { - public interface IDescription - { - - string GetEventDescription(); - List GetDetailNames(); - List GetHeaderNames(); - IDescription GetDisplayNames(); - List GetParameterNames(); - List GetPairedParameterNames(); - List GetIgnoreParameterNames(Test test); - List GetNames(IFileRead fileRead, Logistics logistics); - JsonProperty[] GetDefault(IFileRead fileRead, Logistics logistics); - Dictionary GetDisplayNamesJsonElement(IFileRead fileRead); - IDescription GetDefaultDescription(IFileRead fileRead, Logistics logistics); - List GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData); - - } + string GetEventDescription(); + List GetDetailNames(); + List GetHeaderNames(); + IDescription GetDisplayNames(); + List GetParameterNames(); + List GetPairedParameterNames(); + List GetIgnoreParameterNames(Test test); + List GetNames(IFileRead fileRead, Logistics logistics); + JsonProperty[] GetDefault(IFileRead fileRead, Logistics logistics); + Dictionary GetDisplayNamesJsonElement(IFileRead fileRead); + IDescription GetDefaultDescription(IFileRead fileRead, Logistics logistics); + List GetDescriptions(IFileRead fileRead, Logistics logistics, List tests, IProcessData iProcessData); } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/IFileRead.cs b/Adaptation/Shared/Methods/IFileRead.cs index d6c3f58..13c2379 100644 --- a/Adaptation/Shared/Methods/IFileRead.cs +++ b/Adaptation/Shared/Methods/IFileRead.cs @@ -3,24 +3,22 @@ using System.Collections.Generic; using System.IO; using System.Text.Json; -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface IFileRead : Properties.IFileRead { - public interface IFileRead : Properties.IFileRead - { - void MoveArchive(); - void WaitForThread(); - JsonProperty[] GetDefault(); - void Callback(object state); - string GetEventDescription(); - List GetHeaderNames(); - void CheckTests(Test[] tests, bool extra); - Dictionary GetDisplayNamesJsonElement(); - Tuple> ReExtract(); - List GetDescriptions(IFileRead fileRead, List tests, IProcessData processData); - void Move(Tuple> extractResults, Exception exception = null); - Tuple> GetExtractResult(string reportFullPath, string eventName); - string[] Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception); - } + void WaitForThread(); + JsonProperty[] GetDefault(); + void Callback(object state); + string GetEventDescription(); + List GetHeaderNames(); + void CheckTests(Test[] tests, bool extra); + Dictionary GetDisplayNamesJsonElement(); + Tuple> ReExtract(); + List GetDescriptions(IFileRead fileRead, List tests, IProcessData processData); + void Move(Tuple> extractResults, Exception exception = null); + Tuple> GetExtractResult(string reportFullPath, string eventName); + string[] Move(Tuple> extractResults, string to, string from, string resolvedFileLocation, Exception exception); } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/ILogistics.cs b/Adaptation/Shared/Methods/ILogistics.cs index 73fd452..ea9ca27 100644 --- a/Adaptation/Shared/Methods/ILogistics.cs +++ b/Adaptation/Shared/Methods/ILogistics.cs @@ -1,8 +1,5 @@ -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface ILogistics : Properties.ILogistics { - - public interface ILogistics : Properties.ILogistics - { - } - } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/ILogistics2.cs b/Adaptation/Shared/Methods/ILogistics2.cs index ee89538..35b9e57 100644 --- a/Adaptation/Shared/Methods/ILogistics2.cs +++ b/Adaptation/Shared/Methods/ILogistics2.cs @@ -1,8 +1,5 @@ -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface ILogistics2 : Properties.ILogistics2 { - - public interface ILogistics2 : Properties.ILogistics2 - { - } - } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/IProcessData.cs b/Adaptation/Shared/Methods/IProcessData.cs index 26c69fe..e3fdeab 100644 --- a/Adaptation/Shared/Methods/IProcessData.cs +++ b/Adaptation/Shared/Methods/IProcessData.cs @@ -3,15 +3,12 @@ using System.Collections.Generic; using System.IO; using System.Text.Json; -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface IProcessData : Properties.IProcessData { - public interface IProcessData : Properties.IProcessData - { - - string GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors); - Tuple> GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection); - - } + string GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors); + Tuple> GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection); } \ No newline at end of file diff --git a/Adaptation/Shared/Methods/ISMTP.cs b/Adaptation/Shared/Methods/ISMTP.cs index 7792d7c..378da64 100644 --- a/Adaptation/Shared/Methods/ISMTP.cs +++ b/Adaptation/Shared/Methods/ISMTP.cs @@ -1,9 +1,8 @@ -namespace Adaptation.Shared.Methods +namespace Adaptation.Shared.Methods; + +public interface ISMTP { - public interface ISMTP - { - void SendLowPriorityEmailMessage(string subject, string body); - void SendHighPriorityEmailMessage(string subject, string body); - void SendNormalPriorityEmailMessage(string subject, string body); - } + void SendLowPriorityEmailMessage(string subject, string body); + void SendHighPriorityEmailMessage(string subject, string body); + void SendNormalPriorityEmailMessage(string subject, string body); } \ No newline at end of file diff --git a/Adaptation/Shared/Metrology/ScopeInfo.cs b/Adaptation/Shared/Metrology/ScopeInfo.cs index 20f63ea..2de909e 100644 --- a/Adaptation/Shared/Metrology/ScopeInfo.cs +++ b/Adaptation/Shared/Metrology/ScopeInfo.cs @@ -1,306 +1,300 @@ using System; using System.IO; -namespace Adaptation.Shared.Metrology +namespace Adaptation.Shared.Metrology; + +public class ScopeInfo : Properties.IScopeInfo { - public class ScopeInfo : Properties.IScopeInfo + public Test Test { get; private set; } + public Enum Enum { get; private set; } + public string HTML { get; private set; } + public string Title { get; private set; } + public string FileName { get; private set; } + public int TestValue { get; private set; } + public string Header { get; private set; } + public string QueryFilter { get; private set; } + public string FileNameWithoutExtension { get; private set; } + + public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "") { - - public Test Test { get; private set; } - public Enum Enum { get; private set; } - public string HTML { get; private set; } - public string Title { get; private set; } - public string FileName { get; private set; } - public int TestValue { get; private set; } - public string Header { get; private set; } - public string QueryFilter { get; private set; } - public string FileNameWithoutExtension { get; private set; } - - public ScopeInfo(Test test, string fileName, string queryFilter = "", string title = "", string html = "") - { - Enum = test; - Test = test; - HTML = html; - Title = title; - FileName = fileName; - TestValue = (int)test; - Header = string.Empty; - QueryFilter = queryFilter; - FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName); - } - - public ScopeInfo(Test test) - { - Enum = test; - Test = test; - TestValue = (int)test; - switch (Test) - { - case Test.AFMRoughness: - FileNameWithoutExtension = "afm_iqs_01"; - Header = string.Empty; - QueryFilter = "AFM Roughness"; - Title = "AFM"; - HTML = @"GaN Epi Data\10 - afm.html"; - break; - case Test.BreakdownVoltageCenter: - FileNameWithoutExtension = "bv_iqs_01"; - Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; - QueryFilter = "Breakdown Voltage"; - Title = "Breakdown Voltage-Center"; - HTML = @"GaN Epi Data\03 - bv-production.html"; - break; - case Test.BreakdownVoltageEdge: - FileNameWithoutExtension = "bv_iqs_01_Edge"; - Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; - QueryFilter = "Breakdown Voltage - Edge"; - Title = "Breakdown Voltage-Edge"; - HTML = @"GaN Epi Data\03 - bv-production.html"; - break; - case Test.BreakdownVoltageMiddle8in: - FileNameWithoutExtension = "bv_iqs_01_Middle"; - Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; - QueryFilter = "Breakdown Voltage - Middle"; - Title = "Breakdown Voltage-Middle (8 in)"; - HTML = @"GaN Epi Data\03 - bv-production.html"; - break; - case Test.CV: - FileNameWithoutExtension = "cv_iqs_01"; - Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; - QueryFilter = "CV_Ns"; - Title = "CV"; - HTML = @"GaN Epi Data\05 - cv.html"; - break; - case Test.MonthlyCV: - FileNameWithoutExtension = "cv_iqs_01"; - Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; - QueryFilter = "CV_Ns"; - Title = "CV Monthly Verification"; - HTML = @"Metrology\07 - cv_verif_monthly.html"; - break; - case Test.WeeklyCV: - FileNameWithoutExtension = "cv_iqs_01"; - Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; - QueryFilter = "CV_Ns"; - Title = "CV Weekly Verification"; - HTML = @"Metrology\16 - cv_verif_weekly.html"; - break; - case Test.CandelaKlarfDC: - FileNameWithoutExtension = "candela_iqs_01"; - Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count"; - QueryFilter = "Candela Cracking"; - Title = "Candela"; - HTML = @"GaN Epi Data\12 - candela.html"; - break; - case Test.CandelaLaser: - FileNameWithoutExtension = "candela_iqs_01"; - Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count"; - QueryFilter = "Candela Cracking"; - Title = "Candela"; - HTML = @"GaN Epi Data\12 - candela.html"; - break; - case Test.CandelaVerify: - FileNameWithoutExtension = "candela_iqs_01"; - Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count"); - QueryFilter = "Candela Cracking"; - Title = "Candela"; - HTML = @"GaN Epi Data\12 - candela.html"; - break; - case Test.CandelaPSL: - FileNameWithoutExtension = "candela_iqs_01"; - Header = string.Empty; - QueryFilter = "102-83nm"; - Title = "Candela"; - HTML = @"GaN Epi Data\12 - candela.html"; - break; - case Test.CandelaProdU: - FileNameWithoutExtension = "candela_iqs_01"; - Header = string.Empty; - QueryFilter = "SPE verification"; - Title = "Candela"; - HTML = @"GaN Epi Data\12 - candela.html"; - break; - case Test.Denton: - FileNameWithoutExtension = "denton_iqs_01"; - Header = "Tool;fDate;Run;Recipe;Operator;Name;Value"; - QueryFilter = "Denton_Voltage_AVG"; - Title = "Denton Data"; - HTML = @"Support Process\03 - ebeam02_denton_v1.html"; - break; - case Test.Hall: - FileNameWithoutExtension = "hall_iqs_01"; - Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; - QueryFilter = "Hall Rs"; - Title = "Hall Data"; - HTML = @"GaN Epi Data\04 - hall.html"; - break; - case Test.MonthlyHall: - FileNameWithoutExtension = "hall_iqs_01"; - Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; - QueryFilter = "Hall Rs"; - Title = "Hall Monthly Verification"; - HTML = @"Metrology\06 - hall_verif_monthly.html"; - break; - case Test.WeeklyHall: - FileNameWithoutExtension = "hall_iqs_01"; - Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; - QueryFilter = "Hall Rs"; - Title = "Hall Weekly Verification"; - HTML = @"Metrology\15 - hall_verif_weekly.html"; - break; - case Test.Lehighton: - FileNameWithoutExtension = "lei_iqs_01"; - Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value"; - QueryFilter = "LEI RS Average value"; - Title = "Lehighton"; - HTML = @"GaN Epi Data\13 - lehighton.html"; - break; - case Test.VerificationLehighton: - FileNameWithoutExtension = "___"; - Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value"; - QueryFilter = "___"; - Title = "LEI Weekly Verification 2 Ohm cm"; - HTML = @"Metrology\14 - lei_verif_weekly.html.html"; - break; - case Test.Microscope: - FileNameWithoutExtension = string.Empty; - Header = string.Empty; - QueryFilter = "Microscope Center 5x"; - Title = "Total Microscope Defects"; - HTML = string.Empty; - break; - case Test.RPMXY: - FileNameWithoutExtension = "RPM_Data"; - Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value"; - QueryFilter = "Barrier_Composition_RPM_XY"; - Title = "RPM XY Data ***&*** View Data"; - HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html"; - break; - case Test.RPMAverage: - FileNameWithoutExtension = "RPMdata-short"; - Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File"; - QueryFilter = "Epi Thickness Mean"; - Title = "RPM Average Data"; - HTML = @"GaN Epi Data\09 - rpm.html"; - break; - case Test.RPMPLRatio: - FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short"; - Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID"; - QueryFilter = "PL Ratio"; - Title = "Photoluminescence: PL Ratio"; - HTML = @"GaN Epi Data\08 - photoluminescence.html"; - break; - case Test.DailyRPMXY: - FileNameWithoutExtension = "RPM_Data"; - Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value"; - QueryFilter = "Barrier_Composition_RPM_XY"; - Title = ""; - HTML = @"Metrology\?"; - break; - case Test.DailyRPMAverage: - FileNameWithoutExtension = "RPMdata-short"; - Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File"; - QueryFilter = "Epi Thickness Mean"; - Title = ""; - HTML = @"Metrology\?"; - break; - case Test.DailyRPMPLRatio: - FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short"; - Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID"; - QueryFilter = "PL Ratio"; - Title = "RPM Daily Verification"; - HTML = @"Metrology\17 - rpm_verif_daily.html"; - break; - case Test.VerificationRPM: - FileNameWithoutExtension = "PhotoLuminescence_Ver"; - Header = "Part;Process;Date;Test;Value"; - QueryFilter = "PL Edge Wavelength"; - Title = "PL Daily Verification - [PL Edge Wavelength]"; - HTML = @"Metrology\18 - photoluminescence_verif_daily.html"; - break; - case Test.Photoreflectance: - FileNameWithoutExtension = "photoreflect_iqs_01"; - Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak"; - QueryFilter = "PR Barrier Composition"; - Title = "Photoreflectance 6 in, Photoreflectance 8 in"; - HTML = @"GaN Epi Data\07 - photoreflectance.html"; - break; - case Test.UV: - FileNameWithoutExtension = "uv_iqs_01"; - Header = string.Empty; - QueryFilter = "UV Broken"; - Title = "UV"; - HTML = @"GaN Epi Data\15 - uv 2.1.html"; - break; - case Test.VpdIcpmsAnalyte: - FileNameWithoutExtension = "VPD_iqs_01"; - Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value"; - QueryFilter = "Mg"; - Title = "VpdIcpmsAnalyteData"; - HTML = @""; - break; - case Test.WarpAndBow: - FileNameWithoutExtension = "warp_iqs_01"; - Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow"; - QueryFilter = "BowCenter"; - Title = "Warp and Bow"; - HTML = @"GaN Epi Data\14 - warp.html"; - break; - case Test.VerificationWarpAndBow: - FileNameWithoutExtension = "warp_ver_iqs_01"; - Header = "Part;Process;Date;WaferScribe;totWarp;bow"; - QueryFilter = "Bow Calibration"; - Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification"; - HTML = @"Metrology\19 - warp_cal_daily.html"; - break; - case Test.XRDXY: - FileNameWithoutExtension = "xrd_iqs_NEW_01"; - Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group"; - QueryFilter = "SL Period"; - Title = "XRD XY Raw Data Viewer"; - HTML = @"GaN Epi Data\11 - xrd.html"; - break; - case Test.XRDWeightedAverage: - FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG"; - Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group"; - //QueryFilter = "Al% Barrier WTAVG"; - QueryFilter = "SL Period WTAVG"; - Title = "XRD Weighted Average Data"; - HTML = @"GaN Epi Data\11 - xrd.html"; - break; - case Test.MonthlyXRD: - FileNameWithoutExtension = "xrd_monthly_ver_iqs_01"; - Header = "Part;Process;Date;TestName;Value"; - QueryFilter = "XRD 2-Theta Position"; - Title = "XRD Monthly Verification"; - HTML = @"Metrology\03 - xrd_verif_monthly.html"; - break; - case Test.WeeklyXRD: - FileNameWithoutExtension = "xrd_weekly_ver_iqs_01"; - Header = "Part;Process;Lot;Date;TestName;Value"; - QueryFilter = "XRD Weekly AL% Center"; - Title = "XRD Weekly Verification"; - HTML = @"Metrology\12 - xrd_verif_weekly.html"; - break; - case Test.JVXRD: - FileNameWithoutExtension = "xrd_iqs_NEW_01"; - Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group"; - QueryFilter = "SL Period"; - Title = "XRD XY Raw Data Viewer"; - HTML = @"GaN Epi Data\11 - xrd.html"; - break; - default: - throw new Exception(); - } - FileName = string.Concat(FileNameWithoutExtension, ".txt"); - } - - public ScopeInfo ShallowCopy() - { - return (ScopeInfo)MemberwiseClone(); - } - + Enum = test; + Test = test; + HTML = html; + Title = title; + FileName = fileName; + TestValue = (int)test; + Header = string.Empty; + QueryFilter = queryFilter; + FileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName); } + public ScopeInfo(Test test) + { + Enum = test; + Test = test; + TestValue = (int)test; + switch (Test) + { + case Test.AFMRoughness: + FileNameWithoutExtension = "afm_iqs_01"; + Header = string.Empty; + QueryFilter = "AFM Roughness"; + Title = "AFM"; + HTML = @"GaN Epi Data\10 - afm.html"; + break; + case Test.BreakdownVoltageCenter: + FileNameWithoutExtension = "bv_iqs_01"; + Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; + QueryFilter = "Breakdown Voltage"; + Title = "Breakdown Voltage-Center"; + HTML = @"GaN Epi Data\03 - bv-production.html"; + break; + case Test.BreakdownVoltageEdge: + FileNameWithoutExtension = "bv_iqs_01_Edge"; + Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; + QueryFilter = "Breakdown Voltage - Edge"; + Title = "Breakdown Voltage-Edge"; + HTML = @"GaN Epi Data\03 - bv-production.html"; + break; + case Test.BreakdownVoltageMiddle8in: + FileNameWithoutExtension = "bv_iqs_01_Middle"; + Header = "Reactor;fDate;fRecipeName;Lot;fPocketNumber;g4Scribe;BV Position;BV Value;Tool"; + QueryFilter = "Breakdown Voltage - Middle"; + Title = "Breakdown Voltage-Middle (8 in)"; + HTML = @"GaN Epi Data\03 - bv-production.html"; + break; + case Test.CV: + FileNameWithoutExtension = "cv_iqs_01"; + Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; + QueryFilter = "CV_Ns"; + Title = "CV"; + HTML = @"GaN Epi Data\05 - cv.html"; + break; + case Test.MonthlyCV: + FileNameWithoutExtension = "cv_iqs_01"; + Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; + QueryFilter = "CV_Ns"; + Title = "CV Monthly Verification"; + HTML = @"Metrology\07 - cv_verif_monthly.html"; + break; + case Test.WeeklyCV: + FileNameWithoutExtension = "cv_iqs_01"; + Header = "Reactor;fDate;fPart;Lot;pocketNumber;g4Scribe;Position;Vp;NdMin;Tool ID;CV Ns;CV Cap"; + QueryFilter = "CV_Ns"; + Title = "CV Weekly Verification"; + HTML = @"Metrology\16 - cv_verif_weekly.html"; + break; + case Test.CandelaKlarfDC: + FileNameWithoutExtension = "candela_iqs_01"; + Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count"; + QueryFilter = "Candela Cracking"; + Title = "Candela"; + HTML = @"GaN Epi Data\12 - candela.html"; + break; + case Test.CandelaLaser: + FileNameWithoutExtension = "candela_iqs_01"; + Header = "LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;Epi;SlipLines;Cracks;EpiDef;HazeSpot;SmallLpd;MediumLpd;LargeLpd;Cracks_A;Spirals;Craters;Pits;Tool ID;Defect Count"; + QueryFilter = "Candela Cracking"; + Title = "Candela"; + HTML = @"GaN Epi Data\12 - candela.html"; + break; + case Test.CandelaVerify: + FileNameWithoutExtension = "candela_iqs_01"; + Header = string.Concat("LotID;OperatorID;RecipeName;CandelaRecipe;WaferID;PocketNumber;RunDate;RunID;Reactor;", "Slip Lines;Cracks;Epi Def;Haze Spot;Small LPD;Medium LPD;Large LPD;Cracks_A;Spirals;Craters;8620 Small;Pits;Tool ID;Defect Count"); + QueryFilter = "Candela Cracking"; + Title = "Candela"; + HTML = @"GaN Epi Data\12 - candela.html"; + break; + case Test.CandelaPSL: + FileNameWithoutExtension = "candela_iqs_01"; + Header = string.Empty; + QueryFilter = "102-83nm"; + Title = "Candela"; + HTML = @"GaN Epi Data\12 - candela.html"; + break; + case Test.CandelaProdU: + FileNameWithoutExtension = "candela_iqs_01"; + Header = string.Empty; + QueryFilter = "SPE verification"; + Title = "Candela"; + HTML = @"GaN Epi Data\12 - candela.html"; + break; + case Test.Denton: + FileNameWithoutExtension = "denton_iqs_01"; + Header = "Tool;fDate;Run;Recipe;Operator;Name;Value"; + QueryFilter = "Denton_Voltage_AVG"; + Title = "Denton Data"; + HTML = @"Support Process\03 - ebeam02_denton_v1.html"; + break; + case Test.Hall: + FileNameWithoutExtension = "hall_iqs_01"; + Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; + QueryFilter = "Hall Rs"; + Title = "Hall Data"; + HTML = @"GaN Epi Data\04 - hall.html"; + break; + case Test.MonthlyHall: + FileNameWithoutExtension = "hall_iqs_01"; + Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; + QueryFilter = "Hall Rs"; + Title = "Hall Monthly Verification"; + HTML = @"Metrology\06 - hall_verif_monthly.html"; + break; + case Test.WeeklyHall: + FileNameWithoutExtension = "hall_iqs_01"; + Header = "Lot;Tool;TimeDate;RunDate;RunID;Part;Reactor;Scribe;PocketNumber;Tool ID;Name;Value"; + QueryFilter = "Hall Rs"; + Title = "Hall Weekly Verification"; + HTML = @"Metrology\15 - hall_verif_weekly.html"; + break; + case Test.Lehighton: + FileNameWithoutExtension = "lei_iqs_01"; + Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value"; + QueryFilter = "LEI RS Average value"; + Title = "Lehighton"; + HTML = @"GaN Epi Data\13 - lehighton.html"; + break; + case Test.VerificationLehighton: + FileNameWithoutExtension = "___"; + Header = "Reactor;Date;Recipe;Lot;Pocket;Scribe;Tool;Name;Value"; + QueryFilter = "___"; + Title = "LEI Weekly Verification 2 Ohm cm"; + HTML = @"Metrology\14 - lei_verif_weekly.html.html"; + break; + case Test.Microscope: + FileNameWithoutExtension = string.Empty; + Header = string.Empty; + QueryFilter = "Microscope Center 5x"; + Title = "Total Microscope Defects"; + HTML = string.Empty; + break; + case Test.RPMXY: + FileNameWithoutExtension = "RPM_Data"; + Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value"; + QueryFilter = "Barrier_Composition_RPM_XY"; + Title = "RPM XY Data ***&*** View Data"; + HTML = @"GaN Epi Data\09 - rpm --- 08 - photoluminescence.html"; + break; + case Test.RPMAverage: + FileNameWithoutExtension = "RPMdata-short"; + Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File"; + QueryFilter = "Epi Thickness Mean"; + Title = "RPM Average Data"; + HTML = @"GaN Epi Data\09 - rpm.html"; + break; + case Test.RPMPLRatio: + FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short"; + Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID"; + QueryFilter = "PL Ratio"; + Title = "Photoluminescence: PL Ratio"; + HTML = @"GaN Epi Data\08 - photoluminescence.html"; + break; + case Test.DailyRPMXY: + FileNameWithoutExtension = "RPM_Data"; + Header = "Lot;Date;Recipe;Reactor;Scribe;Pocket;Tool;Name;Value"; + QueryFilter = "Barrier_Composition_RPM_XY"; + Title = ""; + HTML = @"Metrology\?"; + break; + case Test.DailyRPMAverage: + FileNameWithoutExtension = "RPMdata-short"; + Header = "fProductId;fDate;average;stdDev;fRecipeName;Reactor;g4Scribe;Pocket Number;Tool ID;Recipe From Rpm File"; + QueryFilter = "Epi Thickness Mean"; + Title = ""; + HTML = @"Metrology\?"; + break; + case Test.DailyRPMPLRatio: + FileNameWithoutExtension = "PHOTOLUMINESCENCE_data-short"; + Header = "fProductId;fDate;g4Scribe;fRecipeName;bandEdge_nm;bandEdge_V;yellowBand_Pmw;yellowBand_nm;yellowBand_V;Reactor;Pocket Number;Tool ID"; + QueryFilter = "PL Ratio"; + Title = "RPM Daily Verification"; + HTML = @"Metrology\17 - rpm_verif_daily.html"; + break; + case Test.VerificationRPM: + FileNameWithoutExtension = "PhotoLuminescence_Ver"; + Header = "Part;Process;Date;Test;Value"; + QueryFilter = "PL Edge Wavelength"; + Title = "PL Daily Verification - [PL Edge Wavelength]"; + HTML = @"Metrology\18 - photoluminescence_verif_daily.html"; + break; + case Test.Photoreflectance: + FileNameWithoutExtension = "photoreflect_iqs_01"; + Header = "Lot;Date;Part;Reactor;Scribe;Pocket;Tool;Point;WaferPosition_PR;PR_Peak"; + QueryFilter = "PR Barrier Composition"; + Title = "Photoreflectance 6 in, Photoreflectance 8 in"; + HTML = @"GaN Epi Data\07 - photoreflectance.html"; + break; + case Test.UV: + FileNameWithoutExtension = "uv_iqs_01"; + Header = string.Empty; + QueryFilter = "UV Broken"; + Title = "UV"; + HTML = @"GaN Epi Data\15 - uv 2.1.html"; + break; + case Test.VpdIcpmsAnalyte: + FileNameWithoutExtension = "VPD_iqs_01"; + Header = "Reactor;RunID;RunDate;PartNumber;PocketNumber;WaferScribe;Analyte;Value"; + QueryFilter = "Mg"; + Title = "VpdIcpmsAnalyteData"; + HTML = @""; + break; + case Test.WarpAndBow: + FileNameWithoutExtension = "warp_iqs_01"; + Header = "fDate;fRecipeName;fProductId;g4Scribe;warp;bow;tool;Reactor;Pocket ID;bow_range;BowX;BowY;CenterBow"; + QueryFilter = "BowCenter"; + Title = "Warp and Bow"; + HTML = @"GaN Epi Data\14 - warp.html"; + break; + case Test.VerificationWarpAndBow: + FileNameWithoutExtension = "warp_ver_iqs_01"; + Header = "Part;Process;Date;WaferScribe;totWarp;bow"; + QueryFilter = "Bow Calibration"; + Title = "6 Inch Warp/Bow Daily Verification, 8 Inch Warp/Bow Daily Verification"; + HTML = @"Metrology\19 - warp_cal_daily.html"; + break; + case Test.XRDXY: + FileNameWithoutExtension = "xrd_iqs_NEW_01"; + Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group"; + QueryFilter = "SL Period"; + Title = "XRD XY Raw Data Viewer"; + HTML = @"GaN Epi Data\11 - xrd.html"; + break; + case Test.XRDWeightedAverage: + FileNameWithoutExtension = "xrd_iqs_NEW_01_WtAVG"; + Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;Name;Value;Group"; + //QueryFilter = "Al% Barrier WTAVG"; + QueryFilter = "SL Period WTAVG"; + Title = "XRD Weighted Average Data"; + HTML = @"GaN Epi Data\11 - xrd.html"; + break; + case Test.MonthlyXRD: + FileNameWithoutExtension = "xrd_monthly_ver_iqs_01"; + Header = "Part;Process;Date;TestName;Value"; + QueryFilter = "XRD 2-Theta Position"; + Title = "XRD Monthly Verification"; + HTML = @"Metrology\03 - xrd_verif_monthly.html"; + break; + case Test.WeeklyXRD: + FileNameWithoutExtension = "xrd_weekly_ver_iqs_01"; + Header = "Part;Process;Lot;Date;TestName;Value"; + QueryFilter = "XRD Weekly AL% Center"; + Title = "XRD Weekly Verification"; + HTML = @"Metrology\12 - xrd_verif_weekly.html"; + break; + case Test.JVXRD: + FileNameWithoutExtension = "xrd_iqs_NEW_01"; + Header = "Reactor;fDate;fRecipeName;Lot;pocketNumber;g4Scribe;ToolID;Name;Value;Group"; + QueryFilter = "SL Period"; + Title = "XRD XY Raw Data Viewer"; + HTML = @"GaN Epi Data\11 - xrd.html"; + break; + default: + throw new Exception(); + } + FileName = string.Concat(FileNameWithoutExtension, ".txt"); + } + + public ScopeInfo ShallowCopy() => (ScopeInfo)MemberwiseClone(); + } \ No newline at end of file diff --git a/Adaptation/Shared/Metrology/WS.Attachment.cs b/Adaptation/Shared/Metrology/WS.Attachment.cs index 540e760..ea105ed 100644 --- a/Adaptation/Shared/Metrology/WS.Attachment.cs +++ b/Adaptation/Shared/Metrology/WS.Attachment.cs @@ -1,22 +1,19 @@ -namespace Adaptation.Shared.Metrology +namespace Adaptation.Shared.Metrology; + +public partial class WS { - - public partial class WS + public class Attachment { - public class Attachment + + public string UniqueId { get; set; } + public string DestinationFileName { get; set; } + public string SourceFileName { get; set; } + + public Attachment(string uniqueId, string destinationFileName, string sourceFileName) { - - public string UniqueId { get; set; } - public string DestinationFileName { get; set; } - public string SourceFileName { get; set; } - - public Attachment(string uniqueId, string destinationFileName, string sourceFileName) - { - UniqueId = uniqueId; - DestinationFileName = destinationFileName; - SourceFileName = sourceFileName; - } - + UniqueId = uniqueId; + DestinationFileName = destinationFileName; + SourceFileName = sourceFileName; } } diff --git a/Adaptation/Shared/Metrology/WS.Results.cs b/Adaptation/Shared/Metrology/WS.Results.cs index ada4b97..2d1c603 100644 --- a/Adaptation/Shared/Metrology/WS.Results.cs +++ b/Adaptation/Shared/Metrology/WS.Results.cs @@ -1,33 +1,27 @@ using System.Collections.Generic; using System.Text.Json; -namespace Adaptation.Shared.Metrology +namespace Adaptation.Shared.Metrology; + +public partial class WS { - - public partial class WS + // this class represents the response from the Inbound API endpoint + public class Results { - // this class represents the response from the Inbound API endpoint - public class Results - { - // true or false if data was written to the database - public bool Success { get; set; } + // true or false if data was written to the database + public bool Success { get; set; } - // if true, contains ID of the Header record in the database - public long HeaderID { get; set; } + // if true, contains ID of the Header record in the database + public long HeaderID { get; set; } - // if false, this collection will contain a list of errors - public List Errors { get; set; } + // if false, this collection will contain a list of errors + public List Errors { get; set; } - // this collection will contain a list of warnings, they will not prevent data from being saved - public List Warnings { get; set; } - - // this is just a helper function to make displaying the results easier - public override string ToString() - { - return JsonSerializer.Serialize(this, GetType()); - } - } + // this collection will contain a list of warnings, they will not prevent data from being saved + public List Warnings { get; set; } + // this is just a helper function to make displaying the results easier + public override string ToString() => JsonSerializer.Serialize(this, GetType()); } } \ No newline at end of file diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs index 1fa6b5a..b5ebf4e 100644 --- a/Adaptation/Shared/Metrology/WS.cs +++ b/Adaptation/Shared/Metrology/WS.cs @@ -4,124 +4,119 @@ using System.Net.Http; using System.Text; using System.Text.Json; -namespace Adaptation.Shared.Metrology +namespace Adaptation.Shared.Metrology; + +public partial class WS { - public partial class WS + public static Tuple SendData(string url, object payload, int timeoutSeconds = 120) { - - public static Tuple SendData(string url, object payload, int timeoutSeconds = 120) + Results results = new(); + string resultsJson = string.Empty; + try { - Results results = new Results(); - string resultsJson = string.Empty; - try + string json = JsonSerializer.Serialize(payload, payload.GetType()); + if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains(".")) + throw new Exception("Invalid URL"); + using (HttpClient httpClient = new()) { - string json = JsonSerializer.Serialize(payload, payload.GetType()); - if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains(".")) - throw new Exception("Invalid URL"); - using (HttpClient httpClient = new HttpClient()) - { - httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); - HttpRequestMessage httpRequestMessage = new HttpRequestMessage - { - RequestUri = new Uri(url), - Method = HttpMethod.Post, - Content = new StringContent(json, Encoding.UTF8, "application/json") - }; - HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; - resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; - results = JsonSerializer.Deserialize(resultsJson); - } - if (!results.Success) - results.Errors.Add(results.ToString()); - } - catch (Exception e) - { - Exception exception = e; - StringBuilder stringBuilder = new StringBuilder(); - while (!(exception is null)) - { - stringBuilder.AppendLine(exception.Message); - exception = exception.InnerException; - } - if (results.Errors is null) - results.Errors = new List(); - results.Errors.Add(stringBuilder.ToString()); - } - return new Tuple(resultsJson, results); - } - - // this method is a wrapper for attaching a file to either a header or data record - // URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE - // attachToHeaderId is the ID returned by SendData - // attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry - // fileContents is a byte array with the contents of the file - // fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc - // timeoutSeconds is configured as the request timeout - // this method will either succeed or throw an exception - // also, this has been made synchronous - public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60) - { - using (HttpClient httpClient = new HttpClient()) - { - string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString(); - if (!string.IsNullOrWhiteSpace(attachToDataUniqueId)) - { - requestUrl += "&datauniqueid="; - requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId); - } - requestUrl += "&filename="; // this is just so the web server log shows the filename - requestUrl += System.Net.WebUtility.UrlEncode(fileName); - httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); - - MultipartFormDataContent multipartFormDataContent = new MultipartFormDataContent(); - ByteArrayContent byteArrayContent = new ByteArrayContent(fileContents); - byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream"); - - multipartFormDataContent.Add(byteArrayContent, "attachment", fileName); - - HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result; - - if (httpResponseMessage.IsSuccessStatusCode) - return; - - string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result; - - throw new Exception("Attachment failed: " + resultBody); + HttpRequestMessage httpRequestMessage = new() + { + RequestUri = new Uri(url), + Method = HttpMethod.Post, + Content = new StringContent(json, Encoding.UTF8, "application/json") + }; + HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result; + resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result; + results = JsonSerializer.Deserialize(resultsJson); } + if (!results.Success) + results.Errors.Add(results.ToString()); } - - public static void AttachFiles(string url, long headerID, List headerAttachments = null, List dataAttachments = null) + catch (Exception e) { - try + Exception exception = e; + StringBuilder stringBuilder = new(); + while (exception is not null) { - if (!(headerAttachments is null)) - { - foreach (Attachment attachment in headerAttachments) - AttachFile(url, headerID, "", System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); - } - if (!(dataAttachments is null)) - { - foreach (Attachment attachment in dataAttachments) - AttachFile(url, headerID, attachment.UniqueId, System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); - } - //MessageBox.Show(r.ToString()); - } - catch (Exception e) - { - Exception exception = e; - StringBuilder stringBuilder = new StringBuilder(); - while (!(exception is null)) - { - stringBuilder.AppendLine(exception.Message); - exception = exception.InnerException; - } - //MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error); - throw new Exception(stringBuilder.ToString()); + _ = stringBuilder.AppendLine(exception.Message); + exception = exception.InnerException; } + if (results.Errors is null) + results.Errors = new List(); + results.Errors.Add(stringBuilder.ToString()); } + return new Tuple(resultsJson, results); + } + // this method is a wrapper for attaching a file to either a header or data record + // URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE + // attachToHeaderId is the ID returned by SendData + // attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry + // fileContents is a byte array with the contents of the file + // fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc + // timeoutSeconds is configured as the request timeout + // this method will either succeed or throw an exception + // also, this has been made synchronous + public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60) + { + using HttpClient httpClient = new(); + string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString(); + if (!string.IsNullOrWhiteSpace(attachToDataUniqueId)) + { + requestUrl += "&datauniqueid="; + requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId); + } + requestUrl += "&filename="; // this is just so the web server log shows the filename + requestUrl += System.Net.WebUtility.UrlEncode(fileName); + + httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); + + MultipartFormDataContent multipartFormDataContent = new(); + ByteArrayContent byteArrayContent = new(fileContents); + byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream"); + + multipartFormDataContent.Add(byteArrayContent, "attachment", fileName); + + HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result; + + if (httpResponseMessage.IsSuccessStatusCode) + return; + + string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result; + + throw new Exception("Attachment failed: " + resultBody); + } + + public static void AttachFiles(string url, long headerID, List headerAttachments = null, List dataAttachments = null) + { + try + { + if (headerAttachments is not null) + { + foreach (Attachment attachment in headerAttachments) + AttachFile(url, headerID, "", System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); + } + if (dataAttachments is not null) + { + foreach (Attachment attachment in dataAttachments) + AttachFile(url, headerID, attachment.UniqueId, System.IO.File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName); + } + //MessageBox.Show(r.ToString()); + } + catch (Exception e) + { + Exception exception = e; + StringBuilder stringBuilder = new(); + while (exception is not null) + { + _ = stringBuilder.AppendLine(exception.Message); + exception = exception.InnerException; + } + //MessageBox.Show(msgs.ToString(), "Exception", //MessageBoxButtons.OK, //MessageBoxIcon.Error); + throw new Exception(stringBuilder.ToString()); + } } } \ No newline at end of file diff --git a/Adaptation/Shared/ParameterType.cs b/Adaptation/Shared/ParameterType.cs index 43e548f..cd3fc15 100644 --- a/Adaptation/Shared/ParameterType.cs +++ b/Adaptation/Shared/ParameterType.cs @@ -1,13 +1,10 @@ -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public enum ParameterType { - - public enum ParameterType - { - String = 0, - Integer = 2, - Double = 3, - Boolean = 4, - StructuredType = 5 - } - + String = 0, + Integer = 2, + Double = 3, + Boolean = 4, + StructuredType = 5 } \ No newline at end of file diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs index b33fa81..251d1b4 100644 --- a/Adaptation/Shared/ProcessDataStandardFormat.cs +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -7,420 +7,405 @@ using System.Linq; using System.Text; using System.Text.Json; -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public class ProcessDataStandardFormat { - public class ProcessDataStandardFormat + public const string RecordStart = "RECORD_START"; + + public enum SearchFor { + EquipmentIntegration = 1, + BusinessIntegration = 2, + SystemExport = 3, + Archive = 4 + } - public const string RecordStart = "RECORD_START"; - - public enum SearchFor + public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText) + { + string result; + if (!jsonElements.Any()) + result = string.Empty; + else { - EquipmentIntegration = 1, - BusinessIntegration = 2, - SystemExport = 3, - Archive = 4 - } - - public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText) - { - string result; - if (!jsonElements.Any()) - result = string.Empty; - else + int columns = 0; + List lines; + string endOffset = "E#######T"; + string dataOffset = "D#######T"; + string headerOffset = "H#######T"; + string format = "MM/dd/yyyy HH:mm:ss"; + StringBuilder stringBuilder = new(); + lines = new string[] { "HEADER_TAG\tHEADER_VALUE", "FORMAT\t2.00", "NUMBER_PASSES\t0001", string.Concat("HEADER_OFFSET\t", headerOffset), string.Concat("DATA_OFFSET\t", dataOffset), string.Concat("END_OFFSET\t", endOffset) }.ToList(); + _ = stringBuilder.Append("\"Time\"").Append('\t'); + _ = stringBuilder.Append("\"A_LOGISTICS\"").Append('\t'); + _ = stringBuilder.Append("\"B_LOGISTICS\"").Append('\t'); + for (int i = 0; i < jsonElements.Length;) { - int columns = 0; - List lines; - string endOffset = "E#######T"; - string dataOffset = "D#######T"; - string headerOffset = "H#######T"; - string format = "MM/dd/yyyy HH:mm:ss"; - StringBuilder stringBuilder = new(); - lines = new string[] { "HEADER_TAG\tHEADER_VALUE", "FORMAT\t2.00", "NUMBER_PASSES\t0001", string.Concat("HEADER_OFFSET\t", headerOffset), string.Concat("DATA_OFFSET\t", dataOffset), string.Concat("END_OFFSET\t", endOffset) }.ToList(); - stringBuilder.Append("\"Time\"").Append('\t'); - stringBuilder.Append("\"A_LOGISTICS\"").Append('\t'); - stringBuilder.Append("\"B_LOGISTICS\"").Append('\t'); - for (int i = 0; i < jsonElements.Length;) + foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject()) { - foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject()) - { - columns += 1; - stringBuilder.Append("\"").Append(jsonProperty.Name).Append("\"").Append('\t'); - } - break; + columns += 1; + _ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append('\t'); } - stringBuilder.Remove(stringBuilder.Length - 1, 1); + break; + } + _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); + lines.Add(stringBuilder.ToString()); + for (int i = 0; i < jsonElements.Length; i++) + { + _ = stringBuilder.Clear(); + _ = stringBuilder.Append("0.1").Append('\t'); + _ = stringBuilder.Append('1').Append('\t'); + _ = stringBuilder.Append('2').Append('\t'); + foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject()) + _ = stringBuilder.Append(jsonProperty.Value).Append('\t'); + _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); lines.Add(stringBuilder.ToString()); - for (int i = 0; i < jsonElements.Length; i++) - { - stringBuilder.Clear(); - stringBuilder.Append("0.1").Append('\t'); - stringBuilder.Append("1").Append('\t'); - stringBuilder.Append("2").Append('\t'); - foreach (JsonProperty jsonProperty in jsonElements[i].EnumerateObject()) - stringBuilder.Append(jsonProperty.Value).Append('\t'); - stringBuilder.Remove(stringBuilder.Length - 1, 1); - lines.Add(stringBuilder.ToString()); - } - lines.Add(string.Concat("NUM_DATA_ROWS ", jsonElements.Length.ToString().PadLeft(9, '0'))); - lines.Add(string.Concat("NUM_DATA_COLUMNS ", (columns + 3).ToString().PadLeft(9, '0'))); - lines.Add("DELIMITER ;"); - lines.Add(string.Concat("START_TIME_FORMAT ", format)); - lines.Add(string.Concat("START_TIME ", logistics.DateTimeFromSequence.ToString(format))); //12/26/2019 15:22:44 - lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "A_LOGISTICS")); - lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "B_LOGISTICS")); - if (!string.IsNullOrEmpty(logisticsText)) - lines.Add(logisticsText); - else - { - lines.Add(string.Concat("LOGISTICS_1", '\t', "A_CHAMBER=;A_INFO=", fileRead.EventName, ";A_INFO2=", fileRead.EquipmentType, ";A_JOBID=", fileRead.CellInstanceName, ";A_MES_ENTITY=", fileRead.MesEntity, ";A_MID=", logistics.MID, ";A_NULL_DATA=", fileRead.NullData, ";A_PPID=NO_PPID;A_PROCESS_JOBID=", logistics.ProcessJobID, ";A_PRODUCT=;A_SEQUENCE=", logistics.Sequence, ";A_WAFER_ID=;")); - lines.Add(string.Concat("LOGISTICS_2", '\t', "B_CHAMBER=;B_INFO=", fileRead.EventName, ";B_INFO2=", fileRead.EquipmentType, ";B_JOBID=", fileRead.CellInstanceName, ";B_MES_ENTITY=", fileRead.MesEntity, ";B_MID=", logistics.MID, ";B_NULL_DATA=", fileRead.NullData, ";B_PPID=NO_PPID;B_PROCESS_JOBID=", logistics.ProcessJobID, ";B_PRODUCT=;B_SEQUENCE=", logistics.Sequence, ";B_WAFER_ID=;")); - lines.Add("END_HEADER"); - } - stringBuilder.Clear(); - foreach (string line in lines) - stringBuilder.AppendLine(line); - result = stringBuilder.ToString(); - result = result.Replace(headerOffset, result.IndexOf("NUM_DATA_ROWS").ToString().PadLeft(9, '0')). - Replace(dataOffset, result.IndexOf('"').ToString().PadLeft(9, '0')). - Replace(endOffset, result.Length.ToString().PadLeft(9, '0')); } - return result; - } - - public static Tuple GetLogisticsColumnsAndBody(string reportFullPath, string[] lines = null) - { - string segment; - List body = new(); - StringBuilder logistics = new(); - if (lines is null) - lines = File.ReadAllLines(reportFullPath); - string[] segments; - if (lines.Length < 7) - segments = new string[] { }; - else - segments = lines[6].Trim().Split('\t'); - List columns = new(); - for (int c = 0; c < segments.Length; c++) - { - segment = segments[c].Substring(1, segments[c].Length - 2); - if (!columns.Contains(segment)) - columns.Add(segment); - else - { - for (short i = 1; i < short.MaxValue; i++) - { - segment = string.Concat(segment, "_", i); - if (!columns.Contains(segment)) - { - columns.Add(segment); - break; - } - } - } - } - bool lookForLogistics = false; - for (int r = 7; r < lines.Count(); r++) - { - if (lines[r].StartsWith("NUM_DATA_ROWS")) - lookForLogistics = true; - if (!lookForLogistics) - { - body.Add(lines[r]); - continue; - } - if (lines[r].StartsWith("LOGISTICS_1")) - { - for (int i = r; i < lines.Count(); i++) - { - if (lines[r].StartsWith("END_HEADER")) - break; - logistics.AppendLine(lines[i]); - } - break; - } - } - return new Tuple(logistics.ToString(), columns.ToArray(), body.ToArray()); - } - - public static JsonElement[] GetArray(Tuple pdsf, bool lookForNumbers = false) - { - JsonElement[] results; - string logistics = pdsf.Item1; - string[] columns = pdsf.Item2; - string[] bodyLines = pdsf.Item3; - if (!bodyLines.Any() || !bodyLines[0].Contains('\t')) - results = JsonSerializer.Deserialize("[]"); + lines.Add(string.Concat("NUM_DATA_ROWS ", jsonElements.Length.ToString().PadLeft(9, '0'))); + lines.Add(string.Concat("NUM_DATA_COLUMNS ", (columns + 3).ToString().PadLeft(9, '0'))); + lines.Add("DELIMITER ;"); + lines.Add(string.Concat("START_TIME_FORMAT ", format)); + lines.Add(string.Concat("START_TIME ", logistics.DateTimeFromSequence.ToString(format))); //12/26/2019 15:22:44 + lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "A_LOGISTICS")); + lines.Add(string.Concat("LOGISTICS_COLUMN", '\t', "B_LOGISTICS")); + if (!string.IsNullOrEmpty(logisticsText)) + lines.Add(logisticsText); else { - string value; - string[] segments; - StringBuilder stringBuilder = new(); - foreach (string bodyLine in bodyLines) - { - stringBuilder.Append('{'); - segments = bodyLine.Trim().Split('\t'); - if (!lookForNumbers) - { - for (int c = 1; c < segments.Length; c++) - { - value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\"); - stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\","); - } - } - else - { - for (int c = 1; c < segments.Length; c++) - { - value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\"); - if (string.IsNullOrEmpty(value)) - stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,"); - else if (value.All(char.IsDigit)) - stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(","); - else - stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\","); - } - } - stringBuilder.Remove(stringBuilder.Length - 1, 1); - stringBuilder.AppendLine("},"); - } - stringBuilder.Remove(stringBuilder.Length - 3, 3); - results = JsonSerializer.Deserialize(string.Concat("[", stringBuilder, "]")); + lines.Add(string.Concat("LOGISTICS_1", '\t', "A_CHAMBER=;A_INFO=", fileRead.EventName, ";A_INFO2=", fileRead.EquipmentType, ";A_JOBID=", fileRead.CellInstanceName, ";A_MES_ENTITY=", fileRead.MesEntity, ";A_MID=", logistics.MID, ";A_NULL_DATA=", fileRead.NullData, ";A_PPID=NO_PPID;A_PROCESS_JOBID=", logistics.ProcessJobID, ";A_PRODUCT=;A_SEQUENCE=", logistics.Sequence, ";A_WAFER_ID=;")); + lines.Add(string.Concat("LOGISTICS_2", '\t', "B_CHAMBER=;B_INFO=", fileRead.EventName, ";B_INFO2=", fileRead.EquipmentType, ";B_JOBID=", fileRead.CellInstanceName, ";B_MES_ENTITY=", fileRead.MesEntity, ";B_MID=", logistics.MID, ";B_NULL_DATA=", fileRead.NullData, ";B_PPID=NO_PPID;B_PROCESS_JOBID=", logistics.ProcessJobID, ";B_PRODUCT=;B_SEQUENCE=", logistics.Sequence, ";B_WAFER_ID=;")); + lines.Add("END_HEADER"); } - return results; + _ = stringBuilder.Clear(); + foreach (string line in lines) + _ = stringBuilder.AppendLine(line); + result = stringBuilder.ToString(); + result = result.Replace(headerOffset, result.IndexOf("NUM_DATA_ROWS").ToString().PadLeft(9, '0')). + Replace(dataOffset, result.IndexOf('"').ToString().PadLeft(9, '0')). + Replace(endOffset, result.Length.ToString().PadLeft(9, '0')); } + return result; + } - public static Dictionary> GetDictionary(Tuple pdsf) + public static Tuple GetLogisticsColumnsAndBody(string reportFullPath, string[] lines = null) + { + string segment; + List body = new(); + StringBuilder logistics = new(); + if (lines is null) + lines = File.ReadAllLines(reportFullPath); + string[] segments; + if (lines.Length < 7) + segments = Array.Empty(); + else + segments = lines[6].Trim().Split('\t'); + List columns = new(); + for (int c = 0; c < segments.Length; c++) { - Dictionary> results = new(); + segment = segments[c].Substring(1, segments[c].Length - 2); + if (!columns.Contains(segment)) + columns.Add(segment); + else + { + for (short i = 1; i < short.MaxValue; i++) + { + segment = string.Concat(segment, "_", i); + if (!columns.Contains(segment)) + { + columns.Add(segment); + break; + } + } + } + } + bool lookForLogistics = false; + for (int r = 7; r < lines.Length; r++) + { + if (lines[r].StartsWith("NUM_DATA_ROWS")) + lookForLogistics = true; + if (!lookForLogistics) + { + body.Add(lines[r]); + continue; + } + if (lines[r].StartsWith("LOGISTICS_1")) + { + for (int i = r; i < lines.Length; i++) + { + if (lines[r].StartsWith("END_HEADER")) + break; + _ = logistics.AppendLine(lines[i]); + } + break; + } + } + return new Tuple(logistics.ToString(), columns.ToArray(), body.ToArray()); + } + + public static JsonElement[] GetArray(Tuple pdsf, bool lookForNumbers = false) + { + JsonElement[] results; + string logistics = pdsf.Item1; + string[] columns = pdsf.Item2; + string[] bodyLines = pdsf.Item3; + if (!bodyLines.Any() || !bodyLines[0].Contains('\t')) + results = JsonSerializer.Deserialize("[]"); + else + { + string value; string[] segments; - string[] columns = pdsf.Item2; - string[] bodyLines = pdsf.Item3; - foreach (string column in columns) - results.Add(column, new List()); + StringBuilder stringBuilder = new(); foreach (string bodyLine in bodyLines) { - segments = bodyLine.Split('\t'); - for (int c = 1; c < segments.Length; c++) + _ = stringBuilder.Append('{'); + segments = bodyLine.Trim().Split('\t'); + if (!lookForNumbers) { - if (c >= columns.Length) - continue; - results[columns[c]].Add(segments[c]); - } - } - return results; - } - - public static Tuple>>> GetTestDictionary(Tuple pdsf) - { - Dictionary>> results = new(); - string testColumn = nameof(Test); - Dictionary> keyValuePairs = GetDictionary(pdsf); - if (!keyValuePairs.ContainsKey(testColumn)) - throw new Exception(); - int min; - int max; - Test testKey; - List vs; - string columnKey; - Dictionary> tests = new(); - for (int i = 0; i < keyValuePairs[testColumn].Count; i++) - { - if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test)) - { - if (!results.ContainsKey(test)) + for (int c = 1; c < segments.Length; c++) { - tests.Add(test, new List()); - results.Add(test, new Dictionary>()); + value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\"); + _ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\","); } - tests[test].Add(i); } - } - foreach (KeyValuePair> testKeyValuePair in tests) - { - testKey = testKeyValuePair.Key; - min = testKeyValuePair.Value.Min(); - max = testKeyValuePair.Value.Max() + 1; - foreach (KeyValuePair> keyValuePair in keyValuePairs) - results[testKey].Add(keyValuePair.Key, new List()); - foreach (KeyValuePair> keyValuePair in keyValuePairs) + else { - vs = keyValuePair.Value; - columnKey = keyValuePair.Key; - for (int i = min; i < max; i++) + for (int c = 1; c < segments.Length; c++) { - if (vs.Count > i) - results[testKey][columnKey].Add(vs[i]); + value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\"); + if (string.IsNullOrEmpty(value)) + _ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,"); + else if (value.All(char.IsDigit)) + _ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(','); else - results[testKey][columnKey].Add(string.Empty); + _ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\","); } } + _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); + _ = stringBuilder.AppendLine("},"); } - return new Tuple>>>(pdsf.Item1, results); + _ = stringBuilder.Remove(stringBuilder.Length - 3, 3); + results = JsonSerializer.Deserialize(string.Concat("[", stringBuilder, "]")); } + return results; + } - private static string GetString(SearchFor searchFor, bool addSpaces, char separator = ' ') + public static Dictionary> GetDictionary(Tuple pdsf) + { + Dictionary> results = new(); + string[] segments; + string[] columns = pdsf.Item2; + string[] bodyLines = pdsf.Item3; + foreach (string column in columns) + results.Add(column, new List()); + foreach (string bodyLine in bodyLines) { - if (!addSpaces) - return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), searchFor); - else - return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), separator, searchFor.ToString().Replace("In", string.Concat(separator, "In")).Replace("Ex", string.Concat(separator, "Ex"))); - } - - public static string EquipmentIntegration(bool addSpaces = true, char separator = ' ') - { - return GetString(SearchFor.EquipmentIntegration, addSpaces, separator); - } - - public static string BusinessIntegration(bool addSpaces = true, char separator = ' ') - { - return GetString(SearchFor.BusinessIntegration, addSpaces, separator); - } - - public static string SystemExport(bool addSpaces = true, char separator = ' ') - { - return GetString(SearchFor.SystemExport, addSpaces, separator); - } - - public static string Archive(bool addSpaces = true, char separator = ' ') - { - return GetString(SearchFor.Archive, addSpaces, separator); - } - - public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List names, Dictionary> keyValuePairs, string dateFormat, string timeFormat, List pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List ignoreParameterNames = null) - { - StringBuilder result = new(); - if (ignoreParameterNames is null) - ignoreParameterNames = new List(); - if (useDateTimeFromSequence && !string.IsNullOrEmpty(format)) - throw new Exception(); - else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format)) - throw new Exception(); - string nullData; - const string columnDate = "Date"; - const string columnTime = "Time"; - const string firstDuplicate = "_1"; - result.AppendLine(scopeInfo.Header); - StringBuilder line = new(); - if (logistics.NullData is null) - nullData = string.Empty; - else - nullData = logistics.NullData.ToString(); - int count = (from l in keyValuePairs select l.Value.Count).Min(); - for (int r = 0; r < count; r++) + segments = bodyLine.Split('\t'); + for (int c = 1; c < segments.Length; c++) { - line.Clear(); - line.Append("!"); - foreach (KeyValuePair> keyValuePair in keyValuePairs) - { - if (!names.Contains(keyValuePair.Key)) - continue; - if (ignoreParameterNames.Contains(keyValuePair.Key)) - continue; - if (pairedParameterNames.Contains(keyValuePair.Key)) - { - if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData) - continue; - else - result.Append(line).Append(keyValuePair.Key).Append(';').AppendLine(keyValuePair.Value[r]); - } - else - { - if (useDateTimeFromSequence && keyValuePair.Key == columnDate) - line.Append(logistics.DateTimeFromSequence.ToString(dateFormat)); - else if (useDateTimeFromSequence && keyValuePair.Key == columnTime) - line.Append(logistics.DateTimeFromSequence.ToString(timeFormat)); - else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length) - line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat)); - else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length) - line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat)); - else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData) - line.Append(nullData); - else - line.Append(keyValuePair.Value[r]); - line.Append(';'); - } - } - if (!pairedParameterNames.Any()) - { - line.Remove(line.Length - 1, 1); - result.AppendLine(line.ToString()); - } - } - return result.ToString(); - } - - public static List PDSFToFixedWidth(string reportFullPath) - { - List results = new(); - if (!File.Exists(reportFullPath)) - throw new Exception(); - int[] group; - string line; - int startsAt = 0; - string[] segments; - int? currentGroup = null; - char inputSeperator = '\t'; - char outputSeperator = '\t'; - List vs = new(); - List groups = new(); - string[] lines = File.ReadAllLines(reportFullPath); - StringBuilder stringBuilder = new(); - for (int i = 0; i < lines.Length; i++) - { - if (string.IsNullOrEmpty(lines[i])) + if (c >= columns.Length) continue; - segments = lines[i].Split(inputSeperator); - if (currentGroup is null) - currentGroup = segments.Length; - if (segments.Length != currentGroup) + results[columns[c]].Add(segments[c]); + } + } + return results; + } + + public static Tuple>>> GetTestDictionary(Tuple pdsf) + { + Dictionary>> results = new(); + string testColumn = nameof(Test); + Dictionary> keyValuePairs = GetDictionary(pdsf); + if (!keyValuePairs.ContainsKey(testColumn)) + throw new Exception(); + int min; + int max; + Test testKey; + List vs; + string columnKey; + Dictionary> tests = new(); + for (int i = 0; i < keyValuePairs[testColumn].Count; i++) + { + if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test)) + { + if (!results.ContainsKey(test)) { - currentGroup = segments.Length; - groups.Add(new int[] { startsAt, i - 1 }); - startsAt = i; + tests.Add(test, new List()); + results.Add(test, new Dictionary>()); + } + tests[test].Add(i); + } + } + foreach (KeyValuePair> testKeyValuePair in tests) + { + testKey = testKeyValuePair.Key; + min = testKeyValuePair.Value.Min(); + max = testKeyValuePair.Value.Max() + 1; + foreach (KeyValuePair> keyValuePair in keyValuePairs) + results[testKey].Add(keyValuePair.Key, new List()); + foreach (KeyValuePair> keyValuePair in keyValuePairs) + { + vs = keyValuePair.Value; + columnKey = keyValuePair.Key; + for (int i = min; i < max; i++) + { + if (vs.Count > i) + results[testKey][columnKey].Add(vs[i]); + else + results[testKey][columnKey].Add(string.Empty); } } - if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup) - groups.Add(new int[] { lines.Length - 1, lines.Length - 1 }); - for (int g = 0; g < groups.Count; g++) + } + return new Tuple>>>(pdsf.Item1, results); + } + + private static string GetString(SearchFor searchFor, bool addSpaces, char separator = ' ') + { + if (!addSpaces) + return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), searchFor); + else + return string.Concat(((int)searchFor).ToString().PadLeft(2, '0'), separator, searchFor.ToString().Replace("In", string.Concat(separator, "In")).Replace("Ex", string.Concat(separator, "Ex"))); + } + + public static string EquipmentIntegration(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.EquipmentIntegration, addSpaces, separator); + + public static string BusinessIntegration(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.BusinessIntegration, addSpaces, separator); + + public static string SystemExport(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.SystemExport, addSpaces, separator); + + public static string Archive(bool addSpaces = true, char separator = ' ') => GetString(SearchFor.Archive, addSpaces, separator); + + public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List names, Dictionary> keyValuePairs, string dateFormat, string timeFormat, List pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List ignoreParameterNames = null) + { + StringBuilder result = new(); + if (ignoreParameterNames is null) + ignoreParameterNames = new List(); + if (useDateTimeFromSequence && !string.IsNullOrEmpty(format)) + throw new Exception(); + else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format)) + throw new Exception(); + string nullData; + const string columnDate = "Date"; + const string columnTime = "Time"; + const string firstDuplicate = "_1"; + _ = result.AppendLine(scopeInfo.Header); + StringBuilder line = new(); + if (logistics.NullData is null) + nullData = string.Empty; + else + nullData = logistics.NullData.ToString(); + int count = (from l in keyValuePairs select l.Value.Count).Min(); + for (int r = 0; r < count; r++) + { + _ = line.Clear(); + _ = line.Append('!'); + foreach (KeyValuePair> keyValuePair in keyValuePairs) { - vs.Clear(); - group = groups[g]; - line = lines[group[0]]; + if (!names.Contains(keyValuePair.Key)) + continue; + if (ignoreParameterNames.Contains(keyValuePair.Key)) + continue; + if (pairedParameterNames.Contains(keyValuePair.Key)) + { + if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData) + continue; + else + _ = result.Append(line).Append(keyValuePair.Key).Append(';').AppendLine(keyValuePair.Value[r]); + } + else + { + if (useDateTimeFromSequence && keyValuePair.Key == columnDate) + _ = line.Append(logistics.DateTimeFromSequence.ToString(dateFormat)); + else if (useDateTimeFromSequence && keyValuePair.Key == columnTime) + _ = line.Append(logistics.DateTimeFromSequence.ToString(timeFormat)); + else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length) + _ = line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat)); + else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length) + _ = line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat)); + else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData) + _ = line.Append(nullData); + else + _ = line.Append(keyValuePair.Value[r]); + _ = line.Append(';'); + } + } + if (!pairedParameterNames.Any()) + { + _ = line.Remove(line.Length - 1, 1); + _ = result.AppendLine(line.ToString()); + } + } + return result.ToString(); + } + + public static List PDSFToFixedWidth(string reportFullPath) + { + List results = new(); + if (!File.Exists(reportFullPath)) + throw new Exception(); + int[] group; + string line; + int startsAt = 0; + string[] segments; + int? currentGroup = null; + char inputSeperator = '\t'; + char outputSeperator = '\t'; + List vs = new(); + List groups = new(); + string[] lines = File.ReadAllLines(reportFullPath); + StringBuilder stringBuilder = new(); + for (int i = 0; i < lines.Length; i++) + { + if (string.IsNullOrEmpty(lines[i])) + continue; + segments = lines[i].Split(inputSeperator); + if (currentGroup is null) + currentGroup = segments.Length; + if (segments.Length != currentGroup) + { + currentGroup = segments.Length; + groups.Add(new int[] { startsAt, i - 1 }); + startsAt = i; + } + } + if (startsAt == lines.Length - 1 && lines[0].Split(inputSeperator).Length != currentGroup) + groups.Add(new int[] { lines.Length - 1, lines.Length - 1 }); + for (int g = 0; g < groups.Count; g++) + { + vs.Clear(); + group = groups[g]; + line = lines[group[0]]; + segments = line.Split(inputSeperator); + for (int s = 0; s < segments.Length; s++) + vs.Add(segments[s].Length); + for (int i = group[0]; i <= group[1]; i++) + { + line = lines[i]; segments = line.Split(inputSeperator); for (int s = 0; s < segments.Length; s++) - vs.Add(segments[s].Length); - for (int i = group[0]; i <= group[1]; i++) { - line = lines[i]; - segments = line.Split(inputSeperator); - for (int s = 0; s < segments.Length; s++) - { - if (vs[s] < segments[s].Length) - vs[s] = segments[s].Length; - } + if (vs[s] < segments[s].Length) + vs[s] = segments[s].Length; } - stringBuilder.Clear(); - for (int s = 0; s < segments.Length; s++) - stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator); - stringBuilder.Remove(stringBuilder.Length - 1, 1); - results.Add(stringBuilder.ToString()); - for (int i = group[0]; i <= group[1]; i++) - { - line = lines[i]; - stringBuilder.Clear(); - segments = line.Split(inputSeperator); - for (int s = 0; s < segments.Length; s++) - stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator); - stringBuilder.Remove(stringBuilder.Length - 1, 1); - results.Add(stringBuilder.ToString()); - } - results.Add(string.Empty); } - return results; + _ = stringBuilder.Clear(); + for (int s = 0; s < segments.Length; s++) + _ = stringBuilder.Append((s + 1).ToString().PadLeft(vs[s], ' ')).Append(outputSeperator); + _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); + results.Add(stringBuilder.ToString()); + for (int i = group[0]; i <= group[1]; i++) + { + line = lines[i]; + _ = stringBuilder.Clear(); + segments = line.Split(inputSeperator); + for (int s = 0; s < segments.Length; s++) + _ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeperator); + _ = stringBuilder.Remove(stringBuilder.Length - 1, 1); + results.Add(stringBuilder.ToString()); + } + results.Add(string.Empty); } - + return results; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IDescription.cs b/Adaptation/Shared/Properties/IDescription.cs index c45a6d1..93e6de5 100644 --- a/Adaptation/Shared/Properties/IDescription.cs +++ b/Adaptation/Shared/Properties/IDescription.cs @@ -1,13 +1,10 @@ -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface IDescription { - public interface IDescription - { - - int Test { get; } - int Count { get; } - int Index { get; } - - } + int Test { get; } + int Count { get; } + int Index { get; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IFileRead.cs b/Adaptation/Shared/Properties/IFileRead.cs index 5f30585..2e85ac9 100644 --- a/Adaptation/Shared/Properties/IFileRead.cs +++ b/Adaptation/Shared/Properties/IFileRead.cs @@ -1,20 +1,17 @@ -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface IFileRead { - - public interface IFileRead - { - bool IsEvent { get; } - string NullData { get; } - string MesEntity { get; } - bool IsEAFHosted { get; } - string EventName { get; } - string EquipmentType { get; } - string ReportFullPath { get; } - string CellInstanceName { get; } - string ExceptionSubject { get; } - bool UseCyclicalForDescription { get; } - string CellInstanceConnectionName { get; } - string ParameterizedModelObjectDefinitionType { get; } - } - + bool IsEvent { get; } + string NullData { get; } + string MesEntity { get; } + bool IsEAFHosted { get; } + string EventName { get; } + string EquipmentType { get; } + string ReportFullPath { get; } + string CellInstanceName { get; } + string ExceptionSubject { get; } + bool UseCyclicalForDescription { get; } + string CellInstanceConnectionName { get; } + string ParameterizedModelObjectDefinitionType { get; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/ILogistics.cs b/Adaptation/Shared/Properties/ILogistics.cs index 9be989c..dc1a106 100644 --- a/Adaptation/Shared/Properties/ILogistics.cs +++ b/Adaptation/Shared/Properties/ILogistics.cs @@ -1,25 +1,22 @@ using System; using System.Collections.Generic; -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface ILogistics { - public interface ILogistics - { - - public object NullData { get; } - public string JobID { get; } //CellName - public long Sequence { get; } //Ticks - public DateTime DateTimeFromSequence { get; } - public double TotalSecondsSinceLastWriteTimeFromSequence { get; } - public string MesEntity { get; } //SPC - public string ReportFullPath { get; } //Extract file - public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics) - public string MID { get; set; } //Lot & Pocket || Lot - public List Tags { get; set; } - public List Logistics1 { get; set; } - public List Logistics2 { get; set; } - - } + public object NullData { get; } + public string JobID { get; } //CellName + public long Sequence { get; } //Ticks + public DateTime DateTimeFromSequence { get; } + public double TotalSecondsSinceLastWriteTimeFromSequence { get; } + public string MesEntity { get; } //SPC + public string ReportFullPath { get; } //Extract file + public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics) + public string MID { get; set; } //Lot & Pocket || Lot + public List Tags { get; set; } + public List Logistics1 { get; set; } + public List Logistics2 { get; set; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/ILogistics2.cs b/Adaptation/Shared/Properties/ILogistics2.cs index d20d326..ae8a15a 100644 --- a/Adaptation/Shared/Properties/ILogistics2.cs +++ b/Adaptation/Shared/Properties/ILogistics2.cs @@ -1,17 +1,14 @@ -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface ILogistics2 { - public interface ILogistics2 - { - - public string MID { get; } - public string RunNumber { get; } - public string SatelliteGroup { get; } - public string PartNumber { get; } - public string PocketNumber { get; } - public string WaferLot { get; } - public string Recipe { get; } - - } + public string MID { get; } + public string RunNumber { get; } + public string SatelliteGroup { get; } + public string PartNumber { get; } + public string PocketNumber { get; } + public string WaferLot { get; } + public string Recipe { get; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IProcessData.cs b/Adaptation/Shared/Properties/IProcessData.cs index 29f83af..e378288 100644 --- a/Adaptation/Shared/Properties/IProcessData.cs +++ b/Adaptation/Shared/Properties/IProcessData.cs @@ -1,13 +1,10 @@ using System.Collections.Generic; -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface IProcessData { - public interface IProcessData - { - - List Details { get; } - - } + List Details { get; } } \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IScopeInfo.cs b/Adaptation/Shared/Properties/IScopeInfo.cs index d3e59f6..10d7385 100644 --- a/Adaptation/Shared/Properties/IScopeInfo.cs +++ b/Adaptation/Shared/Properties/IScopeInfo.cs @@ -1,20 +1,17 @@ using System; -namespace Adaptation.Shared.Properties +namespace Adaptation.Shared.Properties; + +public interface IScopeInfo { - public interface IScopeInfo - { - - Enum Enum { get; } - string HTML { get; } - string Title { get; } - string FileName { get; } - int TestValue { get; } - string Header { get; } - string QueryFilter { get; } - string FileNameWithoutExtension { get; } - - } + Enum Enum { get; } + string HTML { get; } + string Title { get; } + string FileName { get; } + int TestValue { get; } + string Header { get; } + string QueryFilter { get; } + string FileNameWithoutExtension { get; } } \ No newline at end of file diff --git a/Adaptation/Shared/Test.cs b/Adaptation/Shared/Test.cs index c833c82..aeb4bea 100644 --- a/Adaptation/Shared/Test.cs +++ b/Adaptation/Shared/Test.cs @@ -1,57 +1,58 @@ -namespace Adaptation.Shared +namespace Adaptation.Shared; + +public enum Test { - - public enum Test - { - AFMRoughness = 34, - BioRadQS408M = 25, - BioRadStratus = 26, - BreakdownVoltageCenter = 0, - BreakdownVoltageEdge = 1, - BreakdownVoltageMiddle8in = 2, - CandelaKlarfDC = 6, - CandelaLaser = 36, - CandelaProdU = 39, - CandelaPSL = 38, - CandelaVerify = 37, - CDE = 24, - CV = 3, - DailyRPMAverage = 19, - DailyRPMPLRatio = 20, - DailyRPMXY = 18, - Denton = 9, - DiffusionLength = 45, - Hall = 10, - HgCV = 23, - Lehighton = 13, - Microscope = 46, - MonthlyCV = 4, - MonthlyHall = 11, - MonthlyXRD = 32, - Photoreflectance = 22, - PlatoA = 48, //Largest - RPMAverage = 16, - RPMPLRatio = 17, - RPMXY = 15, - SP1 = 8, - Tencor = 7, - UV = 35, - VerificationLehighton = 14, - VerificationRPM = 21, - VerificationWarpAndBow = 29, - VpdIcpmsAnalyte = 27, - WarpAndBow = 28, - WeeklyCV = 5, - WeeklyHall = 12, - WeeklyXRD = 33, - WeeklyXRDAIcomp = 40, - WeeklyXRDFWHM002 = 41, - WeeklyXRDFWHM105 = 42, - WeeklyXRDSLStks = 43, - WeeklyXRDXRR = 44, - XRDWeightedAverage = 31, - JVXRD = 47, - XRDXY = 30 - } - + AFMRoughness = 34, + BioRadQS408M = 25, + BioRadStratus = 26, + BreakdownVoltageCenter = 0, + BreakdownVoltageEdge = 1, + BreakdownVoltageMiddle8in = 2, + CandelaKlarfDC = 6, + CandelaLaser = 36, + CandelaProdU = 39, + CandelaPSL = 38, + CandelaVerify = 37, + CDE = 24, + CV = 3, + DailyRPMAverage = 19, + DailyRPMPLRatio = 20, + DailyRPMXY = 18, + Denton = 9, + DiffusionLength = 45, + GRATXTCenter = 51, + GRATXTEdge = 52, //Largest + GrowthRateXML = 50, + Hall = 10, + HgCV = 23, + JVXRD = 47, + Lehighton = 13, + LogbookCAC = 49, + Microscope = 46, + MonthlyCV = 4, + MonthlyHall = 11, + MonthlyXRD = 32, + Photoreflectance = 22, + PlatoA = 48, + RPMAverage = 16, + RPMPLRatio = 17, + RPMXY = 15, + SP1 = 8, + Tencor = 7, + UV = 35, + VerificationLehighton = 14, + VerificationRPM = 21, + VerificationWarpAndBow = 29, + VpdIcpmsAnalyte = 27, + WarpAndBow = 28, + WeeklyCV = 5, + WeeklyHall = 12, + WeeklyXRD = 33, + WeeklyXRDAIcomp = 40, + WeeklyXRDFWHM002 = 41, + WeeklyXRDFWHM105 = 42, + WeeklyXRDSLStks = 43, + WeeklyXRDXRR = 44, + XRDWeightedAverage = 31, + XRDXY = 30, } \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD2.cs index 6033f64..31704ec 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD2.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD2.cs @@ -7,60 +7,55 @@ using System.Diagnostics; using System.IO; using System.Reflection; -namespace _Tests.CreateSelfDescription.Staging.v2_36_3 +namespace _Tests.CreateSelfDescription.Staging.v2_36_3; + +[TestClass] +public class BIORAD2 : EAFLoggingUnitTesting { + internal static BIORAD2 EAFLoggingUnitTesting { get; private set; } - [TestClass] - public class BIORAD2 : EAFLoggingUnitTesting + public BIORAD2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } - private static BIORAD2 _EAFLoggingUnitTesting; - internal static BIORAD2 EAFLoggingUnitTesting => _EAFLoggingUnitTesting; + public BIORAD2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } - public BIORAD2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) - { - if (_EAFLoggingUnitTesting is null) - throw new Exception(); - } + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new BIORAD2(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } - public BIORAD2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) - { - } - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - if (_EAFLoggingUnitTesting is null) - _EAFLoggingUnitTesting = new BIORAD2(testContext); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); - string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); - File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); - File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); - } - - [ClassCleanup()] - public static void ClassCleanup() - { - if (!(_EAFLoggingUnitTesting.Logger is null)) - _EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (!(_EAFLoggingUnitTesting is null)) - _EAFLoggingUnitTesting.Dispose(); - } - - [TestMethod] - public void Staging__v2_36_3__BIORAD2__QS408M() - { - string check = "*.txt"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + [TestMethod] + public void Staging__v2_36_3__BIORAD2__QS408M() + { + string check = "*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD3.cs index 4470312..7a40096 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD3.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/BIORAD3.cs @@ -7,60 +7,55 @@ using System.Diagnostics; using System.IO; using System.Reflection; -namespace _Tests.CreateSelfDescription.Staging.v2_36_3 +namespace _Tests.CreateSelfDescription.Staging.v2_36_3; + +[TestClass] +public class BIORAD3 : EAFLoggingUnitTesting { + internal static BIORAD3 EAFLoggingUnitTesting { get; private set; } - [TestClass] - public class BIORAD3 : EAFLoggingUnitTesting + public BIORAD3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } - private static BIORAD3 _EAFLoggingUnitTesting; - internal static BIORAD3 EAFLoggingUnitTesting => _EAFLoggingUnitTesting; + public BIORAD3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } - public BIORAD3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) - { - if (_EAFLoggingUnitTesting is null) - throw new Exception(); - } + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new BIORAD3(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } - public BIORAD3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) - { - } - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - if (_EAFLoggingUnitTesting is null) - _EAFLoggingUnitTesting = new BIORAD3(testContext); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); - string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); - File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); - File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); - } - - [ClassCleanup()] - public static void ClassCleanup() - { - if (!(_EAFLoggingUnitTesting.Logger is null)) - _EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (!(_EAFLoggingUnitTesting is null)) - _EAFLoggingUnitTesting.Dispose(); - } - - [TestMethod] - public void Staging__v2_36_3__BIORAD3__QS408M() - { - string check = "*.txt"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + [TestMethod] + public void Staging__v2_36_3__BIORAD3__QS408M() + { + string check = "*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRQS408M.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRQS408M.cs index b06c84a..acb114f 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRQS408M.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.36.3/MET08THFTIRQS408M.cs @@ -7,172 +7,167 @@ using System.Diagnostics; using System.IO; using System.Reflection; -namespace _Tests.CreateSelfDescription.Staging.v2_36_3 +namespace _Tests.CreateSelfDescription.Staging.v2_36_3; + +[TestClass] +public class MET08THFTIRQS408M : EAFLoggingUnitTesting { + internal static MET08THFTIRQS408M EAFLoggingUnitTesting { get; private set; } - [TestClass] - public class MET08THFTIRQS408M : EAFLoggingUnitTesting + public MET08THFTIRQS408M() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } - private static MET08THFTIRQS408M _EAFLoggingUnitTesting; - internal static MET08THFTIRQS408M EAFLoggingUnitTesting => _EAFLoggingUnitTesting; + public MET08THFTIRQS408M(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } - public MET08THFTIRQS408M() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) - { - if (_EAFLoggingUnitTesting is null) - throw new Exception(); - } + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new MET08THFTIRQS408M(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } - public MET08THFTIRQS408M(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) - { - } + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - if (_EAFLoggingUnitTesting is null) - _EAFLoggingUnitTesting = new MET08THFTIRQS408M(testContext); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); - string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); - File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); - File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M() + { + string check = "~IsXToOpenInsightMetrologyViewer"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [ClassCleanup()] - public static void ClassCleanup() - { - if (!(_EAFLoggingUnitTesting.Logger is null)) - _EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); - if (!(_EAFLoggingUnitTesting is null)) - _EAFLoggingUnitTesting.Dispose(); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_() + { + string check = "~IsXToIQSSi"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M() - { - string check = "~IsXToOpenInsightMetrologyViewer"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__() + { + string check = "~IsXToOpenInsight"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_() - { - string check = "~IsXToIQSSi"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___() + { + string check = "~IsXToOpenInsightMetrologyViewerAttachments"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__() - { - string check = "~IsXToOpenInsight"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____() + { + string check = "~IsXToAPC"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___() - { - string check = "~IsXToOpenInsightMetrologyViewerAttachments"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____() + { + string check = "~IsXToSPaCe"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____() - { - string check = "~IsXToAPC"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______() + { + string check = "~IsXToArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____() - { - string check = "~IsXToSPaCe"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______() - { - string check = "~IsXToArchive"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______() - { - string check = "~IsArchive"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________() - { - string check = "~IsDummy"; - MethodBase methodBase = new StackFrame().GetMethod(); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); - string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); - Assert.IsTrue(fileNameAndJson[1].Contains(check)); - File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); - IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); - Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); - _EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); - } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______() + { + string check = "~IsArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________() + { + string check = "~IsDummy"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } } diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD2.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD2.cs new file mode 100644 index 0000000..616e864 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD2.cs @@ -0,0 +1,61 @@ +using Adaptation.Shared.Methods; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shared; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace _Tests.CreateSelfDescription.Staging.v2_39_0; + +[TestClass] +public class BIORAD2 : EAFLoggingUnitTesting +{ + internal static BIORAD2 EAFLoggingUnitTesting { get; private set; } + + public BIORAD2() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD2(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new BIORAD2(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + + [TestMethod] + public void Staging__v2_39_0__BIORAD2__QS408M() + { + string check = "*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD3.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD3.cs new file mode 100644 index 0000000..9241681 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/BIORAD3.cs @@ -0,0 +1,61 @@ +using Adaptation.Shared.Methods; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shared; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace _Tests.CreateSelfDescription.Staging.v2_39_0; + +[TestClass] +public class BIORAD3 : EAFLoggingUnitTesting +{ + internal static BIORAD3 EAFLoggingUnitTesting { get; private set; } + + public BIORAD3() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public BIORAD3(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new BIORAD3(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + + [TestMethod] + public void Staging__v2_39_0__BIORAD3__QS408M() + { + string check = "*.txt"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRQS408M.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRQS408M.cs new file mode 100644 index 0000000..c485851 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.0/MET08THFTIRQS408M.cs @@ -0,0 +1,173 @@ +using Adaptation.Shared.Methods; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Shared; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace _Tests.CreateSelfDescription.Staging.v2_39_0; + +[TestClass] +public class MET08THFTIRQS408M : EAFLoggingUnitTesting +{ + internal static MET08THFTIRQS408M EAFLoggingUnitTesting { get; private set; } + + public MET08THFTIRQS408M() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public MET08THFTIRQS408M(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + if (EAFLoggingUnitTesting is null) + EAFLoggingUnitTesting = new MET08THFTIRQS408M(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + if (EAFLoggingUnitTesting.Logger is not null) + EAFLoggingUnitTesting.Logger.LogInformation("Cleanup"); + if (EAFLoggingUnitTesting is not null) + EAFLoggingUnitTesting.Dispose(); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M() + { + string check = "~IsXToOpenInsightMetrologyViewer"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_() + { + string check = "~IsXToIQSSi"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M__() + { + string check = "~IsXToOpenInsight"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M___() + { + string check = "~IsXToOpenInsightMetrologyViewerAttachments"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M____() + { + string check = "~IsXToAPC"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_____() + { + string check = "~IsXToSPaCe"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M______() + { + string check = "~IsXToArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_______() + { + string check = "~IsArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M________() + { + string check = "~IsDummy"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] fileNameAndJson = EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + IFileRead fileRead = EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName)); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD2.cs b/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD2.cs index 4f2d707..a99706b 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD2.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD2.cs @@ -1,29 +1,23 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace _Tests.Extract.Staging.v2_36_3 +namespace _Tests.Extract.Staging.v2_36_3; + +[TestClass] +public class BIORAD2 { - [TestClass] - public class BIORAD2 + private static CreateSelfDescription.Staging.v2_36_3.BIORAD2 _BIORAD2; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) { - - private static CreateSelfDescription.Staging.v2_36_3.BIORAD2 _BIORAD2; - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - CreateSelfDescription.Staging.v2_36_3.BIORAD2.ClassInitialize(testContext); - _BIORAD2 = CreateSelfDescription.Staging.v2_36_3.BIORAD2.EAFLoggingUnitTesting; - } - - [TestMethod] - public void Staging__v2_36_3__BIORAD2__QS408M() - { - _BIORAD2.Staging__v2_36_3__BIORAD2__QS408M(); - } - + CreateSelfDescription.Staging.v2_36_3.BIORAD2.ClassInitialize(testContext); + _BIORAD2 = CreateSelfDescription.Staging.v2_36_3.BIORAD2.EAFLoggingUnitTesting; } + [TestMethod] + public void Staging__v2_36_3__BIORAD2__QS408M() => _BIORAD2.Staging__v2_36_3__BIORAD2__QS408M(); + } // dotnet build --runtime win-x64 diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD3.cs b/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD3.cs index ff6b1c3..8225cf5 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD3.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.3/BIORAD3.cs @@ -8,58 +8,52 @@ using System.IO; using System.Reflection; using System.Text.Json; -namespace _Tests.Extract.Staging.v2_36_3 +namespace _Tests.Extract.Staging.v2_36_3; + +[TestClass] +public class BIORAD3 { - [TestClass] - public class BIORAD3 + private static CreateSelfDescription.Staging.v2_36_3.BIORAD3 _BIORAD3; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) { + CreateSelfDescription.Staging.v2_36_3.BIORAD3.ClassInitialize(testContext); + _BIORAD3 = CreateSelfDescription.Staging.v2_36_3.BIORAD3.EAFLoggingUnitTesting; + } - private static CreateSelfDescription.Staging.v2_36_3.BIORAD3 _BIORAD3; - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - CreateSelfDescription.Staging.v2_36_3.BIORAD3.ClassInitialize(testContext); - _BIORAD3 = CreateSelfDescription.Staging.v2_36_3.BIORAD3.EAFLoggingUnitTesting; - } - - [TestMethod] - public void Staging__v2_36_3__BIORAD3__QS408M() - { - _BIORAD3.Staging__v2_36_3__BIORAD3__QS408M(); - } - - [TestMethod] - public void Staging__v2_36_3__BIORAD3__QS408M637406016892454000__ReactorAndRDS() - { - DateTime dateTime; - string check = "*.txt"; - _BIORAD3.Staging__v2_36_3__BIORAD3__QS408M(); - MethodBase methodBase = new StackFrame().GetMethod(); - string[] variables = _BIORAD3.AdaptationTesting.GetVariables(methodBase, check); - Tuple pdsf = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]); - IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); - Tuple> extractResult = fileRead.ReExtract(); - Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); - Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); - Assert.IsNotNull(extractResult.Item4); - Logistics logistics = new Logistics(fileRead); - dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, string.Empty); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); - dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, "Tue Nov 10 12:03:56 1970"); - Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); - Tuple pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); - Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew); - string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew); - Helpers.Metrology.CompareSaveJSON(variables[5], json); - Assert.IsTrue(json[0] == json[1], "Item2 check!"); - string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew); - Helpers.Metrology.CompareSaveTSV(variables[5], join); - Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); - Helpers.Metrology.UpdatePassDirectory(variables[2]); - } + [TestMethod] + public void Staging__v2_36_3__BIORAD3__QS408M() => _BIORAD3.Staging__v2_36_3__BIORAD3__QS408M(); + [TestMethod] + public void Staging__v2_36_3__BIORAD3__QS408M637406016892454000__ReactorAndRDS() + { + DateTime dateTime; + string check = "*.txt"; + _BIORAD3.Staging__v2_36_3__BIORAD3__QS408M(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD3.AdaptationTesting.GetVariables(methodBase, check); + Tuple pdsf = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]); + IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Tuple> extractResult = fileRead.ReExtract(); + Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); + Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); + Assert.IsNotNull(extractResult.Item4); + Logistics logistics = new(fileRead); + dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, "Tue Nov 10 12:03:56 1970"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Tuple pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); + Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew); + string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew); + Helpers.Metrology.CompareSaveJSON(variables[5], json); + Assert.IsTrue(json[0] == json[1], "Item2 check!"); + string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew); + Helpers.Metrology.CompareSaveTSV(variables[5], join); + Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + Helpers.Metrology.UpdatePassDirectory(variables[2]); } } diff --git a/Adaptation/_Tests/Extract/Staging/v2.36.3/MET08THFTIRQS408M.cs b/Adaptation/_Tests/Extract/Staging/v2.36.3/MET08THFTIRQS408M.cs index 33ced17..83af04e 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.36.3/MET08THFTIRQS408M.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.36.3/MET08THFTIRQS408M.cs @@ -1,77 +1,47 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -namespace _Tests.Extract.Staging.v2_36_3 +namespace _Tests.Extract.Staging.v2_36_3; + +[TestClass] +public class MET08THFTIRQS408M { - [TestClass] - public class MET08THFTIRQS408M + private static CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M _MET08THFTIRQS408M; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) { - - private static CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M _MET08THFTIRQS408M; - - [ClassInitialize] - public static void ClassInitialize(TestContext testContext) - { - CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M.ClassInitialize(testContext); - _MET08THFTIRQS408M = CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M.EAFLoggingUnitTesting; - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______(); - } - - [TestMethod] - public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________() - { - _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________(); - } - + CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M.ClassInitialize(testContext); + _MET08THFTIRQS408M = CreateSelfDescription.Staging.v2_36_3.MET08THFTIRQS408M.EAFLoggingUnitTesting; } + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M__(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M___(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M____(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_____(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M______(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M_______(); + + [TestMethod] + public void Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________() => _MET08THFTIRQS408M.Staging__v2_36_3__MET08THFTIRQS408M__MET08THFTIRQS408M________(); + } // dotnet build --runtime win-x64 diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD2.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD2.cs new file mode 100644 index 0000000..55de76b --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD2.cs @@ -0,0 +1,21 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace _Tests.Extract.Staging.v2_39_0; + +[TestClass] +public class BIORAD2 +{ + + private static CreateSelfDescription.Staging.v2_39_0.BIORAD2 _BIORAD2; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_0.BIORAD2.ClassInitialize(testContext); + _BIORAD2 = CreateSelfDescription.Staging.v2_39_0.BIORAD2.EAFLoggingUnitTesting; + } + + [TestMethod] + public void Staging__v2_39_0__BIORAD2__QS408M() => _BIORAD2.Staging__v2_39_0__BIORAD2__QS408M(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD3.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD3.cs new file mode 100644 index 0000000..ac9c5eb --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/BIORAD3.cs @@ -0,0 +1,59 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Text.Json; + +namespace _Tests.Extract.Staging.v2_39_0; + +[TestClass] +public class BIORAD3 +{ + + private static CreateSelfDescription.Staging.v2_39_0.BIORAD3 _BIORAD3; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_0.BIORAD3.ClassInitialize(testContext); + _BIORAD3 = CreateSelfDescription.Staging.v2_39_0.BIORAD3.EAFLoggingUnitTesting; + } + + [TestMethod] + public void Staging__v2_39_0__BIORAD3__QS408M() => _BIORAD3.Staging__v2_39_0__BIORAD3__QS408M(); + + [TestMethod] + public void Staging__v2_39_0__BIORAD3__QS408M637406016892454000__ReactorAndRDS() + { + DateTime dateTime; + string check = "*.txt"; + _BIORAD3.Staging__v2_39_0__BIORAD3__QS408M(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _BIORAD3.AdaptationTesting.GetVariables(methodBase, check); + Tuple pdsf = Helpers.Metrology.GetLogisticsColumnsAndBody(variables[2], variables[4]); + IFileRead fileRead = _BIORAD3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Tuple> extractResult = fileRead.ReExtract(); + Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); + Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); + Assert.IsNotNull(extractResult.Item4); + Logistics logistics = new(fileRead); + dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, string.Empty); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + dateTime = Adaptation.FileHandlers.QS408M.ProcessData.GetDateTime(logistics, "Tue Nov 10 12:03:56 1970"); + Assert.IsTrue(dateTime == logistics.DateTimeFromSequence); + Tuple pdsfNew = Helpers.Metrology.GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); + Helpers.Metrology.CompareSave(variables[5], pdsf, pdsfNew); + string[] json = Helpers.Metrology.GetItem2(pdsf, pdsfNew); + Helpers.Metrology.CompareSaveJSON(variables[5], json); + Assert.IsTrue(json[0] == json[1], "Item2 check!"); + string[] join = Helpers.Metrology.GetItem3(pdsf, pdsfNew); + Helpers.Metrology.CompareSaveTSV(variables[5], join); + Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + Helpers.Metrology.UpdatePassDirectory(variables[2]); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08THFTIRQS408M.cs b/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08THFTIRQS408M.cs new file mode 100644 index 0000000..5abc385 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.0/MET08THFTIRQS408M.cs @@ -0,0 +1,45 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace _Tests.Extract.Staging.v2_39_0; + +[TestClass] +public class MET08THFTIRQS408M +{ + + private static CreateSelfDescription.Staging.v2_39_0.MET08THFTIRQS408M _MET08THFTIRQS408M; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_0.MET08THFTIRQS408M.ClassInitialize(testContext); + _MET08THFTIRQS408M = CreateSelfDescription.Staging.v2_39_0.MET08THFTIRQS408M.EAFLoggingUnitTesting; + } + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M__() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M__(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M___() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M___(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M____() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M____(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_____() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_____(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M______() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M______(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_______() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M_______(); + + [TestMethod] + public void Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M________() => _MET08THFTIRQS408M.Staging__v2_39_0__MET08THFTIRQS408M__MET08THFTIRQS408M________(); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Helpers/Metrology.cs b/Adaptation/_Tests/Helpers/Metrology.cs index 7b60f92..0d41570 100644 --- a/Adaptation/_Tests/Helpers/Metrology.cs +++ b/Adaptation/_Tests/Helpers/Metrology.cs @@ -9,152 +9,148 @@ using System.Linq; using System.Reflection; using System.Text.Json; -namespace _Tests.Helpers +namespace _Tests.Helpers; + +public class Metrology { - public class Metrology + internal static Tuple GetLogisticsColumnsAndBody(string fileFullName) { + Tuple results; + results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName); + Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); + Assert.IsTrue(results.Item2.Length > 0, "Column check"); + Assert.IsTrue(results.Item3.Length > 0, "Body check"); + return results; + } - internal static Tuple GetLogisticsColumnsAndBody(string fileFullName) + internal static Tuple GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern) + { + Tuple results; + if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern)) + results = GetLogisticsColumnsAndBody(searchPattern); + else { - Tuple results; - results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(fileFullName); - Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); - Assert.IsTrue(results.Item2.Length > 0, "Column check"); - Assert.IsTrue(results.Item3.Length > 0, "Body check"); - return results; + string[] pdsfFiles; + pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (!pdsfFiles.Any()) + _ = Process.Start("explorer.exe", searchDirectory); + Assert.IsTrue(pdsfFiles.Any(), "GetFiles check"); + results = GetLogisticsColumnsAndBody(pdsfFiles[0]); } + Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); + Assert.IsTrue(results.Item2.Length > 0, "Column check"); + Assert.IsTrue(results.Item3.Length > 0, "Body check"); + return results; + } - internal static Tuple GetLogisticsColumnsAndBody(string searchDirectory, string searchPattern) - { - Tuple results; - if (searchPattern.Length > 3 && !searchPattern.Contains('*') && File.Exists(searchPattern)) - results = GetLogisticsColumnsAndBody(searchPattern); - else - { - string[] pdsfFiles; - pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly); - if (!pdsfFiles.Any()) - Process.Start("explorer.exe", searchDirectory); - Assert.IsTrue(pdsfFiles.Any(), "GetFiles check"); - results = GetLogisticsColumnsAndBody(pdsfFiles[0]); - } - Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); - Assert.IsTrue(results.Item2.Length > 0, "Column check"); - Assert.IsTrue(results.Item3.Length > 0, "Body check"); - return results; - } + internal static Tuple GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple> extractResult, Tuple pdsf) + { + Tuple results; + string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1); + string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines); + Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); + Assert.IsTrue(results.Item2.Length > 0, "Column check"); + Assert.IsTrue(results.Item3.Length > 0, "Body check"); + return results; + } - internal static Tuple GetLogisticsColumnsAndBody(IFileRead fileRead, Logistics logistics, Tuple> extractResult, Tuple pdsf) - { - Tuple results; - string text = ProcessDataStandardFormat.GetPDSFText(fileRead, logistics, extractResult.Item3, logisticsText: pdsf.Item1); - string[] lines = text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); - results = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(logistics.ReportFullPath, lines); - Assert.IsFalse(string.IsNullOrEmpty(results.Item1)); - Assert.IsTrue(results.Item2.Length > 0, "Column check"); - Assert.IsTrue(results.Item3.Length > 0, "Body check"); - return results; - } + internal static string[] GetItem2(Tuple pdsf, Tuple pdsfNew) + { + JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true }; + string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions); + string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions); + return new string[] { jsonOld, jsonNew }; + } - internal static string[] GetItem2(Tuple pdsf, Tuple pdsfNew) - { - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions() { WriteIndented = true }; - string jsonOld = JsonSerializer.Serialize(pdsf.Item2, pdsf.Item2.GetType(), jsonSerializerOptions); - string jsonNew = JsonSerializer.Serialize(pdsfNew.Item2, pdsfNew.Item2.GetType(), jsonSerializerOptions); - return new string[] { jsonOld, jsonNew }; - } + internal static string[] GetItem3(Tuple pdsf, Tuple pdsfNew) + { + string joinOld = string.Join(Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t)); + string joinNew = string.Join(Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t)); + return new string[] { joinOld, joinNew }; + } - internal static string[] GetItem3(Tuple pdsf, Tuple pdsfNew) + internal static void UpdatePassDirectory(string searchDirectory) + { + DateTime dateTime = DateTime.Now; + try + { Directory.SetLastWriteTime(searchDirectory, dateTime); } + catch (System.Exception) { } + string ticksDirectory = Path.GetDirectoryName(searchDirectory); + try + { Directory.SetLastWriteTime(ticksDirectory, dateTime); } + catch (System.Exception) { } + string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly); + foreach (string directory in directories) { - string joinOld = string.Join(Environment.NewLine, from l in pdsf.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t)); - string joinNew = string.Join(Environment.NewLine, from l in pdsfNew.Item3 select string.Join('\t', from t in l.Split('\t') where !t.Contains(@"\\") select t)); - return new string[] { joinOld, joinNew }; - } - - internal static void UpdatePassDirectory(string searchDirectory) - { - DateTime dateTime = DateTime.Now; try - { Directory.SetLastWriteTime(searchDirectory, dateTime); } + { Directory.SetLastWriteTime(directory, dateTime); } catch (System.Exception) { } - string ticksDirectory = Path.GetDirectoryName(searchDirectory); - try - { Directory.SetLastWriteTime(ticksDirectory, dateTime); } - catch (System.Exception) { } - string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly); - foreach (string directory in directories) - { - try - { Directory.SetLastWriteTime(directory, dateTime); } - catch (System.Exception) { } - } } + } - internal static string GetFileName(MethodBase methodBase) + internal static string GetFileName(MethodBase methodBase) + { + string result; + string connectionName; + string seperator = "__"; + string connectionNameAndTicks; + string[] segments = methodBase.Name.Split(new string[] { seperator }, StringSplitOptions.None); + string environment = segments[0]; + string rawVersionName = segments[1]; + string equipmentTypeDirectory = segments[2]; + string ticks = DateTime.Now.Ticks.ToString(); + string comment = segments[segments.Length - 1]; + string versionName = segments[1].Replace('_', '.'); + string before = string.Concat(environment, seperator, rawVersionName, seperator, equipmentTypeDirectory, seperator); + string after = methodBase.Name.Substring(before.Length); + if (after.Length < ticks.Length) { - string result; - string connectionName; - string seperator = "__"; - string connectionNameAndTicks; - string[] segments = methodBase.Name.Split(new string[] { seperator }, StringSplitOptions.None); - string environment = segments[0]; - string rawVersionName = segments[1]; - string equipmentTypeDirectory = segments[2]; - string ticks = DateTime.Now.Ticks.ToString(); - string comment = segments[segments.Length - 1]; - string versionName = segments[1].Replace('_', '.'); - string before = string.Concat(environment, seperator, rawVersionName, seperator, equipmentTypeDirectory, seperator); - string after = methodBase.Name.Substring(before.Length); - if (after.Length < ticks.Length) - { - connectionName = after; - connectionNameAndTicks = ticks; - } - else - { - connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length); - connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length); - ticks = connectionNameAndTicks.Substring(connectionName.Length); - } - result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json"); - if (result.Contains('/')) - result = string.Concat('/', result); - else - result = string.Concat('\\', result); - return result; + connectionName = after; } - - internal static void CompareSaveTSV(string textFileDirectory, string[] join) + else { - if (join[0] != join[1]) - { - Process.Start("explorer.exe", textFileDirectory); - File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]); - File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]); - } + connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length); + connectionName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length); + ticks = connectionNameAndTicks.Substring(connectionName.Length); } + result = Path.Combine(environment, equipmentTypeDirectory, versionName, $"{environment}__{rawVersionName}__{equipmentTypeDirectory}__{connectionName}", ticks, $"{connectionName.Replace('_', '-')}.json"); + if (result.Contains('/')) + result = string.Concat('/', result); + else + result = string.Concat('\\', result); + return result; + } - internal static void CompareSaveJSON(string textFileDirectory, string[] json) + internal static void CompareSaveTSV(string textFileDirectory, string[] join) + { + if (join[0] != join[1]) { - if (json[0] != json[1]) - { - Process.Start("explorer.exe", textFileDirectory); - File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]); - File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]); - } + _ = Process.Start("explorer.exe", textFileDirectory); + File.WriteAllText(Path.Combine(textFileDirectory, "0.tsv"), join[0]); + File.WriteAllText(Path.Combine(textFileDirectory, "1.tsv"), join[1]); } + } - internal static void CompareSave(string textFileDirectory, Tuple pdsf, Tuple pdsfNew) + internal static void CompareSaveJSON(string textFileDirectory, string[] json) + { + if (json[0] != json[1]) { - if (pdsf.Item1 != pdsfNew.Item1) - { - Process.Start("explorer.exe", textFileDirectory); - File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1); - File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1); - } + _ = Process.Start("explorer.exe", textFileDirectory); + File.WriteAllText(Path.Combine(textFileDirectory, "0.json"), json[0]); + File.WriteAllText(Path.Combine(textFileDirectory, "1.json"), json[1]); } + } + internal static void CompareSave(string textFileDirectory, Tuple pdsf, Tuple pdsfNew) + { + if (pdsf.Item1 != pdsfNew.Item1) + { + _ = Process.Start("explorer.exe", textFileDirectory); + File.WriteAllText(Path.Combine(textFileDirectory, "0.dat"), pdsf.Item1); + File.WriteAllText(Path.Combine(textFileDirectory, "1.dat"), pdsfNew.Item1); + } } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs index b3028a4..8378736 100644 --- a/Adaptation/_Tests/Shared/AdaptationTesting.cs +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -20,247 +20,237 @@ using System.Xml; using System.Xml.Linq; using System.Xml.Serialization; -namespace Shared +namespace Shared; + +public class AdaptationTesting : ISMTP { - public class AdaptationTesting : ISMTP + protected readonly string _Environment; + protected readonly string _HostNameAndPort; + protected readonly TestContext _TestContext; + protected readonly bool _SkipEquipmentDictionary; + protected readonly Dictionary _CellInstanceVersions; + protected readonly Dictionary _EquipmentTypeVersions; + protected readonly Dictionary _ParameterizedModelObjectDefinitionTypes; + protected readonly Dictionary _EquipmentDictionaryVersions; + protected readonly Dictionary _FileConnectorConfigurations; + protected readonly Dictionary> _ModelObjectParameters; + protected readonly Dictionary>> _EquipmentDictionaryEventDescriptions; + + public string Environment => _Environment; + public TestContext TestContext => _TestContext; + public string HostNameAndPort => _HostNameAndPort; + public bool SkipEquipmentDictionary => _SkipEquipmentDictionary; + public Dictionary CellInstanceVersions => _CellInstanceVersions; + public Dictionary EquipmentTypeVersions => _EquipmentTypeVersions; + public Dictionary> ModelObjectParameters => _ModelObjectParameters; + public Dictionary EquipmentDictionaryVersions => _EquipmentDictionaryVersions; + public Dictionary FileConnectorConfigurations => _FileConnectorConfigurations; + public Dictionary ParameterizedModelObjectDefinitionTypes => _ParameterizedModelObjectDefinitionTypes; + public Dictionary>> EquipmentDictionaryEventDescriptions => _EquipmentDictionaryEventDescriptions; + + void ISMTP.SendLowPriorityEmailMessage(string subject, string body) => throw new NotImplementedException(); + + void ISMTP.SendHighPriorityEmailMessage(string subject, string body) => throw new NotImplementedException(); + + void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) => throw new NotImplementedException(); + + public AdaptationTesting(TestContext testContext, bool skipEquipmentDictionary) { - protected readonly string _Environment; - protected readonly string _HostNameAndPort; - protected readonly TestContext _TestContext; - protected readonly bool _SkipEquipmentDictionary; - protected readonly Dictionary _CellInstanceVersions; - protected readonly Dictionary _EquipmentTypeVersions; - protected readonly Dictionary _ParameterizedModelObjectDefinitionTypes; - protected readonly Dictionary _EquipmentDictionaryVersions; - protected readonly Dictionary _FileConnectorConfigurations; - protected readonly Dictionary> _ModelObjectParameters; - protected readonly Dictionary>> _EquipmentDictionaryEventDescriptions; + string environment = GetEnvironment(testContext); + string hostNameAndPort = GetHostNameAndPort(environment); + _TestContext = testContext; + _Environment = environment; + _HostNameAndPort = hostNameAndPort; + _SkipEquipmentDictionary = skipEquipmentDictionary; + _CellInstanceVersions = new Dictionary(); + _EquipmentTypeVersions = new Dictionary(); + _ParameterizedModelObjectDefinitionTypes = new Dictionary(); + _EquipmentDictionaryVersions = new Dictionary(); + _FileConnectorConfigurations = new Dictionary(); + _ModelObjectParameters = new Dictionary>(); + _EquipmentDictionaryEventDescriptions = new Dictionary>>(); + } - public string Environment => _Environment; - public TestContext TestContext => _TestContext; - public string HostNameAndPort => _HostNameAndPort; - public bool SkipEquipmentDictionary => _SkipEquipmentDictionary; - public Dictionary CellInstanceVersions => _CellInstanceVersions; - public Dictionary EquipmentTypeVersions => _EquipmentTypeVersions; - public Dictionary> ModelObjectParameters => _ModelObjectParameters; - public Dictionary EquipmentDictionaryVersions => _EquipmentDictionaryVersions; - public Dictionary FileConnectorConfigurations => _FileConnectorConfigurations; - public Dictionary ParameterizedModelObjectDefinitionTypes => _ParameterizedModelObjectDefinitionTypes; - public Dictionary>> EquipmentDictionaryEventDescriptions => _EquipmentDictionaryEventDescriptions; + protected static string GetEnvironment(TestContext testContext) + { + string result = testContext.TestName.Split('_')[0]; + return result; + } - void ISMTP.SendLowPriorityEmailMessage(string subject, string body) + protected static string GetHostNameAndPort(string environment) + { + string result; + result = environment switch { - throw new NotImplementedException(); - } + "LocalHost" => "localhost:9003", + "Development" => "eaf-dev.mes.infineon.com:9003", + "Staging" => "eaf-staging.mes.infineon.com:9003", + "Production" => "eaf-prod.mes.infineon.com:9003", + _ => throw new Exception(), + }; + return result; + } - void ISMTP.SendHighPriorityEmailMessage(string subject, string body) + protected string GetTestResultsDirectory() + { + string result = string.Empty; + string testResults = "05_TestResults"; + string checkDirectory = _TestContext.TestResultsDirectory; + if (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)) + throw new Exception(); + string rootDirectory = Path.GetPathRoot(checkDirectory); + for (int i = 0; i < int.MaxValue; i++) { - throw new NotImplementedException(); - } - - void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) - { - throw new NotImplementedException(); - } - - public AdaptationTesting(TestContext testContext, bool skipEquipmentDictionary) - { - - string environment = GetEnvironment(testContext); - string hostNameAndPort = GetHostNameAndPort(environment); - _TestContext = testContext; - _Environment = environment; - _HostNameAndPort = hostNameAndPort; - _SkipEquipmentDictionary = skipEquipmentDictionary; - _CellInstanceVersions = new Dictionary(); - _EquipmentTypeVersions = new Dictionary(); - _ParameterizedModelObjectDefinitionTypes = new Dictionary(); - _EquipmentDictionaryVersions = new Dictionary(); - _FileConnectorConfigurations = new Dictionary(); - _ModelObjectParameters = new Dictionary>(); - _EquipmentDictionaryEventDescriptions = new Dictionary>>(); - } - - protected string GetEnvironment(TestContext testContext) - { - string result = testContext.TestName.Split('_')[0]; - return result; - } - - protected string GetHostNameAndPort(string environment) - { - string result; - result = environment switch + checkDirectory = Path.GetDirectoryName(checkDirectory); + if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory) + break; + if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory)) { - "LocalHost" => "localhost:9003", - "Development" => "eaf-dev.mes.infineon.com:9003", - "Staging" => "eaf-staging.mes.infineon.com:9003", - "Production" => "eaf-prod.mes.infineon.com:9003", - _ => throw new Exception(), - }; - return result; - } - - protected string GetTestResultsDirectory() - { - string result = string.Empty; - string testResults = "05_TestResults"; - string checkDirectory = _TestContext.TestResultsDirectory; - if (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults)) - throw new Exception(); - string rootDirectory = Path.GetPathRoot(checkDirectory); - for (int i = 0; i < int.MaxValue; i++) - { - checkDirectory = Path.GetDirectoryName(checkDirectory); - if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == rootDirectory) - break; - if (checkDirectory.EndsWith(testResults) && Directory.Exists(checkDirectory)) - { - result = checkDirectory; - break; - } + result = checkDirectory; + break; } - if (string.IsNullOrEmpty(result)) - throw new Exception(); - return result; } + if (string.IsNullOrEmpty(result)) + throw new Exception(); + return result; + } - protected string GetCellInstanceConnectionName(string cellInstanceConnectionName) + protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName) + { + string result; + if (string.IsNullOrEmpty(cellInstanceConnectionName) || cellInstanceConnectionName[cellInstanceConnectionName.Length - 1] != '_') + result = cellInstanceConnectionName; + else { - string result; - if (string.IsNullOrEmpty(cellInstanceConnectionName) || cellInstanceConnectionName[cellInstanceConnectionName.Length - 1] != '_') - result = cellInstanceConnectionName; - else + bool check = false; + List chars = new(); + StringBuilder stringBuilder = new(); + for (int i = cellInstanceConnectionName.Length - 1; i > -1; i--) { - bool check = false; - List chars = new List(); - StringBuilder stringBuilder = new StringBuilder(); - for (int i = cellInstanceConnectionName.Length - 1; i > -1; i--) - { - if (!check && cellInstanceConnectionName[i] != '_') - check = true; - else if (!check && cellInstanceConnectionName[i] == '_') - chars.Add('-'); - if (check) - chars.Add(cellInstanceConnectionName[i]); - } - for (int i = chars.Count - 1; i > -1; i--) - stringBuilder.Append(chars[i]); - result = stringBuilder.ToString(); + if (!check && cellInstanceConnectionName[i] != '_') + check = true; + else if (!check && cellInstanceConnectionName[i] == '_') + chars.Add('-'); + if (check) + chars.Add(cellInstanceConnectionName[i]); } - return result; + for (int i = chars.Count - 1; i > -1; i--) + _ = stringBuilder.Append(chars[i]); + result = stringBuilder.ToString(); } + return result; + } - private static string GetMethodBaseNameWithActualCICN(string methodBaseName, string cellInstanceName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceConnectionName, string ticks) + private static string GetMethodBaseNameWithActualCICN(string methodBaseName, string cellInstanceName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceConnectionName, string ticks) + { + string results; + if (string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || string.IsNullOrEmpty(cellInstanceConnectionName)) + results = methodBaseName; + else if (cellInstanceConnectionNameFromMethodBaseName.Length != cellInstanceConnectionName.Length) + throw new Exception(); + else { - string results; - if (string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || string.IsNullOrEmpty(cellInstanceConnectionName)) - results = methodBaseName; - else if (cellInstanceConnectionNameFromMethodBaseName.Length != cellInstanceConnectionName.Length) + string[] segments = methodBaseName.Split(new string[] { cellInstanceName }, StringSplitOptions.None); + if (segments.Length == 2) + results = methodBaseName.Replace(cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName); + else if (segments.Length != 3) + throw new Exception(); + else if (string.IsNullOrEmpty(ticks)) + results = string.Concat(segments[0], cellInstanceName, segments[1], cellInstanceConnectionName); + else if (!segments[2].Contains(ticks)) throw new Exception(); else - { - string[] segments = methodBaseName.Split(new string[] { cellInstanceName }, StringSplitOptions.None); - if (segments.Length == 2) - results = methodBaseName.Replace(cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName); - else if (segments.Length != 3) - throw new Exception(); - else if (string.IsNullOrEmpty(ticks)) - results = string.Concat(segments[0], cellInstanceName, segments[1], cellInstanceConnectionName); - else if (!segments[2].Contains(ticks)) - throw new Exception(); - else - results = string.Concat(segments[0], cellInstanceName, segments[1], cellInstanceConnectionName, ticks, segments[2].Split(new string[] { ticks }, StringSplitOptions.None)[1]); - } - if (methodBaseName.Length != results.Length) - throw new Exception(); - return results; + results = string.Concat(segments[0], cellInstanceName, segments[1], cellInstanceConnectionName, ticks, segments[2].Split(new string[] { ticks }, StringSplitOptions.None)[1]); } + if (methodBaseName.Length != results.Length) + throw new Exception(); + return results; + } - internal string[] GetSegments(string methodBaseName) + internal string[] GetSegments(string methodBaseName) + { + List results; + string fileFullName; + string comment; + string[] textFiles; + string seperator = "__"; + string connectionNameAndTicks; + string cellInstanceConnectionName; + string ticks = DateTime.Now.Ticks.ToString(); + string cellInstanceConnectionNameFromMethodBaseName; + string testResultsDirectory = GetTestResultsDirectory(); + string[] segments = methodBaseName.Split(new string[] { seperator }, StringSplitOptions.None); + if (segments[0] != _Environment) + throw new Exception(); + string rawVersionName = segments[1]; + string rawCellInstanceName = segments[2]; + string cellInstanceVersionName = segments[1].Replace('_', '.'); + string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT"); + string before = string.Concat(_Environment, seperator, rawVersionName, seperator, cellInstanceName, seperator); + string after = methodBaseName.Substring(before.Length); + string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName); + if (!Directory.Exists(versionDirectory)) + _ = Directory.CreateDirectory(versionDirectory); + comment = segments[segments.Length - 1]; + if (after.Length < ticks.Length || after == comment) { - List results; - string fileFullName; - string comment; - string[] textFiles; - string seperator = "__"; - string connectionNameAndTicks; - string cellInstanceConnectionName; - string ticks = DateTime.Now.Ticks.ToString(); - string cellInstanceConnectionNameFromMethodBaseName; - string testResultsDirectory = GetTestResultsDirectory(); - string[] segments = methodBaseName.Split(new string[] { seperator }, StringSplitOptions.None); - if (segments[0] != _Environment) - throw new Exception(); - string rawVersionName = segments[1]; - string rawCellInstanceName = segments[2]; - string cellInstanceVersionName = segments[1].Replace('_', '.'); - string cellInstanceName = segments[2].Replace('_', '-').Replace("_EQPT", "-EQPT"); - string before = string.Concat(_Environment, seperator, rawVersionName, seperator, cellInstanceName, seperator); - string after = methodBaseName.Substring(before.Length); - string versionDirectory = Path.Combine(testResultsDirectory, _Environment, cellInstanceName, cellInstanceVersionName); - if (!Directory.Exists(versionDirectory)) - Directory.CreateDirectory(versionDirectory); - comment = segments[segments.Length - 1]; - if (after.Length < ticks.Length || after == comment) + ticks = string.Empty; + cellInstanceConnectionNameFromMethodBaseName = string.Empty; + } + else + { + connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length); + if (connectionNameAndTicks.Length - ticks.Length < 1) { ticks = string.Empty; cellInstanceConnectionNameFromMethodBaseName = string.Empty; } else { - connectionNameAndTicks = after.Substring(0, after.Length - 2 - comment.Length); - if (connectionNameAndTicks.Length - ticks.Length < 1) - { - ticks = string.Empty; - cellInstanceConnectionNameFromMethodBaseName = string.Empty; - } - else - { - cellInstanceConnectionNameFromMethodBaseName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length); - ticks = connectionNameAndTicks.Substring(cellInstanceConnectionNameFromMethodBaseName.Length); - } + cellInstanceConnectionNameFromMethodBaseName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length); + ticks = connectionNameAndTicks.Substring(cellInstanceConnectionNameFromMethodBaseName.Length); } - if (string.IsNullOrEmpty(ticks) || string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || !long.TryParse(ticks, out long _)) + } + if (string.IsNullOrEmpty(ticks) || string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || !long.TryParse(ticks, out _)) + { + ticks = string.Empty; + comment = string.Empty; + cellInstanceConnectionNameFromMethodBaseName = after; + } + cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName); + string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + if (string.IsNullOrEmpty(ticks)) + { + textFiles = Array.Empty(); + fileFullName = Path.Combine(versionDirectory, methodBaseNameWithActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + } + else + { + segments = methodBaseNameWithActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); + string textDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1])); + fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + if (!Directory.Exists(textDirectory)) { - ticks = string.Empty; - comment = string.Empty; - cellInstanceConnectionNameFromMethodBaseName = after; - } - cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName); - string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); - if (string.IsNullOrEmpty(ticks)) - { - textFiles = new string[] { }; - fileFullName = Path.Combine(versionDirectory, methodBaseNameWithActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + textFiles = Array.Empty(); + string renameDirectory = Path.Combine(Path.GetDirectoryName(textDirectory), $"_Rename - {Path.GetFileName(textDirectory)}"); + _ = Directory.CreateDirectory(renameDirectory); + _ = Process.Start("explorer.exe", renameDirectory); + File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileFilter)}.txt"), string.Empty); + File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileLocation)}.txt"), string.Empty); } else { - segments = methodBaseNameWithActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); - string textDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1])); - fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json"); - if (!Directory.Exists(textDirectory)) + textFiles = Directory.GetFiles(textDirectory, "*.txt", SearchOption.TopDirectoryOnly); + if (!textFiles.Any()) { - textFiles = new string[] { }; - string renameDirectory = Path.Combine(Path.GetDirectoryName(textDirectory), $"_Rename - {Path.GetFileName(textDirectory)}"); - Directory.CreateDirectory(renameDirectory); - Process.Start("explorer.exe", renameDirectory); - File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileFilter)}.txt"), string.Empty); - File.WriteAllText(Path.Combine(renameDirectory, $"{nameof(FileConnectorConfiguration.SourceFileLocation)}.txt"), string.Empty); - } - else - { - textFiles = Directory.GetFiles(textDirectory, "*.txt", SearchOption.TopDirectoryOnly); - if (!textFiles.Any()) - { - Process.Start("explorer.exe", textDirectory); - File.WriteAllText(Path.Combine(textDirectory, "_ Why.why"), string.Empty); - } + _ = Process.Start("explorer.exe", textDirectory); + File.WriteAllText(Path.Combine(textDirectory, "_ Why.why"), string.Empty); } } - results = new List + } + results = new List { _Environment, rawCellInstanceName, @@ -272,848 +262,800 @@ namespace Shared comment, fileFullName }; - results.AddRange(textFiles); - return results.ToArray(); - } + results.AddRange(textFiles); + return results.ToArray(); + } - internal string[] GetSegments(MethodBase methodBase) - { - string[] results = GetSegments(methodBase.Name); - return results; - } + internal string[] GetSegments(MethodBase methodBase) + { + string[] results = GetSegments(methodBase.Name); + return results; + } - internal string GetEnvironment(string[] segments) - { - return segments[0]; - } + internal static string GetEnvironment(string[] segments) => segments[0]; - internal string GetRawCellInstanceName(string[] segments) - { - return segments[1]; - } + internal static string GetRawCellInstanceName(string[] segments) => segments[1]; - internal string GetCellInstanceName(string[] segments) - { - return segments[2]; - } + internal static string GetCellInstanceName(string[] segments) => segments[2]; - internal string GetCellInstanceVersionName(string[] segments) - { - return segments[3]; - } + internal static string GetCellInstanceVersionName(string[] segments) => segments[3]; - internal string GetCellInstanceConnectionNameFromMethodBaseName(string[] segments) - { - return segments[4]; - } + internal static string GetCellInstanceConnectionNameFromMethodBaseName(string[] segments) => segments[4]; - internal string GetCellInstanceConnectionName(string[] segments) - { - return segments[5]; - } + internal static string GetCellInstanceConnectionName(string[] segments) => segments[5]; - internal string GetTicks(string[] segments) - { - return segments[6]; - } + internal static string GetTicks(string[] segments) => segments[6]; - internal string GetComment(string[] segments) - { - return segments[7]; - } + internal static string GetComment(string[] segments) => segments[7]; - internal FileInfo GetFileName(string[] segments) - { - return new FileInfo(segments[8]); - } + internal static FileInfo GetFileName(string[] segments) => new(segments[8]); - internal string[] GetTextFiles(string[] segments) + internal static string[] GetTextFiles(string[] segments) + { + List results = new(); + if (segments.Length > 8) { - List results = new List(); - if (segments.Length > 8) + for (int i = 9; i < segments.Length; i++) + results.Add(segments[i]); + } + return results.ToArray(); + } + + protected static Stream ToStream(string @this) + { + MemoryStream memoryStream = new(); + StreamWriter streamWriter = new(memoryStream); + streamWriter.Write(@this); + streamWriter.Flush(); + memoryStream.Position = 0; + return memoryStream; + } + + internal static T ParseXML(string @this, bool throwExceptions) where T : class + { + object result = null; + try + { + Stream stream = ToStream(@this.Trim()); + XmlReader xmlReader = XmlReader.Create(stream, new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Document }); + XmlSerializer xmlSerializer = new(typeof(T), typeof(T).GetNestedTypes()); + result = xmlSerializer.Deserialize(xmlReader); + stream.Dispose(); + } + catch (Exception) + { + if (throwExceptions) + throw; + } + return result as T; + } + + protected static CellInstanceVersion GetCellInstanceVersion(string url) + { + CellInstanceVersion result; + byte[] byteArray; + ConfigurationData configurationData; + string decodedCellInstanceConfigurationData; + string xml; + try + { + xml = XDocument.Load(url).ToString(); + } + catch (System.Exception exception) + { + throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); + } + configurationData = ParseXML(xml, throwExceptions: true); + byteArray = Convert.FromBase64String(configurationData.Data); + decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); + if (xml.Length <= 41) + throw new Exception(string.Concat("xml isn't valid {", xml, "}")); + decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); + result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); + return result; + } + + protected Tuple GetCellInstanceVersionTuple(string cellInstanceName, string cellInstanceVersionName) + { + Tuple result; + CellInstanceVersion cellInstanceVersion; + string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration"); + if (_CellInstanceVersions.ContainsKey(cellInstanceServiceV2)) + cellInstanceVersion = _CellInstanceVersions[cellInstanceServiceV2]; + else + { + cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2); + _CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion); + } + result = new Tuple(cellInstanceServiceV2, cellInstanceVersion); + return result; + } + + protected static Dictionary GetComponentModelComponentsIndexes(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName) + { + Dictionary results = new(); + ComponentsCellComponent componentsCellComponent; + if (cellInstanceVersion.ComponentModel.Components is not null) + { + for (int i = 0; i < cellInstanceVersion.ComponentModel.Components.Length; i++) { - for (int i = 9; i < segments.Length; i++) - results.Add(segments[i]); - } - return results.ToArray(); - } - - protected Stream ToStream(string @this) - { - MemoryStream memoryStream = new MemoryStream(); - StreamWriter streamWriter = new StreamWriter(memoryStream); - streamWriter.Write(@this); - streamWriter.Flush(); - memoryStream.Position = 0; - return memoryStream; - } - - internal T ParseXML(string @this, bool throwExceptions) where T : class - { - object result = null; - try - { - Stream stream = ToStream(@this.Trim()); - XmlReader xmlReader = XmlReader.Create(stream, new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Document }); - XmlSerializer xmlSerializer = new XmlSerializer(typeof(T), typeof(T).GetNestedTypes()); - result = xmlSerializer.Deserialize(xmlReader); - stream.Dispose(); - } - catch (Exception) - { - if (throwExceptions) - throw; - } - return result as T; - } - - protected CellInstanceVersion GetCellInstanceVersion(string url) - { - CellInstanceVersion result; - byte[] byteArray; - ConfigurationData configurationData; - string decodedCellInstanceConfigurationData; - string xml; - try - { - xml = XDocument.Load(url).ToString(); - } - catch (System.Exception exception) - { - throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); - } - configurationData = ParseXML(xml, throwExceptions: true); - byteArray = Convert.FromBase64String(configurationData.Data); - decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); - if (xml.Length <= 41) - throw new Exception(string.Concat("xml isn't valid {", xml, "}")); - decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); - result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); - return result; - } - - protected Tuple GetCellInstanceVersionTuple(string cellInstanceName, string cellInstanceVersionName) - { - Tuple result; - CellInstanceVersion cellInstanceVersion; - string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration"); - if (_CellInstanceVersions.ContainsKey(cellInstanceServiceV2)) - cellInstanceVersion = _CellInstanceVersions[cellInstanceServiceV2]; - else - { - cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2); - _CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion); - } - result = new Tuple(cellInstanceServiceV2, cellInstanceVersion); - return result; - } - - protected Dictionary GetComponentModelComponentsIndexes(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName) - { - Dictionary results = new Dictionary(); - ComponentsCellComponent componentsCellComponent; - if (!(cellInstanceVersion.ComponentModel.Components is null)) - { - for (int i = 0; i < cellInstanceVersion.ComponentModel.Components.Length; i++) + componentsCellComponent = cellInstanceVersion.ComponentModel.Components[i]; + for (int j = 0; j < componentsCellComponent.Children.Length; j++) { - componentsCellComponent = cellInstanceVersion.ComponentModel.Components[i]; - for (int j = 0; j < componentsCellComponent.Children.Length; j++) - { - if (string.IsNullOrEmpty(componentsCellComponent.Children[j].Equipment.Name)) - continue; - results.Add(componentsCellComponent.Children[j].Name, new int[] { i, j }); - } + if (string.IsNullOrEmpty(componentsCellComponent.Children[j].Equipment.Name)) + continue; + results.Add(componentsCellComponent.Children[j].Name, new int[] { i, j }); } } - if (!results.Any() || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName))) - throw new Exception("Match not found (check test method name matches Mango)!"); - return results; } + if (!results.Any() || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName))) + throw new Exception("Match not found (check test method name matches Mango)!"); + return results; + } - protected int[] GetCellInstanceConnectionNameIndexes(string cellInstanceConnectionName, Dictionary componentModelComponentsIndexes) + protected static int[] GetCellInstanceConnectionNameIndexes(string cellInstanceConnectionName, Dictionary componentModelComponentsIndexes) + { + int[] result; + if (string.IsNullOrEmpty(cellInstanceConnectionName)) + result = componentModelComponentsIndexes.ElementAt(0).Value; + else { - int[] result; - if (string.IsNullOrEmpty(cellInstanceConnectionName)) - result = componentModelComponentsIndexes.ElementAt(0).Value; + if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.ContainsKey(cellInstanceConnectionName)) + throw new Exception(); + result = componentModelComponentsIndexes[cellInstanceConnectionName]; + } + return result; + } + + protected string[] GetCSharpTextB(FileInfo fileInfo, string cellInstanceName, string cellInstanceVersionName, CellInstanceVersion cellInstanceVersion) + { + List results = new(); + string check; + string loopName; + string equipmentTypeName; + string methodName = string.Empty; + string extractText = string.Empty; + StringBuilder stringBuilder = new(); + string createSelfDescriptionText = string.Empty; + List componentsCellComponentCellComponentEquipmentNames = new(); + string cellInstanceNameWithoutHyphen = cellInstanceName.Replace('-', '_'); + ComponentsCellComponentCellComponent componentsCellComponentCellComponent; + List componentsCellComponentCellComponentEquipmentTypeNames = new(); + string cellInstanceVersionNameAsCode = cellInstanceVersionName.Replace('.', '_'); + List componentsCellComponentCellComponentEquipmentDictionaryNames = new(); + const string sourceDirectoryCloaking = nameof(FileConnectorConfiguration.SourceDirectoryCloaking); + for (int i = 1; i < 3; i++) + { + if (i == 2) + loopName = "Extract"; + else if (i == 1) + loopName = "CreateSelfDescription"; else - { - if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.ContainsKey(cellInstanceConnectionName)) - throw new Exception(); - result = componentModelComponentsIndexes[cellInstanceConnectionName]; - } - return result; - } - - protected bool GetNoEvents(ComponentsCellComponentCellComponent componentsCellComponentCellComponent) - { - bool result = componentsCellComponentCellComponent.Equipment.EquipmentDictionaries?.CellEquipmentDictionaryReference?.DictionaryName is null; - return result; - } - - protected string GetEquipmentDictionaryName(ComponentsCellComponentCellComponent componentsCellComponentCellComponent, bool noEvents, string defaultEquipmentDictionaryName) - { - string result; - if (noEvents) - result = defaultEquipmentDictionaryName; + throw new Exception(); + if (i == 2) + _ = stringBuilder. + AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;"). + AppendLine("using Shared;"). + AppendLine("using System.Diagnostics;"); + else if (i == 1) + _ = stringBuilder. + AppendLine("using Adaptation.Shared.Methods;"). + AppendLine("using Microsoft.Extensions.Logging;"). + AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;"). + AppendLine("using Shared;"). + AppendLine("using System;"). + AppendLine("using System.Collections.Generic;"). + AppendLine("using System.Diagnostics;"). + AppendLine("using System.IO;"). + AppendLine("using System.Reflection;"). + AppendLine("using System.Text.Json;"). + AppendLine("using System.Threading;"); else - result = componentsCellComponentCellComponent.Equipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryName; - return result; - } - - protected string[] GetCSharpTextB(string cellInstanceName, string cellInstanceVersionName, CellInstanceVersion cellInstanceVersion, FileInfo fileInfo) - { - List results = new List(); - string check; - bool noEvents; - string loopName; - string equipmentTypeName; - string equipmentDictionaryName; - string methodName = string.Empty; - string extractText = string.Empty; - string defaultEquipmentDictionaryName; - string createSelfDescriptionText = string.Empty; - StringBuilder stringBuilder = new StringBuilder(); - List componentsCellComponentCellComponentEquipmentNames = new(); - string cellInstanceNameWithoutHyphen = cellInstanceName.Replace('-', '_'); - ComponentsCellComponentCellComponent componentsCellComponentCellComponent; - List componentsCellComponentCellComponentEquipmentTypeNames = new(); - string cellInstanceVersionNameAsCode = cellInstanceVersionName.Replace('.', '_'); - const string sourceDirectoryCloaking = nameof(FileConnectorConfiguration.SourceDirectoryCloaking); - for (int i = 1; i < 3; i++) - { - if (i == 2) - loopName = "Extract"; - else if (i == 1) - loopName = "CreateSelfDescription"; - else - throw new Exception(); - defaultEquipmentDictionaryName = string.Empty; - if (i == 2) - stringBuilder. - AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;"). - AppendLine("using Shared;"). - AppendLine("using System.Diagnostics;"); - else if (i == 1) - stringBuilder. - AppendLine("using Adaptation.Shared.Methods;"). - AppendLine("using Microsoft.Extensions.Logging;"). - AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;"). - AppendLine("using Shared;"). - AppendLine("using System;"). - AppendLine("using System.Collections.Generic;"). - AppendLine("using System.Diagnostics;"). - AppendLine("using System.IO;"). - AppendLine("using System.Reflection;"). - AppendLine("using System.Text.Json;"). - AppendLine("using System.Threading;"); - else - throw new Exception(); - stringBuilder.AppendLine(). - Append("namespace _Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').AppendLine(cellInstanceVersionNameAsCode). + throw new Exception(); + _ = stringBuilder.AppendLine(). + Append("namespace _Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').AppendLine(cellInstanceVersionNameAsCode). + AppendLine("{"). + AppendLine(). + AppendLine("[TestClass]"); + if (i == 2) + _ = stringBuilder. + Append("public class ").AppendLine(cellInstanceNameWithoutHyphen). AppendLine("{"). AppendLine(). - AppendLine("[TestClass]"); - if (i == 2) - stringBuilder. - Append("public class ").AppendLine(cellInstanceNameWithoutHyphen). - AppendLine("{"). - AppendLine(). - Append("private static CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).Append(" _").Append(cellInstanceNameWithoutHyphen).AppendLine(";"); - else if (i == 1) - stringBuilder. - Append("public class ").Append(cellInstanceNameWithoutHyphen).AppendLine(" : EAFLoggingUnitTesting"). - AppendLine("{"). - AppendLine(). - Append("private static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" _EAFLoggingUnitTesting;"). - Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting => _EAFLoggingUnitTesting;"); + Append("private static CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).Append(" _").Append(cellInstanceNameWithoutHyphen).AppendLine(";"); + else if (i == 1) + _ = stringBuilder. + Append("public class ").Append(cellInstanceNameWithoutHyphen).AppendLine(" : EAFLoggingUnitTesting"). + AppendLine("{"). + AppendLine(). + Append("private static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" _EAFLoggingUnitTesting;"). + Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting => _EAFLoggingUnitTesting;"); + else + throw new Exception(); + if (i == 2) + _ = stringBuilder.AppendLine(); + else if (i == 1) + _ = stringBuilder. + AppendLine(). + Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)"). + AppendLine("{"). + AppendLine("if (_EAFLoggingUnitTesting is null)"). + AppendLine("throw new Exception();"). + AppendLine("}"). + AppendLine(). + Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)"). + AppendLine("{"). + AppendLine("}"). + AppendLine(); + else + throw new Exception(); + _ = stringBuilder. + AppendLine("[ClassInitialize]"). + AppendLine("public static void ClassInitialize(TestContext testContext)"). + AppendLine("{"); + if (i == 2) + _ = stringBuilder. + Append("CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).AppendLine(".ClassInitialize(testContext);"). + Append('_').Append(cellInstanceNameWithoutHyphen).Append(" = CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).AppendLine(".EAFLoggingUnitTesting;"). + AppendLine("}"); + else if (i == 1) + _ = stringBuilder. + AppendLine("if (_EAFLoggingUnitTesting is null)"). + Append("_EAFLoggingUnitTesting = new ").Append(cellInstanceNameWithoutHyphen).AppendLine("(testContext);"). + AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, \" - ClassInitialize\"));"). + AppendLine("string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);"). + AppendLine("File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);"). + AppendLine("File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);"). + AppendLine("}"); + else + throw new Exception(); + if (i == 2) + _ = stringBuilder.AppendLine(); + else if (i == 1) + _ = stringBuilder. + AppendLine(). + AppendLine("[ClassCleanup()]"). + AppendLine("public static void ClassCleanup()"). + AppendLine("{"). + AppendLine("if (!(_EAFLoggingUnitTesting.Logger is null))"). + AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(\"Cleanup\");"). + AppendLine("if (!(_EAFLoggingUnitTesting is null))"). + AppendLine("_EAFLoggingUnitTesting.Dispose();"). + AppendLine("}"). + AppendLine(); + else + throw new Exception(); + foreach (ComponentsCellComponent componentsCellComponent in cellInstanceVersion.ComponentModel.Components) + { + if (componentsCellComponent.Children.Length != 1) + continue; + componentsCellComponentCellComponent = componentsCellComponent.Children[0]; + if (componentsCellComponentCellComponent.Equipment.EquipmentDictionaries?.CellEquipmentDictionaryReference?.DictionaryName is not null) + componentsCellComponentCellComponentEquipmentDictionaryNames.Add(componentsCellComponentCellComponent.Equipment.EquipmentDictionaries?.CellEquipmentDictionaryReference?.DictionaryName); + componentsCellComponentCellComponentEquipmentNames.Add(componentsCellComponentCellComponent.Equipment.Name); + componentsCellComponentCellComponentEquipmentTypeNames.Add(componentsCellComponentCellComponent.Equipment.EquipmentType.Name); + methodName = $"{_Environment}__{cellInstanceVersionNameAsCode}__{cellInstanceNameWithoutHyphen}__{componentsCellComponentCellComponent.Equipment.Name.Replace('-', '_')}"; + if (componentsCellComponentCellComponent?.Equipment?.ConnectionSettings?.Setting is null) + check = string.Empty; else - throw new Exception(); - if (i == 2) - stringBuilder.AppendLine(); - else if (i == 1) - stringBuilder. - AppendLine(). - Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(testContext: null, declaringType: null, skipEquipmentDictionary: false)"). - AppendLine("{"). - AppendLine("if (_EAFLoggingUnitTesting is null)"). - AppendLine("throw new Exception();"). - AppendLine("}"). - AppendLine(). - Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)"). - AppendLine("{"). - AppendLine("}"). - AppendLine(); - else - throw new Exception(); - stringBuilder. - AppendLine("[ClassInitialize]"). - AppendLine("public static void ClassInitialize(TestContext testContext)"). + check = (from l in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting where l.Name == sourceDirectoryCloaking select l.Value).FirstOrDefault(); + if (string.IsNullOrEmpty(check)) + check = componentsCellComponentCellComponent.Equipment.SourceFileFilter; + _ = stringBuilder. + AppendLine("[TestMethod]"). + Append("public void ").Append(methodName).AppendLine("()"). AppendLine("{"); if (i == 2) - stringBuilder. - Append("CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).AppendLine(".ClassInitialize(testContext);"). - Append("_").Append(cellInstanceNameWithoutHyphen).Append(" = CreateSelfDescription.").Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append('.').Append(cellInstanceNameWithoutHyphen).AppendLine(".EAFLoggingUnitTesting;"). - AppendLine("}"); + _ = stringBuilder.Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();"); else if (i == 1) - stringBuilder. - AppendLine("if (_EAFLoggingUnitTesting is null)"). - Append("_EAFLoggingUnitTesting = new ").Append(cellInstanceNameWithoutHyphen).AppendLine("(testContext);"). - AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, \" - ClassInitialize\"));"). - AppendLine("string[] fileNameAndText = _EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);"). - AppendLine("File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);"). - AppendLine("File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);"). - AppendLine("}"); - else - throw new Exception(); - if (i == 2) - stringBuilder.AppendLine(); - else if (i == 1) - stringBuilder. - AppendLine(). - AppendLine("[ClassCleanup()]"). - AppendLine("public static void ClassCleanup()"). - AppendLine("{"). - AppendLine("if (!(_EAFLoggingUnitTesting.Logger is null))"). - AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(\"Cleanup\");"). - AppendLine("if (!(_EAFLoggingUnitTesting is null))"). - AppendLine("_EAFLoggingUnitTesting.Dispose();"). - AppendLine("}"). - AppendLine(); - else - throw new Exception(); - foreach (ComponentsCellComponent componentsCellComponent in cellInstanceVersion.ComponentModel.Components) { - if (componentsCellComponent.Children.Length != 1) - continue; - componentsCellComponentCellComponent = componentsCellComponent.Children[0]; - noEvents = GetNoEvents(componentsCellComponentCellComponent); - if (noEvents) - continue; - defaultEquipmentDictionaryName = GetEquipmentDictionaryName(componentsCellComponentCellComponent, noEvents, defaultEquipmentDictionaryName); + if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName) + throw new Exception("Versions should match!"); + equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name; + _ = stringBuilder. + Append("string check = \"").Append(check.Split('\\').Last()).AppendLine("\";"). + AppendLine("MethodBase methodBase = new StackFrame().GetMethod();"). + AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));"). + AppendLine("string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);"). + AppendLine("Assert.IsTrue(fileNameAndJson[1].Contains(check));"). + AppendLine("File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);"); + if (componentsCellComponentCellComponent.Equipment.EquipmentType.Name == componentsCellComponentCellComponentEquipmentTypeNames[0]) + _ = stringBuilder. + AppendLine("IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);"). + AppendLine("Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));"); + _ = stringBuilder. + AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));"); } - if (string.IsNullOrEmpty(defaultEquipmentDictionaryName)) - throw new Exception("At least one dictionary name should be marked as used in EAF CI!"); - foreach (ComponentsCellComponent componentsCellComponent in cellInstanceVersion.ComponentModel.Components) - { - if (componentsCellComponent.Children.Length != 1) - continue; - componentsCellComponentCellComponent = componentsCellComponent.Children[0]; - componentsCellComponentCellComponentEquipmentNames.Add(componentsCellComponentCellComponent.Equipment.Name); - componentsCellComponentCellComponentEquipmentTypeNames.Add(componentsCellComponentCellComponent.Equipment.EquipmentType.Name); - methodName = $"{_Environment}__{cellInstanceVersionNameAsCode}__{cellInstanceNameWithoutHyphen}__{componentsCellComponentCellComponent.Equipment.Name.Replace('-', '_')}"; - if (componentsCellComponentCellComponent?.Equipment?.ConnectionSettings?.Setting is null) - check = string.Empty; - else - check = (from l in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting where l.Name == sourceDirectoryCloaking select l.Value).FirstOrDefault(); - if (string.IsNullOrEmpty(check)) - check = componentsCellComponentCellComponent.Equipment.SourceFileFilter; - stringBuilder. - AppendLine("[TestMethod]"). - Append("public void ").Append(methodName).AppendLine("()"). - AppendLine("{"); - if (i == 2) - stringBuilder.Append("_").Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();"); - else if (i == 1) - { - if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName) - throw new Exception("Versions should match!"); - equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name; - noEvents = GetNoEvents(componentsCellComponentCellComponent); - equipmentDictionaryName = GetEquipmentDictionaryName(componentsCellComponentCellComponent, noEvents, defaultEquipmentDictionaryName); - stringBuilder. - Append("string check = \"").Append(check).AppendLine("\";"). - AppendLine("MethodBase methodBase = new StackFrame().GetMethod();"). - AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Getting configuration\"));"). - AppendLine("string[] fileNameAndJson = _EAFLoggingUnitTesting.AdaptationTesting.GetConfiguration(methodBase);"). - AppendLine("Assert.IsTrue(fileNameAndJson[1].Contains(check));"). - AppendLine("File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]);"); - if (componentsCellComponentCellComponent.Equipment.EquipmentType.Name == componentsCellComponentCellComponentEquipmentTypeNames[0]) - stringBuilder. - AppendLine("IFileRead fileRead = _EAFLoggingUnitTesting.AdaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false);"). - AppendLine("Assert.IsFalse(string.IsNullOrEmpty(fileRead.CellInstanceConnectionName));"); - stringBuilder. - AppendLine("_EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));"); - } - else - throw new Exception(); - stringBuilder. - AppendLine("}"). - AppendLine(); - } - stringBuilder. - AppendLine("}"). - AppendLine(). - AppendLine("}"). - AppendLine(). - AppendLine("// dotnet build --runtime win-x64"). - Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"). - Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"). - Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).Append(" & ").Append(methodName).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"); - if (i == 2) - extractText = stringBuilder.ToString().Trim(); - else if (i == 1) - createSelfDescriptionText = stringBuilder.ToString().Trim(); else throw new Exception(); - stringBuilder.Clear(); + _ = stringBuilder. + AppendLine("}"). + AppendLine(); } - if (string.IsNullOrEmpty(cellInstanceVersion.FrozenBy)) - { - if (!cellInstanceVersion.CellCommunicatingRule.Contains('.') || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any()) - throw new Exception("CellCommunicatingRule not correct in Mango!"); - if (!cellInstanceVersion.CellNotCommunicatingRule.Contains('.') || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellNotCommunicatingRule.Split('.')[0] select true).Any()) - throw new Exception("CellNotCommunicatingRule not correct in Mango!"); - } - string versionLevelDirectory = Path.GetDirectoryName(fileInfo.DirectoryName); - results.Add(Path.Combine(versionLevelDirectory, $"{cellInstanceName}-0-CreateSelfDescription.txt")); - results.Add(createSelfDescriptionText); - results.Add(Path.Combine(versionLevelDirectory, $"{cellInstanceName}-1-Extract.txt")); - results.Add(extractText); - return results.ToArray(); - } - - protected FileConnectorConfiguration GetFileConnectorConfiguration(string json, ComponentsCellComponentCellComponent componentsCellComponentCellComponent) - { - FileConnectorConfiguration result; - const string sourceDirectoryCloaking = nameof(FileConnectorConfiguration.SourceDirectoryCloaking); - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; - json = json.Replace(string.Concat("\"", nameof(FileConnectorConfiguration.ConnectionSettings), "\":"), string.Concat("\"Ignore", nameof(FileConnectorConfiguration.ConnectionSettings), "\":")); - result = JsonSerializer.Deserialize(json, jsonSerializerOptions); - if (string.IsNullOrEmpty(result.SourceFileFilter)) - result.SourceFileFilter = string.Empty; - if (result.ErrorTargetFileLocation is null) - result.ErrorTargetFileLocation = string.Empty; - if (result.SourceFileLocation is null) - result.SourceFileLocation = string.Empty; - if (result.TargetFileLocation is null) - result.TargetFileLocation = string.Empty; - if (result.FolderAgeCheckIndividualSubFolders is null) - result.FolderAgeCheckIndividualSubFolders = false; - result.ConnectionSettings = new List(); - result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList(); - if (!(componentsCellComponentCellComponent.Equipment?.ConnectionSettings is null)) - { - foreach (Setting setting in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting) - result.ConnectionSettings.Add(new ConnectionSetting(null, null) { Name = setting.Name, Value = setting.Value }); - } - IEnumerable sourceDirectoryCloakingCollection = (from l in result.ConnectionSettings where l.Name == sourceDirectoryCloaking select l); - if (sourceDirectoryCloakingCollection.Any()) - result.SourceDirectoryCloaking = sourceDirectoryCloakingCollection.First().Value; + _ = stringBuilder. + AppendLine("}"). + AppendLine(). + AppendLine("}"). + AppendLine(). + AppendLine("// dotnet build --runtime win-x64"). + Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"). + Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"). + Append("// dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).Append(" & ClassName~").Append(cellInstanceNameWithoutHyphen).Append(" & ").Append(methodName).AppendLine("\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")"); + if (i == 2) + extractText = stringBuilder.ToString().Trim(); + else if (i == 1) + createSelfDescriptionText = stringBuilder.ToString().Trim(); else - { - result.SourceDirectoryCloaking = string.Empty; - result.ConnectionSettings.Add(new ConnectionSetting(null, null) { Name = sourceDirectoryCloaking, Value = string.Empty }); - } - return result; + throw new Exception(); + _ = stringBuilder.Clear(); } - - protected Tuple GetFileConnectorConfigurationTuple(Tuple cellInstanceVersionTuple, string cellInstanceConnectionName) + if (componentsCellComponentCellComponentEquipmentDictionaryNames.Any() && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy)) { - Tuple result; - FileConnectorConfiguration fileConnectorConfiguration; - string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName); - if (_FileConnectorConfigurations.ContainsKey(cellInstanceServiceV2With)) - fileConnectorConfiguration = _FileConnectorConfigurations[cellInstanceServiceV2With]; - else - { - Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); - int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); - ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersionTuple.Item2.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; - string json = JsonSerializer.Serialize(componentsCellComponentCellComponent.Equipment, new JsonSerializerOptions { WriteIndented = true }); - fileConnectorConfiguration = GetFileConnectorConfiguration(json, componentsCellComponentCellComponent); - _FileConnectorConfigurations.Add(cellInstanceServiceV2With, fileConnectorConfiguration); - } - result = new Tuple(cellInstanceServiceV2With, fileConnectorConfiguration); - return result; + if (!cellInstanceVersion.CellCommunicatingRule.EndsWith(".Communicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any()) + throw new Exception($"{methodName} - CellCommunicatingRule not correct in Mango!"); + if (!cellInstanceVersion.CellNotCommunicatingRule.EndsWith(".NotCommunicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellNotCommunicatingRule.Split('.')[0] select true).Any()) + throw new Exception($"{methodName} - CellNotCommunicatingRule not correct in Mango!"); } + string versionLevelDirectory = Path.GetDirectoryName(fileInfo.DirectoryName); + results.Add(Path.Combine(versionLevelDirectory, $"{cellInstanceName}-0-CreateSelfDescription.txt")); + results.Add(createSelfDescriptionText); + results.Add(Path.Combine(versionLevelDirectory, $"{cellInstanceName}-1-Extract.txt")); + results.Add(extractText); + return results.ToArray(); + } - protected EquipmentTypeVersion GetEquipmentTypeVersion(string url) + protected static FileConnectorConfiguration GetFileConnectorConfiguration(string json, ComponentsCellComponentCellComponent componentsCellComponentCellComponent) + { + FileConnectorConfiguration result; + const string sourceDirectoryCloaking = nameof(FileConnectorConfiguration.SourceDirectoryCloaking); + JsonSerializerOptions jsonSerializerOptions = new() + { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; + json = json.Replace(string.Concat("\"", nameof(FileConnectorConfiguration.ConnectionSettings), "\":"), string.Concat("\"Ignore", nameof(FileConnectorConfiguration.ConnectionSettings), "\":")); + result = JsonSerializer.Deserialize(json, jsonSerializerOptions); + if (string.IsNullOrEmpty(result.SourceFileFilter)) + result.SourceFileFilter = string.Empty; + if (result.ErrorTargetFileLocation is null) + result.ErrorTargetFileLocation = string.Empty; + if (result.SourceFileLocation is null) + result.SourceFileLocation = string.Empty; + if (result.TargetFileLocation is null) + result.TargetFileLocation = string.Empty; + if (result.FolderAgeCheckIndividualSubFolders is null) + result.FolderAgeCheckIndividualSubFolders = false; + result.ConnectionSettings = new List(); + result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList(); + if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null) { - EquipmentTypeVersion result; - byte[] byteArray; - ConfigurationData configurationData; - string decodedCellInstanceConfigurationData; - string xml; - try - { - xml = XDocument.Load(url).ToString(); - } - catch (System.Exception exception) - { - throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); - } - configurationData = ParseXML(xml, throwExceptions: true); - byteArray = Convert.FromBase64String(configurationData.Data); - decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); - if (xml.Length <= 41) - throw new Exception(string.Concat("xml isn't valid {", xml, "}")); - decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); - result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); - return result; + foreach (Setting setting in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting) + result.ConnectionSettings.Add(new ConnectionSetting(null, null) { Name = setting.Name, Value = setting.Value }); } - - protected Tuple GetEquipmentTypeVersionTuple(string cellInstanceName, string cellInstanceVersionName, CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName) + IEnumerable sourceDirectoryCloakingCollection = (from l in result.ConnectionSettings where l.Name == sourceDirectoryCloaking select l); + if (sourceDirectoryCloakingCollection.Any()) + result.SourceDirectoryCloaking = sourceDirectoryCloakingCollection.First().Value; + else { - Tuple result; - EquipmentTypeVersion equipmentTypeVersion; - Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersion, cellInstanceConnectionName); + result.SourceDirectoryCloaking = string.Empty; + result.ConnectionSettings.Add(new ConnectionSetting(null, null) { Name = sourceDirectoryCloaking, Value = string.Empty }); + } + return result; + } + + protected Tuple GetFileConnectorConfigurationTuple(Tuple cellInstanceVersionTuple, string cellInstanceConnectionName) + { + Tuple result; + FileConnectorConfiguration fileConnectorConfiguration; + string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName); + if (_FileConnectorConfigurations.ContainsKey(cellInstanceServiceV2With)) + fileConnectorConfiguration = _FileConnectorConfigurations[cellInstanceServiceV2With]; + else + { + Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); - ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; - string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration"); - if (_EquipmentTypeVersions.ContainsKey(equipmentTypeServiceV2)) - equipmentTypeVersion = _EquipmentTypeVersions[equipmentTypeServiceV2]; - else - { - equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2); - _EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion); - } - result = new Tuple(equipmentTypeServiceV2, componentsCellComponentCellComponent.Equipment.EquipmentType.Name, componentsCellComponentCellComponent.Equipment.EquipmentType.Version, equipmentTypeVersion); - return result; - } - - protected Tuple GetParameterizedModelObjectDefinitionTypeTuple(Tuple equipmentTypeVersionTuple) - { - Tuple result; - string parameterizedModelObjectDefinitionType; - if (_FileConnectorConfigurations.ContainsKey(equipmentTypeVersionTuple.Item1)) - parameterizedModelObjectDefinitionType = _ParameterizedModelObjectDefinitionTypes[equipmentTypeVersionTuple.Item1]; - else - parameterizedModelObjectDefinitionType = equipmentTypeVersionTuple.Item4.FileHandlerObjectTypes.ParameterizedModelObjectDefinition.Type; - result = new Tuple(equipmentTypeVersionTuple.Item1, parameterizedModelObjectDefinitionType); - return result; - } - - protected IList GetModelObjectParameters(string json) - { - IList results; - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; - JsonElement jsonElement = JsonSerializer.Deserialize(json); - string parameters = "Parameters"; - string fileHandlerObjectTypes = nameof(FileHandlerObjectTypes); - string parameterizedModelObjectDefinition = nameof(ParameterizedModelObjectDefinition); - if (!json.Contains(fileHandlerObjectTypes) || !json.Contains(parameterizedModelObjectDefinition)) - throw new Exception(); - jsonElement = jsonElement.GetProperty(fileHandlerObjectTypes); - if (jsonElement.ValueKind != JsonValueKind.Object) - throw new Exception(); - jsonElement = jsonElement.GetProperty(parameterizedModelObjectDefinition); - if (jsonElement.ValueKind != JsonValueKind.Object) - throw new Exception(); - jsonElement = jsonElement.GetProperty(parameters); - if (jsonElement.ValueKind != JsonValueKind.Array) - throw new Exception(); - results = JsonSerializer.Deserialize>(jsonElement.ToString(), jsonSerializerOptions); - return results; - } - - protected Tuple> GetModelObjectParameters(Tuple equipmentTypeVersionTuple) - { - Tuple> result; - IList modelObjectParameters; - if (_FileConnectorConfigurations.ContainsKey(equipmentTypeVersionTuple.Item1)) - modelObjectParameters = _ModelObjectParameters[equipmentTypeVersionTuple.Item1]; - else - { - string json = JsonSerializer.Serialize(equipmentTypeVersionTuple.Item4, new JsonSerializerOptions { WriteIndented = true }); - modelObjectParameters = GetModelObjectParameters(json); - } - result = new Tuple>(equipmentTypeVersionTuple.Item1, modelObjectParameters); - return result; - } - - protected string[] GetEquipmentDictionaryStrings(ComponentsCellComponentCellComponentEquipment componentsCellComponentCellComponentEquipment, EquipmentTypeVersion equipmentTypeVersion) - { - string[] results; - string equipmentDictionaryName; - string equipmentDictionaryVersionName; - if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || !equipmentTypeVersion.EventActionSequences.Any() || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any()) + ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersionTuple.Item2.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; + string json = JsonSerializer.Serialize(componentsCellComponentCellComponent.Equipment, new JsonSerializerOptions { WriteIndented = true }); + fileConnectorConfiguration = GetFileConnectorConfiguration(json, componentsCellComponentCellComponent); + _FileConnectorConfigurations.Add(cellInstanceServiceV2With, fileConnectorConfiguration); + } + result = new Tuple(cellInstanceServiceV2With, fileConnectorConfiguration); + return result; + } + + protected static EquipmentTypeVersion GetEquipmentTypeVersion(string url) + { + EquipmentTypeVersion result; + byte[] byteArray; + ConfigurationData configurationData; + string decodedCellInstanceConfigurationData; + string xml; + try + { + xml = XDocument.Load(url).ToString(); + } + catch (System.Exception exception) + { + throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); + } + configurationData = ParseXML(xml, throwExceptions: true); + byteArray = Convert.FromBase64String(configurationData.Data); + decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); + if (xml.Length <= 41) + throw new Exception(string.Concat("xml isn't valid {", xml, "}")); + decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); + result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); + return result; + } + + protected Tuple GetEquipmentTypeVersionTuple(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName) + { + Tuple result; + EquipmentTypeVersion equipmentTypeVersion; + Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersion, cellInstanceConnectionName); + int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); + ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; + string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration"); + if (_EquipmentTypeVersions.ContainsKey(equipmentTypeServiceV2)) + equipmentTypeVersion = _EquipmentTypeVersions[equipmentTypeServiceV2]; + else + { + equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2); + _EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion); + } + result = new Tuple(equipmentTypeServiceV2, componentsCellComponentCellComponent.Equipment.EquipmentType.Name, componentsCellComponentCellComponent.Equipment.EquipmentType.Version, equipmentTypeVersion); + return result; + } + + protected Tuple GetParameterizedModelObjectDefinitionTypeTuple(Tuple equipmentTypeVersionTuple) + { + Tuple result; + string parameterizedModelObjectDefinitionType; + if (_FileConnectorConfigurations.ContainsKey(equipmentTypeVersionTuple.Item1)) + parameterizedModelObjectDefinitionType = _ParameterizedModelObjectDefinitionTypes[equipmentTypeVersionTuple.Item1]; + else + parameterizedModelObjectDefinitionType = equipmentTypeVersionTuple.Item4.FileHandlerObjectTypes.ParameterizedModelObjectDefinition.Type; + result = new Tuple(equipmentTypeVersionTuple.Item1, parameterizedModelObjectDefinitionType); + return result; + } + + protected IList GetModelObjectParameters(string json) + { + IList results; + JsonSerializerOptions jsonSerializerOptions = new() + { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; + JsonElement jsonElement = JsonSerializer.Deserialize(json); + string parameters = "Parameters"; + string fileHandlerObjectTypes = nameof(FileHandlerObjectTypes); + string parameterizedModelObjectDefinition = nameof(ParameterizedModelObjectDefinition); + if (!json.Contains(fileHandlerObjectTypes) || !json.Contains(parameterizedModelObjectDefinition)) + throw new Exception(); + jsonElement = jsonElement.GetProperty(fileHandlerObjectTypes); + if (jsonElement.ValueKind != JsonValueKind.Object) + throw new Exception(); + jsonElement = jsonElement.GetProperty(parameterizedModelObjectDefinition); + if (jsonElement.ValueKind != JsonValueKind.Object) + throw new Exception(); + jsonElement = jsonElement.GetProperty(parameters); + if (jsonElement.ValueKind != JsonValueKind.Array) + throw new Exception(); + results = JsonSerializer.Deserialize>(jsonElement.ToString(), jsonSerializerOptions); + return results; + } + + protected Tuple> GetModelObjectParameters(Tuple equipmentTypeVersionTuple) + { + Tuple> result; + IList modelObjectParameters; + if (_FileConnectorConfigurations.ContainsKey(equipmentTypeVersionTuple.Item1)) + modelObjectParameters = _ModelObjectParameters[equipmentTypeVersionTuple.Item1]; + else + { + string json = JsonSerializer.Serialize(equipmentTypeVersionTuple.Item4, new JsonSerializerOptions { WriteIndented = true }); + modelObjectParameters = GetModelObjectParameters(json); + } + result = new Tuple>(equipmentTypeVersionTuple.Item1, modelObjectParameters); + return result; + } + + protected string[] GetEquipmentDictionaryStrings(ComponentsCellComponentCellComponentEquipment componentsCellComponentCellComponentEquipment, EquipmentTypeVersion equipmentTypeVersion) + { + string[] results; + string equipmentDictionaryName; + string equipmentDictionaryVersionName; + if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || !equipmentTypeVersion.EventActionSequences.Any() || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any()) + { + equipmentDictionaryName = string.Empty; + equipmentDictionaryVersionName = string.Empty; + } + else + { + if (componentsCellComponentCellComponentEquipment?.EquipmentDictionaries.CellEquipmentDictionaryReference is null) { + // equipmentDictionaryName = equipmentTypeVersion.Dictionaries.EquipmentTypeDictionaryReference.DictionaryName; + // equipmentDictionaryVersionName = equipmentTypeVersion.Dictionaries.EquipmentTypeDictionaryReference.DictionaryVersion; equipmentDictionaryName = string.Empty; equipmentDictionaryVersionName = string.Empty; } else { - if (componentsCellComponentCellComponentEquipment?.EquipmentDictionaries.CellEquipmentDictionaryReference is null) - { - equipmentDictionaryName = equipmentTypeVersion.Dictionaries.EquipmentTypeDictionaryReference.DictionaryName; - equipmentDictionaryVersionName = equipmentTypeVersion.Dictionaries.EquipmentTypeDictionaryReference.DictionaryVersion; - } - else - { - equipmentDictionaryName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryName; - equipmentDictionaryVersionName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryVersion; - } + equipmentDictionaryName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryName; + equipmentDictionaryVersionName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryVersion; } - results = new string[] { equipmentDictionaryName, equipmentDictionaryVersionName }; - return results; } + results = new string[] { equipmentDictionaryName, equipmentDictionaryVersionName }; + return results; + } - protected EquipmentDictionaryVersion GetEquipmentDictionaryVersion(string url) + protected static EquipmentDictionaryVersion GetEquipmentDictionaryVersion(string url) + { + EquipmentDictionaryVersion result; + string xml; + try { - EquipmentDictionaryVersion result; - string xml; - try - { - xml = XDocument.Load(url).ToString(); - } - catch (System.Exception exception) - { - throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); - } - ConfigurationData configurationData = ParseXML(xml, throwExceptions: true); - byte[] byteArray = Convert.FromBase64String(configurationData.Data); - string decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); - if (xml.Length <= 41) - throw new Exception(string.Concat("xml isn't valid {", xml, "}")); - decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); - result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); - return result; + xml = XDocument.Load(url).ToString(); } - - protected Tuple GetEquipmentDictionaryVersionTuple(string cellInstanceName, string cellInstanceVersionName, CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName, EquipmentTypeVersion equipmentTypeVersion) + catch (System.Exception exception) { - Tuple result; - string equipmentDictionaryName; - string equipmentDictionaryVersionName; - EquipmentDictionaryVersion equipmentDictionaryVersion; - Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersion, cellInstanceConnectionName); - int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); - ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; - string[] segments = GetEquipmentDictionaryStrings(componentsCellComponentCellComponent.Equipment, equipmentTypeVersion); - if (_SkipEquipmentDictionary || segments is null || segments.Length != 2 || string.IsNullOrEmpty(segments[0]) || string.IsNullOrEmpty(segments[1])) - { - equipmentDictionaryName = string.Empty; - equipmentDictionaryVersionName = string.Empty; - } + throw new Exception(string.Concat(url, System.Environment.NewLine, exception.Message)); + } + ConfigurationData configurationData = ParseXML(xml, throwExceptions: true); + byte[] byteArray = Convert.FromBase64String(configurationData.Data); + string decodedCellInstanceConfigurationData = Encoding.Unicode.GetString(byteArray); + if (xml.Length <= 41) + throw new Exception(string.Concat("xml isn't valid {", xml, "}")); + decodedCellInstanceConfigurationData = decodedCellInstanceConfigurationData.Substring(41).Replace("i:type", "i___type"); + result = ParseXML(decodedCellInstanceConfigurationData, throwExceptions: true); + return result; + } + + protected Tuple GetEquipmentDictionaryVersionTuple(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName, EquipmentTypeVersion equipmentTypeVersion) + { + Tuple result; + string equipmentDictionaryName; + string equipmentDictionaryVersionName; + EquipmentDictionaryVersion equipmentDictionaryVersion; + Dictionary componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersion, cellInstanceConnectionName); + int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes); + ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]]; + string[] segments = GetEquipmentDictionaryStrings(componentsCellComponentCellComponent.Equipment, equipmentTypeVersion); + if (_SkipEquipmentDictionary || segments is null || segments.Length != 2 || string.IsNullOrEmpty(segments[0]) || string.IsNullOrEmpty(segments[1])) + { + equipmentDictionaryName = string.Empty; + equipmentDictionaryVersionName = string.Empty; + } + else + { + equipmentDictionaryName = segments[0]; + equipmentDictionaryVersionName = segments[1]; + } + string equipmentDictionaryServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentDictionaryServiceV2/", equipmentDictionaryName, "/", equipmentDictionaryVersionName, "/configuration"); + if (string.IsNullOrEmpty(equipmentDictionaryName) || string.IsNullOrEmpty(equipmentDictionaryVersionName)) + equipmentDictionaryVersion = null; + else + { + if (_EquipmentDictionaryVersions.ContainsKey(equipmentDictionaryServiceV2)) + equipmentDictionaryVersion = _EquipmentDictionaryVersions[equipmentDictionaryServiceV2]; else { - equipmentDictionaryName = segments[0]; - equipmentDictionaryVersionName = segments[1]; + equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2); + _EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion); } - string equipmentDictionaryServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentDictionaryServiceV2/", equipmentDictionaryName, "/", equipmentDictionaryVersionName, "/configuration"); - if (string.IsNullOrEmpty(equipmentDictionaryName) || string.IsNullOrEmpty(equipmentDictionaryVersionName)) - equipmentDictionaryVersion = null; - else + } + result = new Tuple(equipmentDictionaryServiceV2, equipmentDictionaryName, equipmentDictionaryVersionName, equipmentDictionaryVersion); + return result; + } + + protected Tuple>> GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(Tuple equipmentDictionaryVersionTuple) + { + Tuple>> result; + List> results; + if (_SkipEquipmentDictionary) + results = new List>(); + else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1)) + throw new Exception(); + else if (equipmentDictionaryVersionTuple?.Item4?.Events?.Event is null) + results = new List>(); + else if (_EquipmentDictionaryEventDescriptions.ContainsKey(equipmentDictionaryVersionTuple.Item1)) + results = _EquipmentDictionaryEventDescriptions[equipmentDictionaryVersionTuple.Item1]; + else + { + results = new List>(); + foreach (EquipmentDictionaryVersionEventsEvent equipmentDictionaryVersionEventsEvent in equipmentDictionaryVersionTuple.Item4.Events.Event) { - if (_EquipmentDictionaryVersions.ContainsKey(equipmentDictionaryServiceV2)) - equipmentDictionaryVersion = _EquipmentDictionaryVersions[equipmentDictionaryServiceV2]; - else - { - equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2); - _EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion); - } - } - result = new Tuple(equipmentDictionaryServiceV2, equipmentDictionaryName, equipmentDictionaryVersionName, equipmentDictionaryVersion); - return result; - } - - protected Tuple>> GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(Tuple equipmentDictionaryVersionTuple) - { - Tuple>> result; - List> results; - if (_SkipEquipmentDictionary) - results = new List>(); - else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1)) - throw new Exception(); - else if (_EquipmentDictionaryEventDescriptions.ContainsKey(equipmentDictionaryVersionTuple.Item1)) - results = _EquipmentDictionaryEventDescriptions[equipmentDictionaryVersionTuple.Item1]; - else - { - results = new List>(); - foreach (EquipmentDictionaryVersionEventsEvent equipmentDictionaryVersionEventsEvent in equipmentDictionaryVersionTuple.Item4.Events.Event) - { - if (string.IsNullOrEmpty(equipmentDictionaryVersionEventsEvent.Description)) - continue; - if (!equipmentDictionaryVersionEventsEvent.IsAlwaysEnabled) - continue; - results.Add(new Tuple(equipmentDictionaryVersionEventsEvent.Name, equipmentDictionaryVersionEventsEvent.Description)); - } - } - result = new Tuple>>(equipmentDictionaryVersionTuple.Item1, results); - return result; - } - - protected Dictionary GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, List> equipmentDictionaryIsAlwaysEnabledEvents) - { - Dictionary results = new Dictionary - { - { nameof(Environment), _Environment }, - { nameof(HostNameAndPort), _HostNameAndPort }, - { nameof(cellInstanceName), cellInstanceName }, - { nameof(equipmentTypeName), equipmentTypeName }, - { nameof(cellInstanceVersionName), cellInstanceVersionName }, - { nameof(cellInstanceConnectionName), cellInstanceConnectionName }, - { nameof(FileConnectorConfiguration), fileConnectorConfiguration }, - { nameof(IList), modelObjectParameters }, - { nameof(parameterizedModelObjectDefinitionType), parameterizedModelObjectDefinitionType }, - { nameof(equipmentDictionaryIsAlwaysEnabledEvents), equipmentDictionaryIsAlwaysEnabledEvents } - }; - return results; - } - - public string[] GetCSharpText(string testName) - { - string[] results; - string[] segments = GetSegments(testName); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) - Directory.CreateDirectory(fileInfo.Directory.FullName); - Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - results = GetCSharpTextB(cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2, fileInfo); - return results; - } - - public string[] GetConfiguration(MethodBase methodBase) - { - string[] results; - string[] segments = GetSegments(methodBase.Name); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) - Directory.CreateDirectory(fileInfo.Directory.FullName); - Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); - Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2, cellInstanceConnectionName); - Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); - Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); - Tuple equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4); - Tuple>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); - Dictionary objects = GetKeyValuePairs(cellInstanceName, cellInstanceVersionName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2); - string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true }); - results = new string[] { fileInfo.FullName, json }; - return results; - } - - public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription) - { - IFileRead result; - string[] segments = GetSegments(methodBase.Name); - FileInfo fileInfo = GetFileName(segments); - string cellInstanceName = GetCellInstanceName(segments); - string cellInstanceVersionName = GetCellInstanceVersionName(segments); - Dictionary fileParameter = new Dictionary(); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) - Directory.CreateDirectory(fileInfo.Directory.FullName); - Dictionary> dummyRuns = new Dictionary>(); - Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); - Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); - Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2, cellInstanceConnectionName); - Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); - Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); - if (!string.IsNullOrEmpty(sourceFileLocation) && sourceFileLocation != fileConnectorConfigurationTuple.Item2.SourceFileLocation) - fileConnectorConfigurationTuple.Item2.SourceFileLocation = sourceFileLocation; - if (!string.IsNullOrEmpty(sourceFileFilter) && sourceFileFilter != fileConnectorConfigurationTuple.Item2.SourceFileFilter) - { - fileConnectorConfigurationTuple.Item2.SourceFileFilter = sourceFileFilter; - fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList(); - } - result = Adaptation.FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, dummyRuns, useCyclicalForDescription, isEAFHosted: false); - return result; - } - - public string[] GetVariables(MethodBase methodBase, string check) - { - string[] results; - string[] lines; - string ipdsfFile; - string textFileDirectory; - string fileNameWithoutExtension; - string searchPattern = "*.ipdsf"; - string sourceFileFilter = string.Empty; - string sourceFileLocation = string.Empty; - string[] segments = GetSegments(methodBase); - string ticks = GetTicks(segments); - FileInfo fileInfo = GetFileName(segments); - string[] textFiles = GetTextFiles(segments); - string cellInstanceName = GetCellInstanceName(segments); - string rawCellInstanceName = GetRawCellInstanceName(segments); - string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); - string cellInstanceConnectionNameFromMethodBaseName = GetCellInstanceConnectionNameFromMethodBaseName(segments); - string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); - if (!textFiles.Any()) - textFileDirectory = string.Empty; - else - textFileDirectory = Path.GetDirectoryName(textFiles[0]); - foreach (string textFile in textFiles) - { - lines = File.ReadAllLines(textFile); - if (lines.Length != 1) + if (string.IsNullOrEmpty(equipmentDictionaryVersionEventsEvent.Description)) continue; - fileNameWithoutExtension = Path.GetFileNameWithoutExtension(textFile); - if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileFilter)) - sourceFileFilter = lines[0]; - else if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileLocation)) - { - segments = lines[0].Split(new string[] { ticks }, StringSplitOptions.None); - if (segments.Length > 2) - throw new Exception("Ticks should only appear once in source file location!"); - if (segments.Length != 2) - throw new Exception("Ticks missing from source file location!"); - if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(ticks, string.Empty))) - throw new Exception("Method name missing from source file location!"); - sourceFileLocation = lines[0]; - } + if (!equipmentDictionaryVersionEventsEvent.IsAlwaysEnabled) + continue; + results.Add(new Tuple(equipmentDictionaryVersionEventsEvent.Name, equipmentDictionaryVersionEventsEvent.Description)); } - if (!Directory.Exists(fileInfo.Directory.FullName)) - Directory.CreateDirectory(fileInfo.Directory.FullName); - if (!fileInfo.Exists) - throw new Exception(); - string json = File.ReadAllText(fileInfo.FullName); - if (!json.Contains(check)) - throw new Exception(); - if (!json.Contains(nameof(FileConnectorConfiguration))) - throw new Exception(); - JsonElement jsonElement = JsonSerializer.Deserialize(json); - JsonElement fileConnectorConfigurationJsonElement = jsonElement.GetProperty(nameof(FileConnectorConfiguration)); - if (fileConnectorConfigurationJsonElement.ValueKind != JsonValueKind.Object) - throw new Exception(); - JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; - FileConnectorConfiguration fileConnectorConfiguration = JsonSerializer.Deserialize(fileConnectorConfigurationJsonElement.ToString(), jsonSerializerOptions); - if (!string.IsNullOrEmpty(sourceFileFilter)) - fileConnectorConfiguration.SourceFileFilter = sourceFileFilter; - if (!string.IsNullOrEmpty(sourceFileLocation)) - fileConnectorConfiguration.SourceFileLocation = sourceFileLocation; - if (string.IsNullOrEmpty(sourceFileLocation)) + } + result = new Tuple>>(equipmentDictionaryVersionTuple.Item1, results); + return result; + } + + protected Dictionary GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, List> equipmentDictionaryIsAlwaysEnabledEvents) + { + Dictionary results = new() + { + { nameof(Environment), _Environment }, + { nameof(HostNameAndPort), _HostNameAndPort }, + { nameof(cellInstanceName), cellInstanceName }, + { nameof(equipmentTypeName), equipmentTypeName }, + { nameof(cellInstanceVersionName), cellInstanceVersionName }, + { nameof(equipmentDictionaryName), equipmentDictionaryName }, + { nameof(cellInstanceConnectionName), cellInstanceConnectionName }, + { nameof(FileConnectorConfiguration), fileConnectorConfiguration }, + { nameof(IList), modelObjectParameters }, + { nameof(parameterizedModelObjectDefinitionType), parameterizedModelObjectDefinitionType }, + { nameof(equipmentDictionaryIsAlwaysEnabledEvents), equipmentDictionaryIsAlwaysEnabledEvents } + }; + return results; + } + + public string[] GetCSharpText(string testName) + { + string[] results; + string[] segments = GetSegments(testName); + FileInfo fileInfo = GetFileName(segments); + string cellInstanceName = GetCellInstanceName(segments); + string cellInstanceVersionName = GetCellInstanceVersionName(segments); + string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); + if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); + results = GetCSharpTextB(fileInfo, cellInstanceName, cellInstanceVersionName, cellInstanceVersionTuple.Item2); + return results; + } + + public string[] GetConfiguration(MethodBase methodBase) + { + string[] results; + string[] segments = GetSegments(methodBase.Name); + FileInfo fileInfo = GetFileName(segments); + string cellInstanceName = GetCellInstanceName(segments); + string cellInstanceVersionName = GetCellInstanceVersionName(segments); + string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); + if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); + Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); + Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); + Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); + Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); + Tuple equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4); + Tuple>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); + Dictionary objects = GetKeyValuePairs(cellInstanceName, cellInstanceVersionName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2); + string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true }); + results = new string[] { fileInfo.FullName, json }; + return results; + } + + public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription) + { + IFileRead result; + string[] segments = GetSegments(methodBase.Name); + FileInfo fileInfo = GetFileName(segments); + string cellInstanceName = GetCellInstanceName(segments); + string cellInstanceVersionName = GetCellInstanceVersionName(segments); + Dictionary fileParameter = new(); + string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); + if (!string.IsNullOrEmpty(cellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Dictionary> dummyRuns = new(); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(cellInstanceName, cellInstanceVersionName); + Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, cellInstanceConnectionName); + Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName); + Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); + Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); + Tuple equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, cellInstanceConnectionName, equipmentTypeVersionTuple.Item4); + + _ = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); + if (!string.IsNullOrEmpty(sourceFileLocation) && sourceFileLocation != fileConnectorConfigurationTuple.Item2.SourceFileLocation) + fileConnectorConfigurationTuple.Item2.SourceFileLocation = sourceFileLocation; + if (!string.IsNullOrEmpty(sourceFileFilter) && sourceFileFilter != fileConnectorConfigurationTuple.Item2.SourceFileFilter) + { + fileConnectorConfigurationTuple.Item2.SourceFileFilter = sourceFileFilter; + fileConnectorConfigurationTuple.Item2.SourceFileFilters = sourceFileFilter.Split('|').ToList(); + } + result = Adaptation.FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, useCyclicalForDescription, isEAFHosted: false); + return result; + } + + public string[] GetVariables(MethodBase methodBase, string check) + { + string[] results; + string[] lines; + string ipdsfFile; + string textFileDirectory; + string fileNameWithoutExtension; + string searchPattern = "*.ipdsf"; + string sourceFileFilter = string.Empty; + string sourceFileLocation = string.Empty; + string[] segments = GetSegments(methodBase); + string ticks = GetTicks(segments); + FileInfo fileInfo = GetFileName(segments); + string[] textFiles = GetTextFiles(segments); + string cellInstanceName = GetCellInstanceName(segments); + string rawCellInstanceName = GetRawCellInstanceName(segments); + string cellInstanceConnectionName = GetCellInstanceConnectionName(segments); + string cellInstanceConnectionNameFromMethodBaseName = GetCellInstanceConnectionNameFromMethodBaseName(segments); + string methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + if (!textFiles.Any()) + textFileDirectory = string.Empty; + else + textFileDirectory = Path.GetDirectoryName(textFiles[0]); + foreach (string textFile in textFiles) + { + lines = File.ReadAllLines(textFile); + if (lines.Length != 1) + continue; + fileNameWithoutExtension = Path.GetFileNameWithoutExtension(textFile); + if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileFilter)) + sourceFileFilter = lines[0]; + else if (fileNameWithoutExtension == nameof(FileConnectorConfiguration.SourceFileLocation)) + { + segments = lines[0].Split(new string[] { ticks }, StringSplitOptions.None); + if (segments.Length > 2) + throw new Exception("Ticks should only appear once in source file location!"); + if (segments.Length != 2) + throw new Exception("Ticks missing from source file location!"); + if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(ticks, string.Empty))) + throw new Exception("Method name missing from source file location!"); + sourceFileLocation = lines[0]; + } + } + if (!Directory.Exists(fileInfo.Directory.FullName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + if (!fileInfo.Exists) + throw new Exception(); + string json = File.ReadAllText(fileInfo.FullName); + if (!json.Contains(check)) + throw new Exception(); + if (!json.Contains(nameof(FileConnectorConfiguration))) + throw new Exception(); + JsonElement jsonElement = JsonSerializer.Deserialize(json); + JsonElement fileConnectorConfigurationJsonElement = jsonElement.GetProperty(nameof(FileConnectorConfiguration)); + if (fileConnectorConfigurationJsonElement.ValueKind != JsonValueKind.Object) + throw new Exception(); + JsonSerializerOptions jsonSerializerOptions = new() + { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; + FileConnectorConfiguration fileConnectorConfiguration = JsonSerializer.Deserialize(fileConnectorConfigurationJsonElement.ToString(), jsonSerializerOptions); + if (!string.IsNullOrEmpty(sourceFileFilter)) + fileConnectorConfiguration.SourceFileFilter = sourceFileFilter; + if (!string.IsNullOrEmpty(sourceFileLocation)) + fileConnectorConfiguration.SourceFileLocation = sourceFileLocation; + if (string.IsNullOrEmpty(sourceFileLocation)) + ipdsfFile = searchPattern; + else + { + string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf"); + if (!Directory.Exists(ipdsfDirectory)) ipdsfFile = searchPattern; else { - string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf"); - if (!Directory.Exists(ipdsfDirectory)) - ipdsfFile = searchPattern; + string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (files.Any()) + ipdsfFile = files[0]; else - { - string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); - if (files.Any()) - ipdsfFile = files[0]; - else - ipdsfFile = searchPattern; - } + ipdsfFile = searchPattern; } - if (ipdsfFile == searchPattern) - throw new Exception(); - results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, textFileDirectory }; - if (string.IsNullOrEmpty(results[0])) - throw new Exception(); - if (string.IsNullOrEmpty(results[1])) - throw new Exception(); - if (string.IsNullOrEmpty(results[2])) - throw new Exception(); - if (string.IsNullOrEmpty(results[3])) - throw new Exception(); - if (string.IsNullOrEmpty(results[4])) - throw new Exception(); - if (string.IsNullOrEmpty(results[5])) - throw new Exception(); - return results; } - + if (ipdsfFile == searchPattern) + throw new Exception(); + results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, textFileDirectory }; + if (string.IsNullOrEmpty(results[0])) + throw new Exception(); + if (string.IsNullOrEmpty(results[1])) + throw new Exception(); + if (string.IsNullOrEmpty(results[2])) + throw new Exception(); + if (string.IsNullOrEmpty(results[3])) + throw new Exception(); + if (string.IsNullOrEmpty(results[4])) + throw new Exception(); + if (string.IsNullOrEmpty(results[5])) + throw new Exception(); + return results; } } -// namespace _Tests.Helpers { public class AdaptationTesting { } } \ No newline at end of file +// namespace _Tests.Helpers { public class AdaptationTesting { } } +// 2022-02-02 -> AdaptationTesting \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs index ee6db74..55f2723 100644 --- a/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs +++ b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs @@ -1,30 +1,24 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; -namespace Shared +namespace Shared; + +public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable { - public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable + protected readonly AdaptationTesting _AdaptationTesting; + + public AdaptationTesting AdaptationTesting => _AdaptationTesting; + + public EAFLoggingUnitTesting(TestContext testContext, Type declaringType, bool skipEquipmentDictionary) : + base(testContext, declaringType) { - - protected readonly AdaptationTesting _AdaptationTesting; - - public AdaptationTesting AdaptationTesting => _AdaptationTesting; - - public EAFLoggingUnitTesting(TestContext testContext, Type declaringType, bool skipEquipmentDictionary) : - base(testContext, declaringType) - { - if (testContext is null || declaringType is null) - _AdaptationTesting = null; - else - _AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary); - } - - public new void Dispose() - { - base.Dispose(); - } - + if (testContext is null || declaringType is null) + _AdaptationTesting = null; + else + _AdaptationTesting = new AdaptationTesting(testContext, skipEquipmentDictionary); } + public new void Dispose() => base.Dispose(); + } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/IsEnvironment.cs b/Adaptation/_Tests/Shared/IsEnvironment.cs index c24b236..d47716e 100644 --- a/Adaptation/_Tests/Shared/IsEnvironment.cs +++ b/Adaptation/_Tests/Shared/IsEnvironment.cs @@ -2,170 +2,167 @@ using System; using System.Diagnostics; using System.Runtime.InteropServices; -namespace Shared +namespace Shared; + +public class IsEnvironment { - public class IsEnvironment + public enum Name { + LinuxDevelopment, + LinuxProduction, + LinuxStaging, + OSXDevelopment, + OSXProduction, + OSXStaging, + WindowsDevelopment, + WindowsProduction, + WindowsStaging + } - public enum Name + public bool DebuggerWasAttachedDuringConstructor { get; private set; } + public bool Development { get; private set; } + public bool Linux { get; private set; } + public bool OSX { get; private set; } + public bool Production { get; private set; } + public bool Staging { get; private set; } + public bool Windows { get; private set; } + public string Profile { get; private set; } + public string AppSettingsFileName { get; private set; } + public string ASPNetCoreEnvironment { get; private set; } + + public IsEnvironment(string testCategory) + { + if (testCategory.EndsWith(".json")) { - LinuxDevelopment, - LinuxProduction, - LinuxStaging, - OSXDevelopment, - OSXProduction, - OSXStaging, - WindowsDevelopment, - WindowsProduction, - WindowsStaging - } - - public bool DebuggerWasAttachedDuringConstructor { get; private set; } - public bool Development { get; private set; } - public bool Linux { get; private set; } - public bool OSX { get; private set; } - public bool Production { get; private set; } - public bool Staging { get; private set; } - public bool Windows { get; private set; } - public string Profile { get; private set; } - public string AppSettingsFileName { get; private set; } - public string ASPNetCoreEnvironment { get; private set; } - - public IsEnvironment(string testCategory) - { - if (testCategory.EndsWith(".json")) - { - Production = testCategory == "appsettings.json"; - Staging = testCategory.EndsWith(nameof(Staging)); - OSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); - Development = testCategory.EndsWith(nameof(Development)); - Linux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); - DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; - Windows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); - } - else - { - DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; - OSX = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(OSX)); - ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); - Linux = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(Linux)); - Staging = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Staging)); - Windows = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(Windows)); - Production = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Production)); - Development = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Development)); - } - Profile = GetProfile(); - AppSettingsFileName = GetAppSettingsFileName(processesCount: null); - } - - public IsEnvironment(bool isDevelopment, bool isStaging, bool isProduction) - { - Staging = isStaging; - Production = isProduction; - Development = isDevelopment; + Production = testCategory == "appsettings.json"; + Staging = testCategory.EndsWith(nameof(Staging)); OSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + Development = testCategory.EndsWith(nameof(Development)); Linux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; Windows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); - Profile = GetProfile(); - AppSettingsFileName = GetAppSettingsFileName(processesCount: null); } - - public IsEnvironment(int? processesCount, bool nullASPNetCoreEnvironmentIsDevelopment, bool nullASPNetCoreEnvironmentIsProduction) + else { - OSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); - Linux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; - Windows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + OSX = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(OSX)); ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); - if (nullASPNetCoreEnvironmentIsDevelopment && nullASPNetCoreEnvironmentIsProduction) - throw new Exception(); - else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && nullASPNetCoreEnvironmentIsProduction) - Production = true; - else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && nullASPNetCoreEnvironmentIsDevelopment) - Development = true; - else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && !nullASPNetCoreEnvironmentIsDevelopment && !nullASPNetCoreEnvironmentIsProduction) - throw new Exception(); - else - { - Staging = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Staging)); - Production = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Production)); - Development = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Development)); - } - Profile = GetProfile(); - AppSettingsFileName = GetAppSettingsFileName(processesCount); + Linux = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(Linux)); + Staging = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Staging)); + Windows = !string.IsNullOrEmpty(testCategory) && testCategory.StartsWith(nameof(Windows)); + Production = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Production)); + Development = !string.IsNullOrEmpty(testCategory) && testCategory.EndsWith(nameof(Development)); } + Profile = GetProfile(); + AppSettingsFileName = GetAppSettingsFileName(processesCount: null); + } - private string GetProfile() + public IsEnvironment(bool isDevelopment, bool isStaging, bool isProduction) + { + Staging = isStaging; + Production = isProduction; + Development = isDevelopment; + OSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + Linux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); + DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; + Windows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); + Profile = GetProfile(); + AppSettingsFileName = GetAppSettingsFileName(processesCount: null); + } + + public IsEnvironment(int? processesCount, bool nullASPNetCoreEnvironmentIsDevelopment, bool nullASPNetCoreEnvironmentIsProduction) + { + OSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + Linux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); + DebuggerWasAttachedDuringConstructor = Debugger.IsAttached; + Windows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + ASPNetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); + if (nullASPNetCoreEnvironmentIsDevelopment && nullASPNetCoreEnvironmentIsProduction) + throw new Exception(); + else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && nullASPNetCoreEnvironmentIsProduction) + Production = true; + else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && nullASPNetCoreEnvironmentIsDevelopment) + Development = true; + else if (string.IsNullOrEmpty(ASPNetCoreEnvironment) && !nullASPNetCoreEnvironmentIsDevelopment && !nullASPNetCoreEnvironmentIsProduction) + throw new Exception(); + else { - string result; - if (Windows && Production) - result = nameof(Production); - else if (Windows && Staging) - result = nameof(Staging); - else if (Windows && Development) - result = nameof(Development); - else if (Linux && Production) - result = nameof(Name.LinuxProduction); - else if (Linux && Staging) - result = nameof(Name.LinuxStaging); - else if (Linux && Development) - result = nameof(Name.LinuxDevelopment); - else if (OSX && Production) - result = nameof(Name.OSXProduction); - else if (OSX && Staging) - result = nameof(Name.OSXStaging); - else if (OSX && Development) - result = nameof(Name.OSXDevelopment); + Staging = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Staging)); + Production = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Production)); + Development = ASPNetCoreEnvironment is not null && ASPNetCoreEnvironment.EndsWith(nameof(Development)); + } + Profile = GetProfile(); + AppSettingsFileName = GetAppSettingsFileName(processesCount); + } + + private string GetProfile() + { + string result; + if (Windows && Production) + result = nameof(Production); + else if (Windows && Staging) + result = nameof(Staging); + else if (Windows && Development) + result = nameof(Development); + else if (Linux && Production) + result = nameof(Name.LinuxProduction); + else if (Linux && Staging) + result = nameof(Name.LinuxStaging); + else if (Linux && Development) + result = nameof(Name.LinuxDevelopment); + else if (OSX && Production) + result = nameof(Name.OSXProduction); + else if (OSX && Staging) + result = nameof(Name.OSXStaging); + else if (OSX && Development) + result = nameof(Name.OSXDevelopment); + else + throw new Exception(); + return result; + } + + private string GetAppSettingsFileName(int? processesCount) + { + string result; + if (Production) + { + if (processesCount is null) + result = "appsettings.json"; + else + result = $"appsettings.{processesCount}.json"; + } + else + { + string environment; + if (Staging) + environment = nameof(Staging); + else if (Development) + environment = nameof(Development); else throw new Exception(); - return result; - } - - private string GetAppSettingsFileName(int? processesCount) - { - string result; - if (Production) - { - if (processesCount is null) - result = "appsettings.json"; - else - result = $"appsettings.{processesCount}.json"; - } + if (processesCount is null) + result = $"appsettings.{environment}.json"; else - { - string environment; - if (Staging) - environment = nameof(Staging); - else if (Development) - environment = nameof(Development); - else - throw new Exception(); - if (processesCount is null) - result = $"appsettings.{environment}.json"; - else - result = $"appsettings.{environment}.{processesCount}.json"; - } - return result; - } - - public static string GetEnvironmentName(IsEnvironment isEnvironment) - { - string result; - if (isEnvironment.Windows) - result = nameof(IsEnvironment.Windows); - else if (isEnvironment.Linux) - result = nameof(IsEnvironment.Linux); - else if (isEnvironment.OSX) - result = nameof(IsEnvironment.OSX); - else - throw new Exception(); - return result; + result = $"appsettings.{environment}.{processesCount}.json"; } + return result; + } + public static string GetEnvironmentName(IsEnvironment isEnvironment) + { + string result; + if (isEnvironment.Windows) + result = nameof(IsEnvironment.Windows); + else if (isEnvironment.Linux) + result = nameof(IsEnvironment.Linux); + else if (isEnvironment.OSX) + result = nameof(IsEnvironment.OSX); + else + throw new Exception(); + return result; } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/LoggingUnitTesting.cs b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs index d662753..4fd30be 100644 --- a/Adaptation/_Tests/Shared/LoggingUnitTesting.cs +++ b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs @@ -5,109 +5,103 @@ using System; using System.Collections.Generic; using System.IO; -namespace Shared +namespace Shared; + +public class LoggingUnitTesting : UnitTesting, IDisposable { - public class LoggingUnitTesting : UnitTesting, IDisposable + protected ILogger _Logger; + protected ILoggerFactory _LoggerFactory; + protected readonly LogLevel? _DefaultLogLevel; + protected readonly LogLevel? _Log4netProviderLogLevel; + protected readonly IConfigurationRoot _ConfigurationRoot; + public ILogger Logger => _Logger; + public LogLevel? DefaultLogLevel => _DefaultLogLevel; + public ILoggerFactory LoggerFactory => _LoggerFactory; + public IConfigurationRoot ConfigurationRoot => _ConfigurationRoot; + public LogLevel? Log4netProviderLogLevel => _Log4netProviderLogLevel; + + public LoggingUnitTesting(TestContext testContext, Type declaringType) : + base(testContext, declaringType) { - - protected ILogger _Logger; - protected ILoggerFactory _LoggerFactory; - protected readonly LogLevel? _DefaultLogLevel; - protected readonly LogLevel? _Log4netProviderLogLevel; - protected readonly IConfigurationRoot _ConfigurationRoot; - public ILogger Logger => _Logger; - public LogLevel? DefaultLogLevel => _DefaultLogLevel; - public ILoggerFactory LoggerFactory => _LoggerFactory; - public IConfigurationRoot ConfigurationRoot => _ConfigurationRoot; - public LogLevel? Log4netProviderLogLevel => _Log4netProviderLogLevel; - - public LoggingUnitTesting(TestContext testContext, Type declaringType) : - base(testContext, declaringType) + _LoggerFactory = new LoggerFactory(); + if (testContext is null || declaringType is null) { - _LoggerFactory = new LoggerFactory(); - if (testContext is null || declaringType is null) - { - _ConfigurationRoot = null; - _DefaultLogLevel = null; - _Log4netProviderLogLevel = null; - } - else - { - LogLevel logLevel; - IConfigurationSection configurationSection; - List logLevels = new List(); - string defaultLogLevelSection = "Logging:LogLevel:Default"; - string log4netProviderLogLevelSection = "Logging:LogLevel:Log4netProvider"; - string[] sections = new string[] { defaultLogLevelSection, log4netProviderLogLevelSection }; - IConfigurationBuilder configurationBuilder = new ConfigurationBuilder() - .AddEnvironmentVariables() - .AddJsonFile(_IsEnvironment.AppSettingsFileName, optional: false, reloadOnChange: true); - _ConfigurationRoot = configurationBuilder.Build(); - foreach (string section in sections) - { - configurationSection = _ConfigurationRoot.GetSection(section); - if (configurationSection is null) - logLevel = LogLevel.Debug; - else if (!Enum.TryParse(configurationSection.Value, out logLevel)) - logLevel = LogLevel.Debug; - logLevels.Add(logLevel); - } - _DefaultLogLevel = logLevels[0]; - _Log4netProviderLogLevel = logLevels[1]; - } - if (DefaultLogLevel.HasValue) - _LoggerFactory.AddProvider(new DebugProvider(DefaultLogLevel.Value)); - if (DefaultLogLevel.HasValue) - _LoggerFactory.AddProvider(new ConsoleProvider(DefaultLogLevel.Value)); - _Logger = _LoggerFactory.CreateLogger(); + _ConfigurationRoot = null; + _DefaultLogLevel = null; + _Log4netProviderLogLevel = null; } - - public static string GetEnvironmentSpecialDirectory() + else { - string result = string.Empty; - string traceFile; - List directories = new List(); - Environment.SpecialFolder[] specialFolders = new Environment.SpecialFolder[] + LogLevel logLevel; + IConfigurationSection configurationSection; + List logLevels = new(); + string defaultLogLevelSection = "Logging:LogLevel:Default"; + string log4netProviderLogLevelSection = "Logging:LogLevel:Log4netProvider"; + string[] sections = new string[] { defaultLogLevelSection, log4netProviderLogLevelSection }; + IConfigurationBuilder configurationBuilder = new ConfigurationBuilder() + .AddEnvironmentVariables() + .AddJsonFile(_IsEnvironment.AppSettingsFileName, optional: false, reloadOnChange: true); + _ConfigurationRoot = configurationBuilder.Build(); + foreach (string section in sections) { + configurationSection = _ConfigurationRoot.GetSection(section); + if (configurationSection is null) + logLevel = LogLevel.Debug; + else if (!Enum.TryParse(configurationSection.Value, out logLevel)) + logLevel = LogLevel.Debug; + logLevels.Add(logLevel); + } + _DefaultLogLevel = logLevels[0]; + _Log4netProviderLogLevel = logLevels[1]; + } + if (DefaultLogLevel.HasValue) + _LoggerFactory.AddProvider(new DebugProvider(DefaultLogLevel.Value)); + if (DefaultLogLevel.HasValue) + _LoggerFactory.AddProvider(new ConsoleProvider(DefaultLogLevel.Value)); + _Logger = _LoggerFactory.CreateLogger(); + } + + public static string GetEnvironmentSpecialDirectory() + { + string result = string.Empty; + string traceFile; + List directories = new(); + Environment.SpecialFolder[] specialFolders = new Environment.SpecialFolder[] + { Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolder.ApplicationData, Environment.SpecialFolder.History, Environment.SpecialFolder.CommonApplicationData, Environment.SpecialFolder.InternetCache - }; - foreach (Environment.SpecialFolder specialFolder in specialFolders) - directories.Add(Environment.GetFolderPath(specialFolder)); - foreach (string directory in directories) - { - for (int i = 1; i < 3; i++) - { - if (i == 1) - result = directory; - else - result = string.Concat("D", directory.Substring(1)); - try - { - if (!Directory.Exists(result)) - Directory.CreateDirectory(result); - traceFile = string.Concat(result, @"\", DateTime.Now.Ticks, ".txt"); - File.WriteAllText(traceFile, traceFile); - File.Delete(traceFile); - break; - } - catch (Exception) { result = string.Empty; } - } - if (!string.IsNullOrEmpty(result)) - break; - } - return result; - } - - public void Dispose() + }; + foreach (Environment.SpecialFolder specialFolder in specialFolders) + directories.Add(Environment.GetFolderPath(specialFolder)); + foreach (string directory in directories) { - _LoggerFactory.Dispose(); + for (int i = 1; i < 3; i++) + { + if (i == 1) + result = directory; + else + result = string.Concat("D", directory.Substring(1)); + try + { + if (!Directory.Exists(result)) + _ = Directory.CreateDirectory(result); + traceFile = string.Concat(result, @"\", DateTime.Now.Ticks, ".txt"); + File.WriteAllText(traceFile, traceFile); + File.Delete(traceFile); + break; + } + catch (Exception) { result = string.Empty; } + } + if (!string.IsNullOrEmpty(result)) + break; } - + return result; } + public void Dispose() => _LoggerFactory.Dispose(); + } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs index 11362da..d657021 100644 --- a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs @@ -1,4660 +1,3054 @@ -namespace Shared.PasteSpecialXml.EAF.XML.API.CellInstance +namespace Shared.PasteSpecialXml.EAF.XML.API.CellInstance; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] +public partial class CellInstanceVersion { - // NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. + private string createdByField; + + private System.DateTime creationDateField; + + private object descriptionField; + + private ExtensionsVersionExtension[] extensionsField; + + private System.DateTime freezeDateField; + + private string frozenByField; + + private long idField; + + private bool isFrozenField; + + private bool isRetiredField; + + private System.DateTime retireDateField; + + private object retiredByField; + + private string cellCommunicatingRuleField; + + private string cellNotCommunicatingRuleField; + + private CellInstanceVersionCellSetting cellSettingField; + + private CellInstanceVersionComponentModel componentModelField; + + private SelectedDeploymentPackage[] deploymentPackagesField; + + private CellInstanceVersionEdaConnection edaConnectionField; + + private EquipmentConnectionSettings[] equipmentConnectionsField; + + private string nameField; + + private CellInstanceVersionParentInstance parentInstanceField; + + private CellInstanceVersionEdaTraceHandling edaTraceHandlingField; + + private string id1Field; + /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] - public partial class CellInstanceVersion + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string CreatedBy { - - private string createdByField; - - private System.DateTime creationDateField; - - private object descriptionField; - - private ExtensionsVersionExtension[] extensionsField; - - private System.DateTime freezeDateField; - - private string frozenByField; - - private long idField; - - private bool isFrozenField; - - private bool isRetiredField; - - private System.DateTime retireDateField; - - private object retiredByField; - - private string cellCommunicatingRuleField; - - private string cellNotCommunicatingRuleField; - - private CellInstanceVersionCellSetting cellSettingField; - - private CellInstanceVersionComponentModel componentModelField; - - private SelectedDeploymentPackage[] deploymentPackagesField; - - private CellInstanceVersionEdaConnection edaConnectionField; - - private EquipmentConnectionSettings[] equipmentConnectionsField; - - private string nameField; - - private CellInstanceVersionParentInstance parentInstanceField; - - private CellInstanceVersionEdaTraceHandling edaTraceHandlingField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public string CreatedBy - { - get - { - return this.createdByField; - } - set - { - this.createdByField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime CreationDate - { - get - { - return this.creationDateField; - } - set - { - this.creationDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = true)] - public object Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - [System.Xml.Serialization.XmlArrayItemAttribute("VersionExtension", IsNullable = false)] - public ExtensionsVersionExtension[] Extensions - { - get - { - return this.extensionsField; - } - set - { - this.extensionsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime FreezeDate - { - get - { - return this.freezeDateField; - } - set - { - this.freezeDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public string FrozenBy - { - get - { - return this.frozenByField; - } - set - { - this.frozenByField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public bool IsFrozen - { - get - { - return this.isFrozenField; - } - set - { - this.isFrozenField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public bool IsRetired - { - get - { - return this.isRetiredField; - } - set - { - this.isRetiredField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime RetireDate - { - get - { - return this.retireDateField; - } - set - { - this.retireDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = true)] - public object RetiredBy - { - get - { - return this.retiredByField; - } - set - { - this.retiredByField = value; - } - } - - /// - public string CellCommunicatingRule - { - get - { - return this.cellCommunicatingRuleField; - } - set - { - this.cellCommunicatingRuleField = value; - } - } - - /// - public string CellNotCommunicatingRule - { - get - { - return this.cellNotCommunicatingRuleField; - } - set - { - this.cellNotCommunicatingRuleField = value; - } - } - - /// - public CellInstanceVersionCellSetting CellSetting - { - get - { - return this.cellSettingField; - } - set - { - this.cellSettingField = value; - } - } - - /// - public CellInstanceVersionComponentModel ComponentModel - { - get - { - return this.componentModelField; - } - set - { - this.componentModelField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + - "nt", IsNullable = false)] - public SelectedDeploymentPackage[] DeploymentPackages - { - get - { - return this.deploymentPackagesField; - } - set - { - this.deploymentPackagesField = value; - } - } - - /// - public CellInstanceVersionEdaConnection EdaConnection - { - get - { - return this.edaConnectionField; - } - set - { - this.edaConnectionField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("EquipmentConnectionSettings", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances", IsNullable = false)] - public EquipmentConnectionSettings[] EquipmentConnections - { - get - { - return this.equipmentConnectionsField; - } - set - { - this.equipmentConnectionsField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public CellInstanceVersionParentInstance ParentInstance - { - get - { - return this.parentInstanceField; - } - set - { - this.parentInstanceField = value; - } - } - - /// - public CellInstanceVersionEdaTraceHandling EdaTraceHandling - { - get - { - return this.edaTraceHandlingField; - } - set - { - this.edaTraceHandlingField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.createdByField; + set => this.createdByField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + - "nt")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime CreationDate + { + get => this.creationDateField; + set => this.creationDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = true)] + public object Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + [System.Xml.Serialization.XmlArrayItemAttribute("VersionExtension", IsNullable = false)] + public ExtensionsVersionExtension[] Extensions + { + get => this.extensionsField; + set => this.extensionsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime FreezeDate + { + get => this.freezeDateField; + set => this.freezeDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string FrozenBy + { + get => this.frozenByField; + set => this.frozenByField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public bool IsFrozen + { + get => this.isFrozenField; + set => this.isFrozenField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public bool IsRetired + { + get => this.isRetiredField; + set => this.isRetiredField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime RetireDate + { + get => this.retireDateField; + set => this.retireDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = true)] + public object RetiredBy + { + get => this.retiredByField; + set => this.retiredByField = value; + } + + /// + public string CellCommunicatingRule + { + get => this.cellCommunicatingRuleField; + set => this.cellCommunicatingRuleField = value; + } + + /// + public string CellNotCommunicatingRule + { + get => this.cellNotCommunicatingRuleField; + set => this.cellNotCommunicatingRuleField = value; + } + + /// + public CellInstanceVersionCellSetting CellSetting + { + get => this.cellSettingField; + set => this.cellSettingField = value; + } + + /// + public CellInstanceVersionComponentModel ComponentModel + { + get => this.componentModelField; + set => this.componentModelField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + "nt", IsNullable = false)] - public partial class SelectedDeploymentPackage + public SelectedDeploymentPackage[] DeploymentPackages { - - private long idField; - - private string packageNameField; - - private string packageVersionField; - - /// - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public string PackageName - { - get - { - return this.packageNameField; - } - set - { - this.packageNameField = value; - } - } - - /// - public string PackageVersion - { - get - { - return this.packageVersionField; - } - set - { - this.packageVersionField = value; - } - } + get => this.deploymentPackagesField; + set => this.deploymentPackagesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + public CellInstanceVersionEdaConnection EdaConnection + { + get => this.edaConnectionField; + set => this.edaConnectionField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("EquipmentConnectionSettings", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities.CellInstances", IsNullable = false)] - public partial class EquipmentConnectionSettings + public EquipmentConnectionSettings[] EquipmentConnections { - - private string refField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } + get => this.equipmentConnectionsField; + set => this.equipmentConnectionsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public CellInstanceVersionParentInstance ParentInstance + { + get => this.parentInstanceField; + set => this.parentInstanceField = value; + } + + /// + public CellInstanceVersionEdaTraceHandling EdaTraceHandling + { + get => this.edaTraceHandlingField; + set => this.edaTraceHandlingField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt", IsNullable = false)] +public partial class SelectedDeploymentPackage +{ + + private long idField; + + private string packageNameField; + + private string packageVersionField; + + /// + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public string PackageName + { + get => this.packageNameField; + set => this.packageNameField = value; + } + + /// + public string PackageVersion + { + get => this.packageVersionField; + set => this.packageVersionField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] +public partial class EquipmentConnectionSettings +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +public partial class ExtensionsVersionExtension +{ + + private long idField; + + private string classNameField; + + private object configurationField; + + private string nameField; + + private object editorsField; + + private string id1Field; + + private string i___typeField; + + /// + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s")] + public string ClassName + { + get => this.classNameField; + set => this.classNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s", IsNullable = true)] + public object Configuration + { + get => this.configurationField; + set => this.configurationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tAutomationClient")] + public object Editors + { + get => this.editorsField; + set => this.editorsField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class CellInstanceVersionCellSetting +{ + + private long idField; + + private CellType cellTypeField; + + private string nameField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities")] - public partial class ExtensionsVersionExtension + public long Id { - - private long idField; - - private string classNameField; - - private object configurationField; - - private string nameField; - - private object editorsField; - - private string id1Field; - - private string i___typeField; - - /// - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s")] - public string ClassName - { - get - { - return this.classNameField; - } - set - { - this.classNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s", IsNullable = true)] - public object Configuration - { - get - { - return this.configurationField; - } - set - { - this.configurationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tAutomationClient")] - public object Editors - { - get - { - return this.editorsField; - } - set - { - this.editorsField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } + get => this.idField; + set => this.idField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class CellInstanceVersionCellSetting - { - - private long idField; - - private CellType cellTypeField; - - private string nameField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public CellType CellType - { - get - { - return this.cellTypeField; - } - set - { - this.cellTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities.CellInstances")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances", IsNullable = false)] - public partial class CellType + public CellType CellType { - - private long idField; - - private string nameField; - - private string versionField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.cellTypeField; + set => this.cellTypeField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class CellInstanceVersionComponentModel - { - - private long idField; - - private ComponentsCellComponent[] componentsField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - [System.Xml.Serialization.XmlArrayItemAttribute("CellComponent", IsNullable = false)] - public ComponentsCellComponent[] Components - { - get - { - return this.componentsField; - } - set - { - this.componentsField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities.CellInstances")] - public partial class ComponentsCellComponent + public string Name { - - private ComponentsCellComponentCellComponent[] childrenField; - - private ComponentsCellComponentEquipment equipmentField; - - private object equipmentObjectTypeField; - - private string nameField; - - private ComponentsCellComponentComponentParameter[] parametersField; - - private string typeField; - - private string idField; - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("CellComponent", IsNullable = false)] - public ComponentsCellComponentCellComponent[] Children - { - get - { - return this.childrenField; - } - set - { - this.childrenField = value; - } - } - - /// - public ComponentsCellComponentEquipment Equipment - { - get - { - return this.equipmentField; - } - set - { - this.equipmentField = value; - } - } - - /// - public object EquipmentObjectType - { - get - { - return this.equipmentObjectTypeField; - } - set - { - this.equipmentObjectTypeField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("ComponentParameter", IsNullable = false)] - public ComponentsCellComponentComponentParameter[] Parameters - { - get - { - return this.parametersField; - } - set - { - this.parametersField = value; - } - } - - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.nameField; + set => this.nameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentCellComponent + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 { + get => this.id1Field; + set => this.id1Field = value; + } +} - private object childrenField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] +public partial class CellType +{ - private ComponentsCellComponentCellComponentEquipment equipmentField; + private long idField; - private object equipmentObjectTypeField; + private string nameField; - private string nameField; + private string versionField; - private ComponentsCellComponentCellComponentComponentParameter[] parametersField; + private string id1Field; - private string typeField; - - private string idField; - - /// - public object Children - { - get - { - return this.childrenField; - } - set - { - this.childrenField = value; - } - } - - /// - public ComponentsCellComponentCellComponentEquipment Equipment - { - get - { - return this.equipmentField; - } - set - { - this.equipmentField = value; - } - } - - /// - public object EquipmentObjectType - { - get - { - return this.equipmentObjectTypeField; - } - set - { - this.equipmentObjectTypeField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("ComponentParameter", IsNullable = false)] - public ComponentsCellComponentCellComponentComponentParameter[] Parameters - { - get - { - return this.parametersField; - } - set - { - this.parametersField = value; - } - } - - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentCellComponentEquipment + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name { - - - private long idField; - - private ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries equipmentDictionariesField; - - private ComponentsCellComponentCellComponentEquipmentEquipmentType equipmentTypeField; - - private string nameField; - - private string alternateTargetFolderField; - - private long connectionRetryIntervalField; - - private ConnectionSettings connectionSettingsField; - - private bool copySourceFolderStructureField; - - private string defaultPlaceHolderValueField; - - private bool deleteEmptySourceSubFoldersField; - - private string errorPostProcessingModeField; - - private string errorTargetFileLocationField; - - private string errorTargetFileNameField; - - private string fileAgeFilterModeField; - - private string fileAgeThresholdField; - - private long fileHandleTimeoutField; - - private long fileHandleWaitTimeField; - - private int fileScanningIntervalInSecondsField; - - private string fileScanningOptionField; - - private int idleEventWaitTimeInSecondsField; - - private string ifFileExistActionField; - - private string ifPostProcessingFailsActionField; - - private bool includeSubDirectoriesField; - - private string postProcessingModeField; - - private long postProcessingRetriesField; - - private string preProcessingModeField; - - private string skipSearchDirectoryNamesField; - - private string sourceFileFilterField; - - private string sourceFileLocationField; - - private string targetFileLocationField; - - private string targetFileNameField; - - private bool triggerOnChangedField; - - private bool triggerOnCreatedField; - - private bool useZip64ModeField; - - private string zipErrorTargetFileNameField; - - private long zipFileAmountField; - - private long zipFileSubFolderLevelField; - - private long zipFileTimeField; - - private string zipModeField; - - private string zipTargetFileNameField; - - private string baudRateField; - - private string connectionModeField; - - private byte deviceIdField; - - private bool deviceIdFieldSpecified; - - private string hostField; - - private string linkTestTimerField; - - private ushort portField; - - private bool portFieldSpecified; - - private string portTypeField; - - private string sessionModeField; - - private string t1InterCharacterField; - - private string t2ProtocolField; - - private string t3MessageReplyField; - - private string t4InterBlockField; - - private string t5ConnectionSeperationField; - - private string t6HsmsControlMessageField; - - private string t7ConnectionIdleField; - - private string t8NetworkIntercharacterField; - - private string id1Field; - - private string i___typeField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - - /// - public ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries EquipmentDictionaries - { - get - { - return this.equipmentDictionariesField; - } - set - { - this.equipmentDictionariesField = value; - } - } - - /// - public ComponentsCellComponentCellComponentEquipmentEquipmentType EquipmentType - { - get - { - return this.equipmentTypeField; - } - set - { - this.equipmentTypeField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string AlternateTargetFolder - { - get - { - return this.alternateTargetFolderField; - } - set - { - this.alternateTargetFolderField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ConnectionRetryInterval - { - get - { - return this.connectionRetryIntervalField; - } - set - { - this.connectionRetryIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public ConnectionSettings ConnectionSettings - { - get - { - return this.connectionSettingsField; - } - set - { - this.connectionSettingsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool CopySourceFolderStructure - { - get - { - return this.copySourceFolderStructureField; - } - set - { - this.copySourceFolderStructureField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string DefaultPlaceHolderValue - { - get - { - return this.defaultPlaceHolderValueField; - } - set - { - this.defaultPlaceHolderValueField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool DeleteEmptySourceSubFolders - { - get - { - return this.deleteEmptySourceSubFoldersField; - } - set - { - this.deleteEmptySourceSubFoldersField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorPostProcessingMode - { - get - { - return this.errorPostProcessingModeField; - } - set - { - this.errorPostProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileLocation - { - get - { - return this.errorTargetFileLocationField; - } - set - { - this.errorTargetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileName - { - get - { - return this.errorTargetFileNameField; - } - set - { - this.errorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeFilterMode - { - get - { - return this.fileAgeFilterModeField; - } - set - { - this.fileAgeFilterModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeThreshold - { - get - { - return this.fileAgeThresholdField; - } - set - { - this.fileAgeThresholdField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleTimeout - { - get - { - return this.fileHandleTimeoutField; - } - set - { - this.fileHandleTimeoutField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleWaitTime - { - get - { - return this.fileHandleWaitTimeField; - } - set - { - this.fileHandleWaitTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int FileScanningIntervalInSeconds - { - get - { - return this.fileScanningIntervalInSecondsField; - } - set - { - this.fileScanningIntervalInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileScanningOption - { - get - { - return this.fileScanningOptionField; - } - set - { - this.fileScanningOptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int IdleEventWaitTimeInSeconds - { - get - { - return this.idleEventWaitTimeInSecondsField; - } - set - { - this.idleEventWaitTimeInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfFileExistAction - { - get - { - return this.ifFileExistActionField; - } - set - { - this.ifFileExistActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfPostProcessingFailsAction - { - get - { - return this.ifPostProcessingFailsActionField; - } - set - { - this.ifPostProcessingFailsActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool IncludeSubDirectories - { - get - { - return this.includeSubDirectoriesField; - } - set - { - this.includeSubDirectoriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PostProcessingMode - { - get - { - return this.postProcessingModeField; - } - set - { - this.postProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long PostProcessingRetries - { - get - { - return this.postProcessingRetriesField; - } - set - { - this.postProcessingRetriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PreProcessingMode - { - get - { - return this.preProcessingModeField; - } - set - { - this.preProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SkipSearchDirectoryNames - { - get - { - return this.skipSearchDirectoryNamesField; - } - set - { - this.skipSearchDirectoryNamesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileFilter - { - get - { - return this.sourceFileFilterField; - } - set - { - this.sourceFileFilterField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileLocation - { - get - { - return this.sourceFileLocationField; - } - set - { - this.sourceFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileLocation - { - get - { - return this.targetFileLocationField; - } - set - { - this.targetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileName - { - get - { - return this.targetFileNameField; - } - set - { - this.targetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnChanged - { - get - { - return this.triggerOnChangedField; - } - set - { - this.triggerOnChangedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnCreated - { - get - { - return this.triggerOnCreatedField; - } - set - { - this.triggerOnCreatedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool UseZip64Mode - { - get - { - return this.useZip64ModeField; - } - set - { - this.useZip64ModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipErrorTargetFileName - { - get - { - return this.zipErrorTargetFileNameField; - } - set - { - this.zipErrorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileAmount - { - get - { - return this.zipFileAmountField; - } - set - { - this.zipFileAmountField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileSubFolderLevel - { - get - { - return this.zipFileSubFolderLevelField; - } - set - { - this.zipFileSubFolderLevelField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileTime - { - get - { - return this.zipFileTimeField; - } - set - { - this.zipFileTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipMode - { - get - { - return this.zipModeField; - } - set - { - this.zipModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipTargetFileName - { - get - { - return this.zipTargetFileNameField; - } - set - { - this.zipTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public string BaudRate - { - get - { - return this.baudRateField; - } - set - { - this.baudRateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public string ConnectionMode - { - get - { - return this.connectionModeField; - } - set - { - this.connectionModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public byte DeviceId - { - get - { - return this.deviceIdField; - } - set - { - this.deviceIdField = value; - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool DeviceIdSpecified - { - get - { - return this.deviceIdFieldSpecified; - } - set - { - this.deviceIdFieldSpecified = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public string Host - { - get - { - return this.hostField; - } - set - { - this.hostField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string LinkTestTimer - { - get - { - return this.linkTestTimerField; - } - set - { - this.linkTestTimerField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public ushort Port - { - get - { - return this.portField; - } - set - { - this.portField = value; - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool PortSpecified - { - get - { - return this.portFieldSpecified; - } - set - { - this.portFieldSpecified = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public string PortType - { - get - { - return this.portTypeField; - } - set - { - this.portTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances")] - public string SessionMode - { - get - { - return this.sessionModeField; - } - set - { - this.sessionModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T1InterCharacter - { - get - { - return this.t1InterCharacterField; - } - set - { - this.t1InterCharacterField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T2Protocol - { - get - { - return this.t2ProtocolField; - } - set - { - this.t2ProtocolField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T3MessageReply - { - get - { - return this.t3MessageReplyField; - } - set - { - this.t3MessageReplyField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T4InterBlock - { - get - { - return this.t4InterBlockField; - } - set - { - this.t4InterBlockField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T5ConnectionSeperation - { - get - { - return this.t5ConnectionSeperationField; - } - set - { - this.t5ConnectionSeperationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T6HsmsControlMessage - { - get - { - return this.t6HsmsControlMessageField; - } - set - { - this.t6HsmsControlMessageField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T7ConnectionIdle - { - get - { - return this.t7ConnectionIdleField; - } - set - { - this.t7ConnectionIdleField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + - "uctor.CellInstances", DataType = "duration")] - public string T8NetworkIntercharacter - { - get - { - return this.t8NetworkIntercharacterField; - } - set - { - this.t8NetworkIntercharacterField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } + get => this.nameField; + set => this.nameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version { - - private CellEquipmentDictionaryReference cellEquipmentDictionaryReferenceField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public CellEquipmentDictionaryReference CellEquipmentDictionaryReference - { - get - { - return this.cellEquipmentDictionaryReferenceField; - } - set - { - this.cellEquipmentDictionaryReferenceField = value; - } - } + get => this.versionField; + set => this.versionField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] - public partial class CellEquipmentDictionaryReference + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 { - - private string dictionaryNameField; - - private string dictionaryVersionField; - - private byte idField; - - private string id1Field; - - /// - public string DictionaryName - { - get - { - return this.dictionaryNameField; - } - set - { - this.dictionaryNameField = value; - } - } - - /// - public string DictionaryVersion - { - get - { - return this.dictionaryVersionField; - } - set - { - this.dictionaryVersionField = value; - } - } - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.id1Field; + set => this.id1Field = value; } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class CellInstanceVersionComponentModel +{ + + private long idField; + + private ComponentsCellComponent[] componentsField; + + private string id1Field; /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentCellComponentEquipmentEquipmentType - { - - private long idField; - - private string nameField; - - private string versionField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentCellComponentComponentParameter - { - - private object enumTypeField; - - private long idField; - - private string nameField; - - private string valueField; - - private string valueTypeField; - - private bool isOverrideField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation", IsNullable = true)] - public object EnumType - { - get - { - return this.enumTypeField; - } - set - { - this.enumTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string ValueType - { - get - { - return this.valueTypeField; - } - set - { - this.valueTypeField = value; - } - } - - /// - public bool IsOverride - { - get - { - return this.isOverrideField; - } - set - { - this.isOverrideField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentEquipment - { - - private long idField; - - private object equipmentDictionariesField; - - private ComponentsCellComponentEquipmentEquipmentType equipmentTypeField; - - private string nameField; - - private string alternateTargetFolderField; - - private long connectionRetryIntervalField; - - private ConnectionSettings connectionSettingsField; - - private bool copySourceFolderStructureField; - - private string defaultPlaceHolderValueField; - - private bool deleteEmptySourceSubFoldersField; - - private string errorPostProcessingModeField; - - private string errorTargetFileLocationField; - - private string errorTargetFileNameField; - - private string fileAgeFilterModeField; - - private string fileAgeThresholdField; - - private long fileHandleTimeoutField; - - private long fileHandleWaitTimeField; - - private int fileScanningIntervalInSecondsField; - - private string fileScanningOptionField; - - private int idleEventWaitTimeInSecondsField; - - private string ifFileExistActionField; - - private string ifPostProcessingFailsActionField; - - private bool includeSubDirectoriesField; - - private string postProcessingModeField; - - private long postProcessingRetriesField; - - private string preProcessingModeField; - - private string skipSearchDirectoryNamesField; - - private string sourceFileFilterField; - - private string sourceFileLocationField; - - private string targetFileLocationField; - - private string targetFileNameField; - - private bool triggerOnChangedField; - - private bool triggerOnCreatedField; - - private bool useZip64ModeField; - - private string zipErrorTargetFileNameField; - - private long zipFileAmountField; - - private long zipFileSubFolderLevelField; - - private long zipFileTimeField; - - private string zipModeField; - - private string zipTargetFileNameField; - - private string refField; - - private string id1Field; - - private string i___typeField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public object EquipmentDictionaries - { - get - { - return this.equipmentDictionariesField; - } - set - { - this.equipmentDictionariesField = value; - } - } - - /// - public ComponentsCellComponentEquipmentEquipmentType EquipmentType - { - get - { - return this.equipmentTypeField; - } - set - { - this.equipmentTypeField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string AlternateTargetFolder - { - get - { - return this.alternateTargetFolderField; - } - set - { - this.alternateTargetFolderField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ConnectionRetryInterval - { - get - { - return this.connectionRetryIntervalField; - } - set - { - this.connectionRetryIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public ConnectionSettings ConnectionSettings - { - get - { - return this.connectionSettingsField; - } - set - { - this.connectionSettingsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool CopySourceFolderStructure - { - get - { - return this.copySourceFolderStructureField; - } - set - { - this.copySourceFolderStructureField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string DefaultPlaceHolderValue - { - get - { - return this.defaultPlaceHolderValueField; - } - set - { - this.defaultPlaceHolderValueField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool DeleteEmptySourceSubFolders - { - get - { - return this.deleteEmptySourceSubFoldersField; - } - set - { - this.deleteEmptySourceSubFoldersField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorPostProcessingMode - { - get - { - return this.errorPostProcessingModeField; - } - set - { - this.errorPostProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileLocation - { - get - { - return this.errorTargetFileLocationField; - } - set - { - this.errorTargetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileName - { - get - { - return this.errorTargetFileNameField; - } - set - { - this.errorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeFilterMode - { - get - { - return this.fileAgeFilterModeField; - } - set - { - this.fileAgeFilterModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeThreshold - { - get - { - return this.fileAgeThresholdField; - } - set - { - this.fileAgeThresholdField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleTimeout - { - get - { - return this.fileHandleTimeoutField; - } - set - { - this.fileHandleTimeoutField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleWaitTime - { - get - { - return this.fileHandleWaitTimeField; - } - set - { - this.fileHandleWaitTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int FileScanningIntervalInSeconds - { - get - { - return this.fileScanningIntervalInSecondsField; - } - set - { - this.fileScanningIntervalInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileScanningOption - { - get - { - return this.fileScanningOptionField; - } - set - { - this.fileScanningOptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int IdleEventWaitTimeInSeconds - { - get - { - return this.idleEventWaitTimeInSecondsField; - } - set - { - this.idleEventWaitTimeInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfFileExistAction - { - get - { - return this.ifFileExistActionField; - } - set - { - this.ifFileExistActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfPostProcessingFailsAction - { - get - { - return this.ifPostProcessingFailsActionField; - } - set - { - this.ifPostProcessingFailsActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool IncludeSubDirectories - { - get - { - return this.includeSubDirectoriesField; - } - set - { - this.includeSubDirectoriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PostProcessingMode - { - get - { - return this.postProcessingModeField; - } - set - { - this.postProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long PostProcessingRetries - { - get - { - return this.postProcessingRetriesField; - } - set - { - this.postProcessingRetriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PreProcessingMode - { - get - { - return this.preProcessingModeField; - } - set - { - this.preProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SkipSearchDirectoryNames - { - get - { - return this.skipSearchDirectoryNamesField; - } - set - { - this.skipSearchDirectoryNamesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileFilter - { - get - { - return this.sourceFileFilterField; - } - set - { - this.sourceFileFilterField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileLocation - { - get - { - return this.sourceFileLocationField; - } - set - { - this.sourceFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileLocation - { - get - { - return this.targetFileLocationField; - } - set - { - this.targetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileName - { - get - { - return this.targetFileNameField; - } - set - { - this.targetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnChanged - { - get - { - return this.triggerOnChangedField; - } - set - { - this.triggerOnChangedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnCreated - { - get - { - return this.triggerOnCreatedField; - } - set - { - this.triggerOnCreatedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool UseZip64Mode - { - get - { - return this.useZip64ModeField; - } - set - { - this.useZip64ModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipErrorTargetFileName - { - get - { - return this.zipErrorTargetFileNameField; - } - set - { - this.zipErrorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileAmount - { - get - { - return this.zipFileAmountField; - } - set - { - this.zipFileAmountField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileSubFolderLevel - { - get - { - return this.zipFileSubFolderLevelField; - } - set - { - this.zipFileSubFolderLevelField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileTime - { - get - { - return this.zipFileTimeField; - } - set - { - this.zipFileTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipMode - { - get - { - return this.zipModeField; - } - set - { - this.zipModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipTargetFileName - { - get - { - return this.zipTargetFileNameField; - } - set - { - this.zipTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentEquipmentEquipmentType - { - - private long idField; - - private string nameField; - - private string versionField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public partial class ComponentsCellComponentComponentParameter - { - - private object enumTypeField; - - private long idField; - - private string nameField; - - private string valueField; - - private string valueTypeField; - - private bool isOverrideField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation", IsNullable = true)] - public object EnumType - { - get - { - return this.enumTypeField; - } - set - { - this.enumTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public string ValueType - { - get - { - return this.valueTypeField; - } - set - { - this.valueTypeField = value; - } - } - - /// - public bool IsOverride - { - get - { - return this.isOverrideField; - } - set - { - this.isOverrideField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class CellInstanceVersionEdaConnection - { - - private long idField; - - private int checkIntervalField; - - private int connectionTimeoutField; - - private object edaClientProxyFactoryProviderNameField; - - private long maxLostPingsField; - - private string portNameField; - - private int portNumberField; - - private string sSLEnabledField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public int CheckInterval - { - get - { - return this.checkIntervalField; - } - set - { - this.checkIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public int ConnectionTimeout - { - get - { - return this.connectionTimeoutField; - } - set - { - this.connectionTimeoutField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = true)] - public object EdaClientProxyFactoryProviderName - { - get - { - return this.edaClientProxyFactoryProviderNameField; - } - set - { - this.edaClientProxyFactoryProviderNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public long MaxLostPings - { - get - { - return this.maxLostPingsField; - } - set - { - this.maxLostPingsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public string PortName - { - get - { - return this.portNameField; - } - set - { - this.portNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public int PortNumber - { - get - { - return this.portNumberField; - } - set - { - this.portNumberField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public string SSLEnabled - { - get - { - return this.sSLEnabledField; - } - set - { - this.sSLEnabledField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class CellInstanceVersionParentInstance - { - - private string currentActiveVersionField; - - private object currentHostField; - - private long idField; - - private object infoField; - - private bool isStartedField; - - private string nameField; - - private object startTimeField; - - private bool startableField; - - private object stopTimeField; - - private string targetActiveVersionField; - - private object targetHostField; - - private string id1Field; - - /// - public string CurrentActiveVersion - { - get - { - return this.currentActiveVersionField; - } - set - { - this.currentActiveVersionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object CurrentHost - { - get - { - return this.currentHostField; - } - set - { - this.currentHostField = value; - } - } - - /// - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object Info - { - get - { - return this.infoField; - } - set - { - this.infoField = value; - } - } - - /// - public bool IsStarted - { - get - { - return this.isStartedField; - } - set - { - this.isStartedField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object StartTime - { - get - { - return this.startTimeField; - } - set - { - this.startTimeField = value; - } - } - - /// - public bool Startable - { - get - { - return this.startableField; - } - set - { - this.startableField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object StopTime - { - get - { - return this.stopTimeField; - } - set - { - this.stopTimeField = value; - } - } - - /// - public string TargetActiveVersion - { - get - { - return this.targetActiveVersionField; - } - set - { - this.targetActiveVersionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object TargetHost - { - get - { - return this.targetHostField; - } - set - { - this.targetHostField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class CellInstanceVersionEdaTraceHandling - { - - private long maxParameterCollectionTimeDeltaField; - - private object mergeStrategyClassField; - - private object mergeStrategyParametersField; - - private long traceCleanupDaemonIntervalField; - - private TraceSourcePrimaryPrioritiesConnection[] traceSourcePrimaryPrioritiesField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public long MaxParameterCollectionTimeDelta - { - get - { - return this.maxParameterCollectionTimeDeltaField; - } - set - { - this.maxParameterCollectionTimeDeltaField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = true)] - public object MergeStrategyClass - { - get - { - return this.mergeStrategyClassField; - } - set - { - this.mergeStrategyClassField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public object MergeStrategyParameters - { - get - { - return this.mergeStrategyParametersField; - } - set - { - this.mergeStrategyParametersField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public long TraceCleanupDaemonInterval - { - get - { - return this.traceCleanupDaemonIntervalField; - } - set - { - this.traceCleanupDaemonIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - [System.Xml.Serialization.XmlArrayItemAttribute("Connection", IsNullable = false)] - public TraceSourcePrimaryPrioritiesConnection[] TraceSourcePrimaryPriorities - { - get - { - return this.traceSourcePrimaryPrioritiesField; - } - set - { - this.traceSourcePrimaryPrioritiesField = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - public partial class TraceSourcePrimaryPrioritiesConnection - { - - private long idField; - - private object equipmentDictionariesField; - - private EquipmentType equipmentTypeField; - - private string nameField; - - private string alternateTargetFolderField; - - private long connectionRetryIntervalField; - - private ConnectionSettings connectionSettingsField; - - private bool copySourceFolderStructureField; - - private string defaultPlaceHolderValueField; - - private bool deleteEmptySourceSubFoldersField; - - private string errorPostProcessingModeField; - - private string errorTargetFileLocationField; - - private string errorTargetFileNameField; - - private string fileAgeFilterModeField; - - private string fileAgeThresholdField; - - private long fileHandleTimeoutField; - - private long fileHandleWaitTimeField; - - private int fileScanningIntervalInSecondsField; - - private string fileScanningOptionField; - - private int idleEventWaitTimeInSecondsField; - - private string ifFileExistActionField; - - private string ifPostProcessingFailsActionField; - - private bool includeSubDirectoriesField; - - private string postProcessingModeField; - - private long postProcessingRetriesField; - - private string preProcessingModeField; - - private string skipSearchDirectoryNamesField; - - private string sourceFileFilterField; - - private string sourceFileLocationField; - - private string targetFileLocationField; - - private string targetFileNameField; - - private bool triggerOnChangedField; - - private bool triggerOnCreatedField; - - private bool useZip64ModeField; - - private string zipErrorTargetFileNameField; - - private long zipFileAmountField; - - private long zipFileSubFolderLevelField; - - private long zipFileTimeField; - - private string zipModeField; - - private string zipTargetFileNameField; - - private string id1Field; - - private string i___typeField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public object EquipmentDictionaries - { - get - { - return this.equipmentDictionariesField; - } - set - { - this.equipmentDictionariesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public EquipmentType EquipmentType - { - get - { - return this.equipmentTypeField; - } - set - { - this.equipmentTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string AlternateTargetFolder - { - get - { - return this.alternateTargetFolderField; - } - set - { - this.alternateTargetFolderField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ConnectionRetryInterval - { - get - { - return this.connectionRetryIntervalField; - } - set - { - this.connectionRetryIntervalField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public ConnectionSettings ConnectionSettings - { - get - { - return this.connectionSettingsField; - } - set - { - this.connectionSettingsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool CopySourceFolderStructure - { - get - { - return this.copySourceFolderStructureField; - } - set - { - this.copySourceFolderStructureField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string DefaultPlaceHolderValue - { - get - { - return this.defaultPlaceHolderValueField; - } - set - { - this.defaultPlaceHolderValueField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool DeleteEmptySourceSubFolders - { - get - { - return this.deleteEmptySourceSubFoldersField; - } - set - { - this.deleteEmptySourceSubFoldersField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorPostProcessingMode - { - get - { - return this.errorPostProcessingModeField; - } - set - { - this.errorPostProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileLocation - { - get - { - return this.errorTargetFileLocationField; - } - set - { - this.errorTargetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ErrorTargetFileName - { - get - { - return this.errorTargetFileNameField; - } - set - { - this.errorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeFilterMode - { - get - { - return this.fileAgeFilterModeField; - } - set - { - this.fileAgeFilterModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileAgeThreshold - { - get - { - return this.fileAgeThresholdField; - } - set - { - this.fileAgeThresholdField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleTimeout - { - get - { - return this.fileHandleTimeoutField; - } - set - { - this.fileHandleTimeoutField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long FileHandleWaitTime - { - get - { - return this.fileHandleWaitTimeField; - } - set - { - this.fileHandleWaitTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int FileScanningIntervalInSeconds - { - get - { - return this.fileScanningIntervalInSecondsField; - } - set - { - this.fileScanningIntervalInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string FileScanningOption - { - get - { - return this.fileScanningOptionField; - } - set - { - this.fileScanningOptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public int IdleEventWaitTimeInSeconds - { - get - { - return this.idleEventWaitTimeInSecondsField; - } - set - { - this.idleEventWaitTimeInSecondsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfFileExistAction - { - get - { - return this.ifFileExistActionField; - } - set - { - this.ifFileExistActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string IfPostProcessingFailsAction - { - get - { - return this.ifPostProcessingFailsActionField; - } - set - { - this.ifPostProcessingFailsActionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool IncludeSubDirectories - { - get - { - return this.includeSubDirectoriesField; - } - set - { - this.includeSubDirectoriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PostProcessingMode - { - get - { - return this.postProcessingModeField; - } - set - { - this.postProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long PostProcessingRetries - { - get - { - return this.postProcessingRetriesField; - } - set - { - this.postProcessingRetriesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string PreProcessingMode - { - get - { - return this.preProcessingModeField; - } - set - { - this.preProcessingModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SkipSearchDirectoryNames - { - get - { - return this.skipSearchDirectoryNamesField; - } - set - { - this.skipSearchDirectoryNamesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileFilter - { - get - { - return this.sourceFileFilterField; - } - set - { - this.sourceFileFilterField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string SourceFileLocation - { - get - { - return this.sourceFileLocationField; - } - set - { - this.sourceFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileLocation - { - get - { - return this.targetFileLocationField; - } - set - { - this.targetFileLocationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string TargetFileName - { - get - { - return this.targetFileNameField; - } - set - { - this.targetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnChanged - { - get - { - return this.triggerOnChangedField; - } - set - { - this.triggerOnChangedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool TriggerOnCreated - { - get - { - return this.triggerOnCreatedField; - } - set - { - this.triggerOnCreatedField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public bool UseZip64Mode - { - get - { - return this.useZip64ModeField; - } - set - { - this.useZip64ModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipErrorTargetFileName - { - get - { - return this.zipErrorTargetFileNameField; - } - set - { - this.zipErrorTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileAmount - { - get - { - return this.zipFileAmountField; - } - set - { - this.zipFileAmountField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileSubFolderLevel - { - get - { - return this.zipFileSubFolderLevelField; - } - set - { - this.zipFileSubFolderLevelField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public long ZipFileTime - { - get - { - return this.zipFileTimeField; - } - set - { - this.zipFileTimeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipMode - { - get - { - return this.zipModeField; - } - set - { - this.zipModeField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances")] - public string ZipTargetFileName - { - get - { - return this.zipTargetFileNameField; - } - set - { - this.zipTargetFileNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances", IsNullable = false)] - public partial class EquipmentType - { - - private long idField; - - private string nameField; - - private string versionField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public long Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = false)] - public partial class Extensions + public long Id { - - private ExtensionsVersionExtension[] versionExtensionField; - - /// - [System.Xml.Serialization.XmlElementAttribute("VersionExtension")] - public ExtensionsVersionExtension[] VersionExtension - { - get - { - return this.versionExtensionField; - } - set - { - this.versionExtensionField = value; - } - } + get => this.idField; + set => this.idField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + "ntities.CellInstances")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities.CellInstances", IsNullable = false)] - public partial class Components + [System.Xml.Serialization.XmlArrayItemAttribute("CellComponent", IsNullable = false)] + public ComponentsCellComponent[] Components { - - private ComponentsCellComponent[] cellComponentField; - - /// - [System.Xml.Serialization.XmlElementAttribute("CellComponent")] - public ComponentsCellComponent[] CellComponent - { - get - { - return this.cellComponentField; - } - set - { - this.cellComponentField = value; - } - } + get => this.componentsField; + set => this.componentsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = false)] - public partial class TraceSourcePrimaryPriorities + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 { + get => this.id1Field; + set => this.id1Field = value; + } +} - private TraceSourcePrimaryPrioritiesConnection[] connectionField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponent +{ - /// - [System.Xml.Serialization.XmlElementAttribute("Connection")] - public TraceSourcePrimaryPrioritiesConnection[] Connection - { - get - { - return this.connectionField; - } - set - { - this.connectionField = value; - } - } + private ComponentsCellComponentCellComponent[] childrenField; + + private ComponentsCellComponentEquipment equipmentField; + + private object equipmentObjectTypeField; + + private string nameField; + + private ComponentsCellComponentComponentParameter[] parametersField; + + private string typeField; + + private string idField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("CellComponent", IsNullable = false)] + public ComponentsCellComponentCellComponent[] Children + { + get => this.childrenField; + set => this.childrenField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + public ComponentsCellComponentEquipment Equipment + { + get => this.equipmentField; + set => this.equipmentField = value; + } + + /// + public object EquipmentObjectType + { + get => this.equipmentObjectTypeField; + set => this.equipmentObjectTypeField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("ComponentParameter", IsNullable = false)] + public ComponentsCellComponentComponentParameter[] Parameters + { + get => this.parametersField; + set => this.parametersField = value; + } + + /// + public string Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentCellComponent +{ + + private object childrenField; + + private ComponentsCellComponentCellComponentEquipment equipmentField; + + private object equipmentObjectTypeField; + + private string nameField; + + private ComponentsCellComponentCellComponentComponentParameter[] parametersField; + + private string typeField; + + private string idField; + + /// + public object Children + { + get => this.childrenField; + set => this.childrenField = value; + } + + /// + public ComponentsCellComponentCellComponentEquipment Equipment + { + get => this.equipmentField; + set => this.equipmentField = value; + } + + /// + public object EquipmentObjectType + { + get => this.equipmentObjectTypeField; + set => this.equipmentObjectTypeField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("ComponentParameter", IsNullable = false)] + public ComponentsCellComponentCellComponentComponentParameter[] Parameters + { + get => this.parametersField; + set => this.parametersField = value; + } + + /// + public string Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentCellComponentEquipment +{ + + private long idField; + + private ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries equipmentDictionariesField; + + private ComponentsCellComponentCellComponentEquipmentEquipmentType equipmentTypeField; + + private string nameField; + + private string alternateTargetFolderField; + + private long connectionRetryIntervalField; + + private ConnectionSettings connectionSettingsField; + + private bool copySourceFolderStructureField; + + private string defaultPlaceHolderValueField; + + private bool deleteEmptySourceSubFoldersField; + + private string errorPostProcessingModeField; + + private string errorTargetFileLocationField; + + private string errorTargetFileNameField; + + private string fileAgeFilterModeField; + + private string fileAgeThresholdField; + + private long fileHandleTimeoutField; + + private long fileHandleWaitTimeField; + + private int fileScanningIntervalInSecondsField; + + private string fileScanningOptionField; + + private int idleEventWaitTimeInSecondsField; + + private string ifFileExistActionField; + + private string ifPostProcessingFailsActionField; + + private bool includeSubDirectoriesField; + + private string postProcessingModeField; + + private long postProcessingRetriesField; + + private string preProcessingModeField; + + private string skipSearchDirectoryNamesField; + + private string sourceFileFilterField; + + private string sourceFileLocationField; + + private string targetFileLocationField; + + private string targetFileNameField; + + private bool triggerOnChangedField; + + private bool triggerOnCreatedField; + + private bool useZip64ModeField; + + private string zipErrorTargetFileNameField; + + private long zipFileAmountField; + + private long zipFileSubFolderLevelField; + + private long zipFileTimeField; + + private string zipModeField; + + private string zipTargetFileNameField; + + private string baudRateField; + + private string connectionModeField; + + private byte deviceIdField; + + private bool deviceIdFieldSpecified; + + private string hostField; + + private string linkTestTimerField; + + private ushort portField; + + private bool portFieldSpecified; + + private string portTypeField; + + private string sessionModeField; + + private string t1InterCharacterField; + + private string t2ProtocolField; + + private string t3MessageReplyField; + + private string t4InterBlockField; + + private string t5ConnectionSeperationField; + + private string t6HsmsControlMessageField; + + private string t7ConnectionIdleField; + + private string t8NetworkIntercharacterField; + + private string id1Field; + + private string i___typeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + + /// + public ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries EquipmentDictionaries + { + get => this.equipmentDictionariesField; + set => this.equipmentDictionariesField = value; + } + + /// + public ComponentsCellComponentCellComponentEquipmentEquipmentType EquipmentType + { + get => this.equipmentTypeField; + set => this.equipmentTypeField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + "Connector.CellInstances")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.CellInstances", IsNullable = false)] - public partial class ConnectionSettings + public string AlternateTargetFolder { - - private Setting[] settingField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Setting", Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + - "ionSettings")] - public Setting[] Setting - { - get - { - return this.settingField; - } - set - { - this.settingField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.alternateTargetFolderField; + set => this.alternateTargetFolderField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + - "ionSettings")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + - "ionSettings", IsNullable = false)] - public partial class Setting + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ConnectionRetryInterval { - - private string nameField; - - private string valueField; - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } + get => this.connectionRetryIntervalField; + set => this.connectionRetryIntervalField = value; } + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public ConnectionSettings ConnectionSettings + { + get => this.connectionSettingsField; + set => this.connectionSettingsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool CopySourceFolderStructure + { + get => this.copySourceFolderStructureField; + set => this.copySourceFolderStructureField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string DefaultPlaceHolderValue + { + get => this.defaultPlaceHolderValueField; + set => this.defaultPlaceHolderValueField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool DeleteEmptySourceSubFolders + { + get => this.deleteEmptySourceSubFoldersField; + set => this.deleteEmptySourceSubFoldersField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorPostProcessingMode + { + get => this.errorPostProcessingModeField; + set => this.errorPostProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileLocation + { + get => this.errorTargetFileLocationField; + set => this.errorTargetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileName + { + get => this.errorTargetFileNameField; + set => this.errorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeFilterMode + { + get => this.fileAgeFilterModeField; + set => this.fileAgeFilterModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeThreshold + { + get => this.fileAgeThresholdField; + set => this.fileAgeThresholdField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleTimeout + { + get => this.fileHandleTimeoutField; + set => this.fileHandleTimeoutField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleWaitTime + { + get => this.fileHandleWaitTimeField; + set => this.fileHandleWaitTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int FileScanningIntervalInSeconds + { + get => this.fileScanningIntervalInSecondsField; + set => this.fileScanningIntervalInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileScanningOption + { + get => this.fileScanningOptionField; + set => this.fileScanningOptionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int IdleEventWaitTimeInSeconds + { + get => this.idleEventWaitTimeInSecondsField; + set => this.idleEventWaitTimeInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfFileExistAction + { + get => this.ifFileExistActionField; + set => this.ifFileExistActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfPostProcessingFailsAction + { + get => this.ifPostProcessingFailsActionField; + set => this.ifPostProcessingFailsActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool IncludeSubDirectories + { + get => this.includeSubDirectoriesField; + set => this.includeSubDirectoriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PostProcessingMode + { + get => this.postProcessingModeField; + set => this.postProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long PostProcessingRetries + { + get => this.postProcessingRetriesField; + set => this.postProcessingRetriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PreProcessingMode + { + get => this.preProcessingModeField; + set => this.preProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SkipSearchDirectoryNames + { + get => this.skipSearchDirectoryNamesField; + set => this.skipSearchDirectoryNamesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileFilter + { + get => this.sourceFileFilterField; + set => this.sourceFileFilterField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileLocation + { + get => this.sourceFileLocationField; + set => this.sourceFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileLocation + { + get => this.targetFileLocationField; + set => this.targetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileName + { + get => this.targetFileNameField; + set => this.targetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnChanged + { + get => this.triggerOnChangedField; + set => this.triggerOnChangedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnCreated + { + get => this.triggerOnCreatedField; + set => this.triggerOnCreatedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool UseZip64Mode + { + get => this.useZip64ModeField; + set => this.useZip64ModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipErrorTargetFileName + { + get => this.zipErrorTargetFileNameField; + set => this.zipErrorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileAmount + { + get => this.zipFileAmountField; + set => this.zipFileAmountField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileSubFolderLevel + { + get => this.zipFileSubFolderLevelField; + set => this.zipFileSubFolderLevelField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileTime + { + get => this.zipFileTimeField; + set => this.zipFileTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipMode + { + get => this.zipModeField; + set => this.zipModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipTargetFileName + { + get => this.zipTargetFileNameField; + set => this.zipTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public string BaudRate + { + get => this.baudRateField; + set => this.baudRateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public string ConnectionMode + { + get => this.connectionModeField; + set => this.connectionModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public byte DeviceId + { + get => this.deviceIdField; + set => this.deviceIdField = value; + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DeviceIdSpecified + { + get => this.deviceIdFieldSpecified; + set => this.deviceIdFieldSpecified = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public string Host + { + get => this.hostField; + set => this.hostField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string LinkTestTimer + { + get => this.linkTestTimerField; + set => this.linkTestTimerField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public ushort Port + { + get => this.portField; + set => this.portField = value; + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PortSpecified + { + get => this.portFieldSpecified; + set => this.portFieldSpecified = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public string PortType + { + get => this.portTypeField; + set => this.portTypeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances")] + public string SessionMode + { + get => this.sessionModeField; + set => this.sessionModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T1InterCharacter + { + get => this.t1InterCharacterField; + set => this.t1InterCharacterField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T2Protocol + { + get => this.t2ProtocolField; + set => this.t2ProtocolField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T3MessageReply + { + get => this.t3MessageReplyField; + set => this.t3MessageReplyField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T4InterBlock + { + get => this.t4InterBlockField; + set => this.t4InterBlockField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T5ConnectionSeperation + { + get => this.t5ConnectionSeperationField; + set => this.t5ConnectionSeperationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T6HsmsControlMessage + { + get => this.t6HsmsControlMessageField; + set => this.t6HsmsControlMessageField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T7ConnectionIdle + { + get => this.t7ConnectionIdleField; + set => this.t7ConnectionIdleField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Semicond" + + "uctor.CellInstances", DataType = "duration")] + public string T8NetworkIntercharacter + { + get => this.t8NetworkIntercharacterField; + set => this.t8NetworkIntercharacterField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentChildrenCellComponentEquipmentEquipmentDictionaries +{ + + private CellEquipmentDictionaryReference cellEquipmentDictionaryReferenceField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public CellEquipmentDictionaryReference CellEquipmentDictionaryReference + { + get => this.cellEquipmentDictionaryReferenceField; + set => this.cellEquipmentDictionaryReferenceField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] +public partial class CellEquipmentDictionaryReference +{ + + private string dictionaryNameField; + + private string dictionaryVersionField; + + private byte idField; + + private string id1Field; + + /// + public string DictionaryName + { + get => this.dictionaryNameField; + set => this.dictionaryNameField = value; + } + + /// + public string DictionaryVersion + { + get => this.dictionaryVersionField; + set => this.dictionaryVersionField = value; + } + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentCellComponentEquipmentEquipmentType +{ + + private long idField; + + private string nameField; + + private string versionField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentCellComponentComponentParameter +{ + + private object enumTypeField; + + private long idField; + + private string nameField; + + private string valueField; + + private string valueTypeField; + + private bool isOverrideField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = true)] + public object EnumType + { + get => this.enumTypeField; + set => this.enumTypeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string Value + { + get => this.valueField; + set => this.valueField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string ValueType + { + get => this.valueTypeField; + set => this.valueTypeField = value; + } + + /// + public bool IsOverride + { + get => this.isOverrideField; + set => this.isOverrideField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentEquipment +{ + + private long idField; + + private object equipmentDictionariesField; + + private ComponentsCellComponentEquipmentEquipmentType equipmentTypeField; + + private string nameField; + + private string alternateTargetFolderField; + + private long connectionRetryIntervalField; + + private ConnectionSettings connectionSettingsField; + + private bool copySourceFolderStructureField; + + private string defaultPlaceHolderValueField; + + private bool deleteEmptySourceSubFoldersField; + + private string errorPostProcessingModeField; + + private string errorTargetFileLocationField; + + private string errorTargetFileNameField; + + private string fileAgeFilterModeField; + + private string fileAgeThresholdField; + + private long fileHandleTimeoutField; + + private long fileHandleWaitTimeField; + + private int fileScanningIntervalInSecondsField; + + private string fileScanningOptionField; + + private int idleEventWaitTimeInSecondsField; + + private string ifFileExistActionField; + + private string ifPostProcessingFailsActionField; + + private bool includeSubDirectoriesField; + + private string postProcessingModeField; + + private long postProcessingRetriesField; + + private string preProcessingModeField; + + private string skipSearchDirectoryNamesField; + + private string sourceFileFilterField; + + private string sourceFileLocationField; + + private string targetFileLocationField; + + private string targetFileNameField; + + private bool triggerOnChangedField; + + private bool triggerOnCreatedField; + + private bool useZip64ModeField; + + private string zipErrorTargetFileNameField; + + private long zipFileAmountField; + + private long zipFileSubFolderLevelField; + + private long zipFileTimeField; + + private string zipModeField; + + private string zipTargetFileNameField; + + private string refField; + + private string id1Field; + + private string i___typeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public object EquipmentDictionaries + { + get => this.equipmentDictionariesField; + set => this.equipmentDictionariesField = value; + } + + /// + public ComponentsCellComponentEquipmentEquipmentType EquipmentType + { + get => this.equipmentTypeField; + set => this.equipmentTypeField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string AlternateTargetFolder + { + get => this.alternateTargetFolderField; + set => this.alternateTargetFolderField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ConnectionRetryInterval + { + get => this.connectionRetryIntervalField; + set => this.connectionRetryIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public ConnectionSettings ConnectionSettings + { + get => this.connectionSettingsField; + set => this.connectionSettingsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool CopySourceFolderStructure + { + get => this.copySourceFolderStructureField; + set => this.copySourceFolderStructureField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string DefaultPlaceHolderValue + { + get => this.defaultPlaceHolderValueField; + set => this.defaultPlaceHolderValueField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool DeleteEmptySourceSubFolders + { + get => this.deleteEmptySourceSubFoldersField; + set => this.deleteEmptySourceSubFoldersField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorPostProcessingMode + { + get => this.errorPostProcessingModeField; + set => this.errorPostProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileLocation + { + get => this.errorTargetFileLocationField; + set => this.errorTargetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileName + { + get => this.errorTargetFileNameField; + set => this.errorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeFilterMode + { + get => this.fileAgeFilterModeField; + set => this.fileAgeFilterModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeThreshold + { + get => this.fileAgeThresholdField; + set => this.fileAgeThresholdField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleTimeout + { + get => this.fileHandleTimeoutField; + set => this.fileHandleTimeoutField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleWaitTime + { + get => this.fileHandleWaitTimeField; + set => this.fileHandleWaitTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int FileScanningIntervalInSeconds + { + get => this.fileScanningIntervalInSecondsField; + set => this.fileScanningIntervalInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileScanningOption + { + get => this.fileScanningOptionField; + set => this.fileScanningOptionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int IdleEventWaitTimeInSeconds + { + get => this.idleEventWaitTimeInSecondsField; + set => this.idleEventWaitTimeInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfFileExistAction + { + get => this.ifFileExistActionField; + set => this.ifFileExistActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfPostProcessingFailsAction + { + get => this.ifPostProcessingFailsActionField; + set => this.ifPostProcessingFailsActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool IncludeSubDirectories + { + get => this.includeSubDirectoriesField; + set => this.includeSubDirectoriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PostProcessingMode + { + get => this.postProcessingModeField; + set => this.postProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long PostProcessingRetries + { + get => this.postProcessingRetriesField; + set => this.postProcessingRetriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PreProcessingMode + { + get => this.preProcessingModeField; + set => this.preProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SkipSearchDirectoryNames + { + get => this.skipSearchDirectoryNamesField; + set => this.skipSearchDirectoryNamesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileFilter + { + get => this.sourceFileFilterField; + set => this.sourceFileFilterField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileLocation + { + get => this.sourceFileLocationField; + set => this.sourceFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileLocation + { + get => this.targetFileLocationField; + set => this.targetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileName + { + get => this.targetFileNameField; + set => this.targetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnChanged + { + get => this.triggerOnChangedField; + set => this.triggerOnChangedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnCreated + { + get => this.triggerOnCreatedField; + set => this.triggerOnCreatedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool UseZip64Mode + { + get => this.useZip64ModeField; + set => this.useZip64ModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipErrorTargetFileName + { + get => this.zipErrorTargetFileNameField; + set => this.zipErrorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileAmount + { + get => this.zipFileAmountField; + set => this.zipFileAmountField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileSubFolderLevel + { + get => this.zipFileSubFolderLevelField; + set => this.zipFileSubFolderLevelField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileTime + { + get => this.zipFileTimeField; + set => this.zipFileTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipMode + { + get => this.zipModeField; + set => this.zipModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipTargetFileName + { + get => this.zipTargetFileNameField; + set => this.zipTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentEquipmentEquipmentType +{ + + private long idField; + + private string nameField; + + private string versionField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponentComponentParameter +{ + + private object enumTypeField; + + private long idField; + + private string nameField; + + private string valueField; + + private string valueTypeField; + + private bool isOverrideField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = true)] + public object EnumType + { + get => this.enumTypeField; + set => this.enumTypeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string Value + { + get => this.valueField; + set => this.valueField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public string ValueType + { + get => this.valueTypeField; + set => this.valueTypeField = value; + } + + /// + public bool IsOverride + { + get => this.isOverrideField; + set => this.isOverrideField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class CellInstanceVersionEdaConnection +{ + + private long idField; + + private int checkIntervalField; + + private int connectionTimeoutField; + + private object edaClientProxyFactoryProviderNameField; + + private long maxLostPingsField; + + private string portNameField; + + private int portNumberField; + + private string sSLEnabledField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int CheckInterval + { + get => this.checkIntervalField; + set => this.checkIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int ConnectionTimeout + { + get => this.connectionTimeoutField; + set => this.connectionTimeoutField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = true)] + public object EdaClientProxyFactoryProviderName + { + get => this.edaClientProxyFactoryProviderNameField; + set => this.edaClientProxyFactoryProviderNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long MaxLostPings + { + get => this.maxLostPingsField; + set => this.maxLostPingsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public string PortName + { + get => this.portNameField; + set => this.portNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int PortNumber + { + get => this.portNumberField; + set => this.portNumberField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public string SSLEnabled + { + get => this.sSLEnabledField; + set => this.sSLEnabledField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class CellInstanceVersionParentInstance +{ + + private string currentActiveVersionField; + + private object currentHostField; + + private long idField; + + private object infoField; + + private bool isStartedField; + + private string nameField; + + private object startTimeField; + + private bool startableField; + + private object stopTimeField; + + private string targetActiveVersionField; + + private object targetHostField; + + private string id1Field; + + /// + public string CurrentActiveVersion + { + get => this.currentActiveVersionField; + set => this.currentActiveVersionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object CurrentHost + { + get => this.currentHostField; + set => this.currentHostField = value; + } + + /// + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object Info + { + get => this.infoField; + set => this.infoField = value; + } + + /// + public bool IsStarted + { + get => this.isStartedField; + set => this.isStartedField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object StartTime + { + get => this.startTimeField; + set => this.startTimeField = value; + } + + /// + public bool Startable + { + get => this.startableField; + set => this.startableField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object StopTime + { + get => this.stopTimeField; + set => this.stopTimeField = value; + } + + /// + public string TargetActiveVersion + { + get => this.targetActiveVersionField; + set => this.targetActiveVersionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object TargetHost + { + get => this.targetHostField; + set => this.targetHostField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class CellInstanceVersionEdaTraceHandling +{ + + private long maxParameterCollectionTimeDeltaField; + + private object mergeStrategyClassField; + + private object mergeStrategyParametersField; + + private long traceCleanupDaemonIntervalField; + + private TraceSourcePrimaryPrioritiesConnection[] traceSourcePrimaryPrioritiesField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long MaxParameterCollectionTimeDelta + { + get => this.maxParameterCollectionTimeDeltaField; + set => this.maxParameterCollectionTimeDeltaField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = true)] + public object MergeStrategyClass + { + get => this.mergeStrategyClassField; + set => this.mergeStrategyClassField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public object MergeStrategyParameters + { + get => this.mergeStrategyParametersField; + set => this.mergeStrategyParametersField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long TraceCleanupDaemonInterval + { + get => this.traceCleanupDaemonIntervalField; + set => this.traceCleanupDaemonIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + [System.Xml.Serialization.XmlArrayItemAttribute("Connection", IsNullable = false)] + public TraceSourcePrimaryPrioritiesConnection[] TraceSourcePrimaryPriorities + { + get => this.traceSourcePrimaryPrioritiesField; + set => this.traceSourcePrimaryPrioritiesField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] +public partial class TraceSourcePrimaryPrioritiesConnection +{ + + private long idField; + + private object equipmentDictionariesField; + + private EquipmentType equipmentTypeField; + + private string nameField; + + private string alternateTargetFolderField; + + private long connectionRetryIntervalField; + + private ConnectionSettings connectionSettingsField; + + private bool copySourceFolderStructureField; + + private string defaultPlaceHolderValueField; + + private bool deleteEmptySourceSubFoldersField; + + private string errorPostProcessingModeField; + + private string errorTargetFileLocationField; + + private string errorTargetFileNameField; + + private string fileAgeFilterModeField; + + private string fileAgeThresholdField; + + private long fileHandleTimeoutField; + + private long fileHandleWaitTimeField; + + private int fileScanningIntervalInSecondsField; + + private string fileScanningOptionField; + + private int idleEventWaitTimeInSecondsField; + + private string ifFileExistActionField; + + private string ifPostProcessingFailsActionField; + + private bool includeSubDirectoriesField; + + private string postProcessingModeField; + + private long postProcessingRetriesField; + + private string preProcessingModeField; + + private string skipSearchDirectoryNamesField; + + private string sourceFileFilterField; + + private string sourceFileLocationField; + + private string targetFileLocationField; + + private string targetFileNameField; + + private bool triggerOnChangedField; + + private bool triggerOnCreatedField; + + private bool useZip64ModeField; + + private string zipErrorTargetFileNameField; + + private long zipFileAmountField; + + private long zipFileSubFolderLevelField; + + private long zipFileTimeField; + + private string zipModeField; + + private string zipTargetFileNameField; + + private string id1Field; + + private string i___typeField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] + public object EquipmentDictionaries + { + get => this.equipmentDictionariesField; + set => this.equipmentDictionariesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] + public EquipmentType EquipmentType + { + get => this.equipmentTypeField; + set => this.equipmentTypeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string AlternateTargetFolder + { + get => this.alternateTargetFolderField; + set => this.alternateTargetFolderField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ConnectionRetryInterval + { + get => this.connectionRetryIntervalField; + set => this.connectionRetryIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public ConnectionSettings ConnectionSettings + { + get => this.connectionSettingsField; + set => this.connectionSettingsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool CopySourceFolderStructure + { + get => this.copySourceFolderStructureField; + set => this.copySourceFolderStructureField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string DefaultPlaceHolderValue + { + get => this.defaultPlaceHolderValueField; + set => this.defaultPlaceHolderValueField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool DeleteEmptySourceSubFolders + { + get => this.deleteEmptySourceSubFoldersField; + set => this.deleteEmptySourceSubFoldersField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorPostProcessingMode + { + get => this.errorPostProcessingModeField; + set => this.errorPostProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileLocation + { + get => this.errorTargetFileLocationField; + set => this.errorTargetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ErrorTargetFileName + { + get => this.errorTargetFileNameField; + set => this.errorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeFilterMode + { + get => this.fileAgeFilterModeField; + set => this.fileAgeFilterModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileAgeThreshold + { + get => this.fileAgeThresholdField; + set => this.fileAgeThresholdField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleTimeout + { + get => this.fileHandleTimeoutField; + set => this.fileHandleTimeoutField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long FileHandleWaitTime + { + get => this.fileHandleWaitTimeField; + set => this.fileHandleWaitTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int FileScanningIntervalInSeconds + { + get => this.fileScanningIntervalInSecondsField; + set => this.fileScanningIntervalInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string FileScanningOption + { + get => this.fileScanningOptionField; + set => this.fileScanningOptionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public int IdleEventWaitTimeInSeconds + { + get => this.idleEventWaitTimeInSecondsField; + set => this.idleEventWaitTimeInSecondsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfFileExistAction + { + get => this.ifFileExistActionField; + set => this.ifFileExistActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string IfPostProcessingFailsAction + { + get => this.ifPostProcessingFailsActionField; + set => this.ifPostProcessingFailsActionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool IncludeSubDirectories + { + get => this.includeSubDirectoriesField; + set => this.includeSubDirectoriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PostProcessingMode + { + get => this.postProcessingModeField; + set => this.postProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long PostProcessingRetries + { + get => this.postProcessingRetriesField; + set => this.postProcessingRetriesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string PreProcessingMode + { + get => this.preProcessingModeField; + set => this.preProcessingModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SkipSearchDirectoryNames + { + get => this.skipSearchDirectoryNamesField; + set => this.skipSearchDirectoryNamesField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileFilter + { + get => this.sourceFileFilterField; + set => this.sourceFileFilterField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string SourceFileLocation + { + get => this.sourceFileLocationField; + set => this.sourceFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileLocation + { + get => this.targetFileLocationField; + set => this.targetFileLocationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string TargetFileName + { + get => this.targetFileNameField; + set => this.targetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnChanged + { + get => this.triggerOnChangedField; + set => this.triggerOnChangedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool TriggerOnCreated + { + get => this.triggerOnCreatedField; + set => this.triggerOnCreatedField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public bool UseZip64Mode + { + get => this.useZip64ModeField; + set => this.useZip64ModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipErrorTargetFileName + { + get => this.zipErrorTargetFileNameField; + set => this.zipErrorTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileAmount + { + get => this.zipFileAmountField; + set => this.zipFileAmountField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileSubFolderLevel + { + get => this.zipFileSubFolderLevelField; + set => this.zipFileSubFolderLevelField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public long ZipFileTime + { + get => this.zipFileTimeField; + set => this.zipFileTimeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipMode + { + get => this.zipModeField; + set => this.zipModeField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] + public string ZipTargetFileName + { + get => this.zipTargetFileNameField; + set => this.zipTargetFileNameField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] +public partial class EquipmentType +{ + + private long idField; + + private string nameField; + + private string versionField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = false)] +public partial class Extensions +{ + + private ExtensionsVersionExtension[] versionExtensionField; + + /// + [System.Xml.Serialization.XmlElementAttribute("VersionExtension")] + public ExtensionsVersionExtension[] VersionExtension + { + get => this.versionExtensionField; + set => this.versionExtensionField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] +public partial class Components +{ + + private ComponentsCellComponent[] cellComponentField; + + /// + [System.Xml.Serialization.XmlElementAttribute("CellComponent")] + public ComponentsCellComponent[] CellComponent + { + get => this.cellComponentField; + set => this.cellComponentField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = false)] +public partial class TraceSourcePrimaryPriorities +{ + + private TraceSourcePrimaryPrioritiesConnection[] connectionField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Connection")] + public TraceSourcePrimaryPrioritiesConnection[] Connection + { + get => this.connectionField; + set => this.connectionField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances", IsNullable = false)] +public partial class ConnectionSettings +{ + + private Setting[] settingField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Setting", Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + + "ionSettings")] + public Setting[] Setting + { + get => this.settingField; + set => this.settingField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + + "ionSettings")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + + "ionSettings", IsNullable = false)] +public partial class Setting +{ + + private string nameField; + + private string valueField; + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public string Value + { + get => this.valueField; + set => this.valueField = value; + } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs index cea6096..40e7492 100644 --- a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs @@ -1,25 +1,23 @@ using System.Xml.Serialization; -namespace Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData +namespace Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData; + +[XmlRoot(ElementName = "ChildBackboneMembers", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] +public class ChildBackboneMembers { - [XmlRoot(ElementName = "ChildBackboneMembers", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] - public class ChildBackboneMembers - { - [XmlAttribute(AttributeName = "nil", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] - public string Nil { get; set; } - } - - [XmlRoot(ElementName = "ConfigurationData", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] - public class ConfigurationData - { - [XmlElement(ElementName = "ChildBackboneMembers", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] - public ChildBackboneMembers ChildBackboneMembers { get; set; } - [XmlElement(ElementName = "Data", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] - public string Data { get; set; } - [XmlAttribute(AttributeName = "xmlns")] - public string Xmlns { get; set; } - [XmlAttribute(AttributeName = "i", Namespace = "http://www.w3.org/2000/xmlns/")] - public string I { get; set; } - } + [XmlAttribute(AttributeName = "nil", Namespace = "http://www.w3.org/2001/XMLSchema-instance")] + public string Nil { get; set; } +} +[XmlRoot(ElementName = "ConfigurationData", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] +public class ConfigurationData +{ + [XmlElement(ElementName = "ChildBackboneMembers", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] + public ChildBackboneMembers ChildBackboneMembers { get; set; } + [XmlElement(ElementName = "Data", Namespace = "http://schemas.datacontract.org/2004/07/EafManagement.Configuration.Services")] + public string Data { get; set; } + [XmlAttribute(AttributeName = "xmlns")] + public string Xmlns { get; set; } + [XmlAttribute(AttributeName = "i", Namespace = "http://www.w3.org/2000/xmlns/")] + public string I { get; set; } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs index 419b475..2ebf4d9 100644 --- a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs @@ -1,1956 +1,1298 @@ -namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary +namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization", IsNullable = false)] +public partial class EquipmentDictionaryVersion { + private EquipmentDictionaryVersionAlarms alarmsField; + + private string createdByField; + + private System.DateTime creationDateField; + + private EquipmentDictionaryVersionDataItems dataItemsField; + + private string descriptionField; + + private string dictionaryNameField; + + private EquipmentDictionaryVersionEquipmentSettings equipmentSettingsField; + + private EquipmentDictionaryVersionEvents eventsField; + + private System.DateTime freezeDateField; + + private object frozenByField; + + private bool isFrozenField; + + private bool isRetiredField; + + private string nameField; + + private EquipmentDictionaryVersionObjectTypes objectTypesField; + + private EquipmentDictionaryVersionReports reportsField; + + private System.DateTime retireDateField; + + private object retiredByField; + + private string schemaVersionField; + + private EquipmentDictionaryVersionValidityMapDataItemToEvent validityMapDataItemToEventField; + + private string idField; - // NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization", IsNullable = false)] - public partial class EquipmentDictionaryVersion + public EquipmentDictionaryVersionAlarms Alarms { - - private EquipmentDictionaryVersionAlarms alarmsField; - - private string createdByField; - - private System.DateTime creationDateField; - - private EquipmentDictionaryVersionDataItems dataItemsField; - - private string descriptionField; - - private string dictionaryNameField; - - private EquipmentDictionaryVersionEquipmentSettings equipmentSettingsField; - - private EquipmentDictionaryVersionEvents eventsField; - - private System.DateTime freezeDateField; - - private object frozenByField; - - private bool isFrozenField; - - private bool isRetiredField; - - private string nameField; - - private EquipmentDictionaryVersionObjectTypes objectTypesField; - - private EquipmentDictionaryVersionReports reportsField; - - private System.DateTime retireDateField; - - private object retiredByField; - - private string schemaVersionField; - - private EquipmentDictionaryVersionValidityMapDataItemToEvent validityMapDataItemToEventField; - - private string idField; - - /// - public EquipmentDictionaryVersionAlarms Alarms - { - get - { - return this.alarmsField; - } - set - { - this.alarmsField = value; - } - } - - /// - public string CreatedBy - { - get - { - return this.createdByField; - } - set - { - this.createdByField = value; - } - } - - /// - public System.DateTime CreationDate - { - get - { - return this.creationDateField; - } - set - { - this.creationDateField = value; - } - } - - /// - public EquipmentDictionaryVersionDataItems DataItems - { - get - { - return this.dataItemsField; - } - set - { - this.dataItemsField = value; - } - } - - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - public string DictionaryName - { - get - { - return this.dictionaryNameField; - } - set - { - this.dictionaryNameField = value; - } - } - - /// - public EquipmentDictionaryVersionEquipmentSettings EquipmentSettings - { - get - { - return this.equipmentSettingsField; - } - set - { - this.equipmentSettingsField = value; - } - } - - /// - public EquipmentDictionaryVersionEvents Events - { - get - { - return this.eventsField; - } - set - { - this.eventsField = value; - } - } - - /// - public System.DateTime FreezeDate - { - get - { - return this.freezeDateField; - } - set - { - this.freezeDateField = value; - } - } - - /// - public object FrozenBy - { - get - { - return this.frozenByField; - } - set - { - this.frozenByField = value; - } - } - - /// - public bool IsFrozen - { - get - { - return this.isFrozenField; - } - set - { - this.isFrozenField = value; - } - } - - /// - public bool IsRetired - { - get - { - return this.isRetiredField; - } - set - { - this.isRetiredField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public EquipmentDictionaryVersionObjectTypes ObjectTypes - { - get - { - return this.objectTypesField; - } - set - { - this.objectTypesField = value; - } - } - - /// - public EquipmentDictionaryVersionReports Reports - { - get - { - return this.reportsField; - } - set - { - this.reportsField = value; - } - } - - /// - public System.DateTime RetireDate - { - get - { - return this.retireDateField; - } - set - { - this.retireDateField = value; - } - } - - /// - public object RetiredBy - { - get - { - return this.retiredByField; - } - set - { - this.retiredByField = value; - } - } - - /// - public string SchemaVersion - { - get - { - return this.schemaVersionField; - } - set - { - this.schemaVersionField = value; - } - } - - /// - public EquipmentDictionaryVersionValidityMapDataItemToEvent ValidityMapDataItemToEvent - { - get - { - return this.validityMapDataItemToEventField; - } - set - { - this.validityMapDataItemToEventField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.alarmsField; + set => this.alarmsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionAlarms + public string CreatedBy { - - private EquipmentDictionaryVersionAlarmsAlarm[] alarmField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Alarm")] - public EquipmentDictionaryVersionAlarmsAlarm[] Alarm - { - get - { - return this.alarmField; - } - set - { - this.alarmField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.createdByField; + set => this.createdByField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionAlarmsAlarm + public System.DateTime CreationDate { - - private object contextField; - - private string descriptionField; - - private bool isEnabledField; - - private bool isVirtualField; - - private bool isVirtualFieldSpecified; - - private string nameField; - - private object severityField; - - private int sourceIDField; - - private object textField; - - private string idField; - - /// - public object Context - { - get - { - return this.contextField; - } - set - { - this.contextField = value; - } - } - - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - public bool IsEnabled - { - get - { - return this.isEnabledField; - } - set - { - this.isEnabledField = value; - } - } - - /// - public bool IsVirtual - { - get - { - return this.isVirtualField; - } - set - { - this.isVirtualField = value; - } - } - - /// - [System.Xml.Serialization.XmlIgnoreAttribute()] - public bool IsVirtualSpecified - { - get - { - return this.isVirtualFieldSpecified; - } - set - { - this.isVirtualFieldSpecified = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public object Severity - { - get - { - return this.severityField; - } - set - { - this.severityField = value; - } - } - - /// - public int SourceID - { - get - { - return this.sourceIDField; - } - set - { - this.sourceIDField = value; - } - } - - /// - public object Text - { - get - { - return this.textField; - } - set - { - this.textField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.creationDateField; + set => this.creationDateField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionDataItems + public EquipmentDictionaryVersionDataItems DataItems { - - private EquipmentDictionaryVersionDataItemsItem[] itemField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Item")] - public EquipmentDictionaryVersionDataItemsItem[] Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.dataItemsField; + set => this.dataItemsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionDataItemsItem + public string Description { - - private string dataTypeField; - - private string descriptionField; - - private bool isQueryableField; - - private string nameField; - - private uint sourceIDField; - - private object unitField; - - private string validityContextField; - - private string idField; - - /// - public string DataType - { - get - { - return this.dataTypeField; - } - set - { - this.dataTypeField = value; - } - } - - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - public bool IsQueryable - { - get - { - return this.isQueryableField; - } - set - { - this.isQueryableField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public uint SourceID - { - get - { - return this.sourceIDField; - } - set - { - this.sourceIDField = value; - } - } - - /// - public object Unit - { - get - { - return this.unitField; - } - set - { - this.unitField = value; - } - } - - /// - public string ValidityContext - { - get - { - return this.validityContextField; - } - set - { - this.validityContextField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.descriptionField; + set => this.descriptionField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionEquipmentSettings + public string DictionaryName { - - private EquipmentDictionaryVersionEquipmentSettingsSetting[] settingField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Setting")] - public EquipmentDictionaryVersionEquipmentSettingsSetting[] Setting - { - get - { - return this.settingField; - } - set - { - this.settingField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.dictionaryNameField; + set => this.dictionaryNameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionEquipmentSettingsSetting + public EquipmentDictionaryVersionEquipmentSettings EquipmentSettings { - - private object contextField; - - private string dataTypeField; - - private string descriptionField; - - private string initialValueField; - - private bool initializeField; - - private string nameField; - - private uint sourceIDField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object Context - { - get - { - return this.contextField; - } - set - { - this.contextField = value; - } - } - - /// - public string DataType - { - get - { - return this.dataTypeField; - } - set - { - this.dataTypeField = value; - } - } - - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - public string InitialValue - { - get - { - return this.initialValueField; - } - set - { - this.initialValueField = value; - } - } - - /// - public bool Initialize - { - get - { - return this.initializeField; - } - set - { - this.initializeField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public uint SourceID - { - get - { - return this.sourceIDField; - } - set - { - this.sourceIDField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.equipmentSettingsField; + set => this.equipmentSettingsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionEvents + public EquipmentDictionaryVersionEvents Events { - - private EquipmentDictionaryVersionEventsEvent[] eventField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Event")] - public EquipmentDictionaryVersionEventsEvent[] Event - { - get - { - return this.eventField; - } - set - { - this.eventField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.eventsField; + set => this.eventsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionEventsEvent + public System.DateTime FreezeDate { - - private object contextField; - - private string descriptionField; - - private bool isAlwaysEnabledField; - - private bool isVirtualField; - - private string nameField; - - private string sourceIDField; - - private EquipmentDictionaryVersionEventsEventValidDataItems validDataItemsField; - - private string idField; - - /// - public object Context - { - get - { - return this.contextField; - } - set - { - this.contextField = value; - } - } - - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - public bool IsAlwaysEnabled - { - get - { - return this.isAlwaysEnabledField; - } - set - { - this.isAlwaysEnabledField = value; - } - } - - /// - public bool IsVirtual - { - get - { - return this.isVirtualField; - } - set - { - this.isVirtualField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public string SourceID - { - get - { - return this.sourceIDField; - } - set - { - this.sourceIDField = value; - } - } - - /// - public EquipmentDictionaryVersionEventsEventValidDataItems ValidDataItems - { - get - { - return this.validDataItemsField; - } - set - { - this.validDataItemsField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.freezeDateField; + set => this.freezeDateField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionEventsEventValidDataItems + public object FrozenBy { - - private string idField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.frozenByField; + set => this.frozenByField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypes + public bool IsFrozen { - - private EquipmentDictionaryVersionObjectTypesType[] typeField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Type")] - public EquipmentDictionaryVersionObjectTypesType[] Type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.isFrozenField; + set => this.isFrozenField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesType + public bool IsRetired { - - private EquipmentDictionaryVersionObjectTypesTypeAlarms alarmsField; - - private object baseTypeField; - - private EquipmentDictionaryVersionObjectTypesTypeDataItems dataItemsField; - - private EquipmentDictionaryVersionObjectTypesTypeEvents eventsField; - - private string nameField; - - private EquipmentDictionaryVersionObjectTypesTypeSettings settingsField; - - private string idField; - - /// - public EquipmentDictionaryVersionObjectTypesTypeAlarms Alarms - { - get - { - return this.alarmsField; - } - set - { - this.alarmsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object BaseType - { - get - { - return this.baseTypeField; - } - set - { - this.baseTypeField = value; - } - } - - /// - public EquipmentDictionaryVersionObjectTypesTypeDataItems DataItems - { - get - { - return this.dataItemsField; - } - set - { - this.dataItemsField = value; - } - } - - /// - public EquipmentDictionaryVersionObjectTypesTypeEvents Events - { - get - { - return this.eventsField; - } - set - { - this.eventsField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public EquipmentDictionaryVersionObjectTypesTypeSettings Settings - { - get - { - return this.settingsField; - } - set - { - this.settingsField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.isRetiredField; + set => this.isRetiredField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms + public string Name { - - private string idField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.nameField; + set => this.nameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems + public EquipmentDictionaryVersionObjectTypes ObjectTypes { - - private EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] itemField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Item")] - public EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.objectTypesField; + set => this.objectTypesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItem + public EquipmentDictionaryVersionReports Reports { - - private EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems equipmentDataItemsField; - - private string nameField; - - private object unitField; - - private string idField; - - /// - public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems EquipmentDataItems - { - get - { - return this.equipmentDataItemsField; - } - set - { - this.equipmentDataItemsField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public object Unit - { - get - { - return this.unitField; - } - set - { - this.unitField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.reportsField; + set => this.reportsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems + public System.DateTime RetireDate { - - private EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] itemField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Item")] - public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.retireDateField; + set => this.retireDateField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem + public object RetiredBy { - - private string refField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } + get => this.retiredByField; + set => this.retiredByField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeEvents + public string SchemaVersion { - - private EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] eventField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Event")] - public EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] Event - { - get - { - return this.eventField; - } - set - { - this.eventField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.schemaVersionField; + set => this.schemaVersionField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEvent + public EquipmentDictionaryVersionValidityMapDataItemToEvent ValidityMapDataItemToEvent { - - private EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents equipmentEventsField; - - private string nameField; - - private string stateModelField; - - private string idField; - - /// - public EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents EquipmentEvents - { - get - { - return this.equipmentEventsField; - } - set - { - this.equipmentEventsField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public string StateModel - { - get - { - return this.stateModelField; - } - set - { - this.stateModelField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.validityMapDataItemToEventField; + set => this.validityMapDataItemToEventField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id { + get => this.idField; + set => this.idField = value; + } +} - private EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent eventField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionAlarms +{ - private string idField; + private EquipmentDictionaryVersionAlarmsAlarm[] alarmField; - /// - public EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent Event - { - get - { - return this.eventField; - } - set - { - this.eventField = value; - } - } + private string idField; - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + /// + [System.Xml.Serialization.XmlElementAttribute("Alarm")] + public EquipmentDictionaryVersionAlarmsAlarm[] Alarm + { + get => this.alarmField; + set => this.alarmField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id { + get => this.idField; + set => this.idField = value; + } +} - private string refField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionAlarmsAlarm +{ - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } + private object contextField; + + private string descriptionField; + + private bool isEnabledField; + + private bool isVirtualField; + + private bool isVirtualFieldSpecified; + + private string nameField; + + private object severityField; + + private int sourceIDField; + + private object textField; + + private string idField; + + /// + public object Context + { + get => this.contextField; + set => this.contextField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionObjectTypesTypeSettings + public string Description { - - private string idField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.descriptionField; + set => this.descriptionField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReports + public bool IsEnabled { - - private EquipmentDictionaryVersionReportsReport[] reportField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Report")] - public EquipmentDictionaryVersionReportsReport[] Report - { - get - { - return this.reportField; - } - set - { - this.reportField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.isEnabledField; + set => this.isEnabledField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReport + public bool IsVirtual { - - private EquipmentDictionaryVersionReportsReportDataItems dataItemsField; - - private bool isPreDefinedField; - - private EquipmentDictionaryVersionReportsReportLinkEvents linkEventsField; - - private string nameField; - - private EquipmentDictionaryVersionReportsReportPreLinkedEvents preLinkedEventsField; - - private object sourceIdField; - - private string idField; - - /// - public EquipmentDictionaryVersionReportsReportDataItems DataItems - { - get - { - return this.dataItemsField; - } - set - { - this.dataItemsField = value; - } - } - - /// - public bool IsPreDefined - { - get - { - return this.isPreDefinedField; - } - set - { - this.isPreDefinedField = value; - } - } - - /// - public EquipmentDictionaryVersionReportsReportLinkEvents LinkEvents - { - get - { - return this.linkEventsField; - } - set - { - this.linkEventsField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public EquipmentDictionaryVersionReportsReportPreLinkedEvents PreLinkedEvents - { - get - { - return this.preLinkedEventsField; - } - set - { - this.preLinkedEventsField = value; - } - } - - /// - public object SourceId - { - get - { - return this.sourceIdField; - } - set - { - this.sourceIdField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.isVirtualField; + set => this.isVirtualField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReportDataItems + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool IsVirtualSpecified { - - private EquipmentDictionaryVersionReportsReportDataItemsItem[] itemField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Item")] - public EquipmentDictionaryVersionReportsReportDataItemsItem[] Item - { - get - { - return this.itemField; - } - set - { - this.itemField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.isVirtualFieldSpecified; + set => this.isVirtualFieldSpecified = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReportDataItemsItem + public string Name { - - private string refField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } + get => this.nameField; + set => this.nameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReportLinkEvents + public object Severity { - - private EquipmentDictionaryVersionReportsReportLinkEventsEvent[] eventField; - - private string idField; - - /// - [System.Xml.Serialization.XmlElementAttribute("Event")] - public EquipmentDictionaryVersionReportsReportLinkEventsEvent[] Event - { - get - { - return this.eventField; - } - set - { - this.eventField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.severityField; + set => this.severityField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent + public int SourceID { - - private string refField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Ref - { - get - { - return this.refField; - } - set - { - this.refField = value; - } - } + get => this.sourceIDField; + set => this.sourceIDField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents + public object Text { - - private string idField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.textField; + set => this.textField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + - "tCharacterization")] - public partial class EquipmentDictionaryVersionValidityMapDataItemToEvent + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id { + get => this.idField; + set => this.idField = value; + } +} - private object dataItemsField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionDataItems +{ - /// - public object DataItems - { - get - { - return this.dataItemsField; - } - set - { - this.dataItemsField = value; - } - } + private EquipmentDictionaryVersionDataItemsItem[] itemField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Item")] + public EquipmentDictionaryVersionDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; } + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionDataItemsItem +{ + + private string dataTypeField; + + private string descriptionField; + + private bool isQueryableField; + + private string nameField; + + private uint sourceIDField; + + private object unitField; + + private string validityContextField; + + private string idField; + + /// + public string DataType + { + get => this.dataTypeField; + set => this.dataTypeField = value; + } + + /// + public string Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + public bool IsQueryable + { + get => this.isQueryableField; + set => this.isQueryableField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public uint SourceID + { + get => this.sourceIDField; + set => this.sourceIDField = value; + } + + /// + public object Unit + { + get => this.unitField; + set => this.unitField = value; + } + + /// + public string ValidityContext + { + get => this.validityContextField; + set => this.validityContextField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEquipmentSettings +{ + + private EquipmentDictionaryVersionEquipmentSettingsSetting[] settingField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Setting")] + public EquipmentDictionaryVersionEquipmentSettingsSetting[] Setting + { + get => this.settingField; + set => this.settingField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEquipmentSettingsSetting +{ + + private object contextField; + + private string dataTypeField; + + private string descriptionField; + + private string initialValueField; + + private bool initializeField; + + private string nameField; + + private uint sourceIDField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object Context + { + get => this.contextField; + set => this.contextField = value; + } + + /// + public string DataType + { + get => this.dataTypeField; + set => this.dataTypeField = value; + } + + /// + public string Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + public string InitialValue + { + get => this.initialValueField; + set => this.initialValueField = value; + } + + /// + public bool Initialize + { + get => this.initializeField; + set => this.initializeField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public uint SourceID + { + get => this.sourceIDField; + set => this.sourceIDField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEvents +{ + + private EquipmentDictionaryVersionEventsEvent[] eventField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Event")] + public EquipmentDictionaryVersionEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEventsEvent +{ + + private object contextField; + + private string descriptionField; + + private bool isAlwaysEnabledField; + + private bool isVirtualField; + + private string nameField; + + private string sourceIDField; + + private EquipmentDictionaryVersionEventsEventValidDataItems validDataItemsField; + + private string idField; + + /// + public object Context + { + get => this.contextField; + set => this.contextField = value; + } + + /// + public string Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + public bool IsAlwaysEnabled + { + get => this.isAlwaysEnabledField; + set => this.isAlwaysEnabledField = value; + } + + /// + public bool IsVirtual + { + get => this.isVirtualField; + set => this.isVirtualField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public string SourceID + { + get => this.sourceIDField; + set => this.sourceIDField = value; + } + + /// + public EquipmentDictionaryVersionEventsEventValidDataItems ValidDataItems + { + get => this.validDataItemsField; + set => this.validDataItemsField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEventsEventValidDataItems +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypes +{ + + private EquipmentDictionaryVersionObjectTypesType[] typeField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Type")] + public EquipmentDictionaryVersionObjectTypesType[] Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesType +{ + + private EquipmentDictionaryVersionObjectTypesTypeAlarms alarmsField; + + private object baseTypeField; + + private EquipmentDictionaryVersionObjectTypesTypeDataItems dataItemsField; + + private EquipmentDictionaryVersionObjectTypesTypeEvents eventsField; + + private string nameField; + + private EquipmentDictionaryVersionObjectTypesTypeSettings settingsField; + + private string idField; + + /// + public EquipmentDictionaryVersionObjectTypesTypeAlarms Alarms + { + get => this.alarmsField; + set => this.alarmsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object BaseType + { + get => this.baseTypeField; + set => this.baseTypeField = value; + } + + /// + public EquipmentDictionaryVersionObjectTypesTypeDataItems DataItems + { + get => this.dataItemsField; + set => this.dataItemsField = value; + } + + /// + public EquipmentDictionaryVersionObjectTypesTypeEvents Events + { + get => this.eventsField; + set => this.eventsField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public EquipmentDictionaryVersionObjectTypesTypeSettings Settings + { + get => this.settingsField; + set => this.settingsField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeDataItems +{ + + private EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] itemField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Item")] + public EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItem +{ + + private EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems equipmentDataItemsField; + + private string nameField; + + private object unitField; + + private string idField; + + /// + public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems EquipmentDataItems + { + get => this.equipmentDataItemsField; + set => this.equipmentDataItemsField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public object Unit + { + get => this.unitField; + set => this.unitField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItems +{ + + private EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] itemField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Item")] + public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeEvents +{ + + private EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] eventField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Event")] + public EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEvent +{ + + private EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents equipmentEventsField; + + private string nameField; + + private string stateModelField; + + private string idField; + + /// + public EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents EquipmentEvents + { + get => this.equipmentEventsField; + set => this.equipmentEventsField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public string StateModel + { + get => this.stateModelField; + set => this.stateModelField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEvents +{ + + private EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent eventField; + + private string idField; + + /// + public EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeSettings +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReports +{ + + private EquipmentDictionaryVersionReportsReport[] reportField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Report")] + public EquipmentDictionaryVersionReportsReport[] Report + { + get => this.reportField; + set => this.reportField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReport +{ + + private EquipmentDictionaryVersionReportsReportDataItems dataItemsField; + + private bool isPreDefinedField; + + private EquipmentDictionaryVersionReportsReportLinkEvents linkEventsField; + + private string nameField; + + private EquipmentDictionaryVersionReportsReportPreLinkedEvents preLinkedEventsField; + + private object sourceIdField; + + private string idField; + + /// + public EquipmentDictionaryVersionReportsReportDataItems DataItems + { + get => this.dataItemsField; + set => this.dataItemsField = value; + } + + /// + public bool IsPreDefined + { + get => this.isPreDefinedField; + set => this.isPreDefinedField = value; + } + + /// + public EquipmentDictionaryVersionReportsReportLinkEvents LinkEvents + { + get => this.linkEventsField; + set => this.linkEventsField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public EquipmentDictionaryVersionReportsReportPreLinkedEvents PreLinkedEvents + { + get => this.preLinkedEventsField; + set => this.preLinkedEventsField = value; + } + + /// + public object SourceId + { + get => this.sourceIdField; + set => this.sourceIdField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportDataItems +{ + + private EquipmentDictionaryVersionReportsReportDataItemsItem[] itemField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Item")] + public EquipmentDictionaryVersionReportsReportDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportDataItemsItem +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportLinkEvents +{ + + private EquipmentDictionaryVersionReportsReportLinkEventsEvent[] eventField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Event")] + public EquipmentDictionaryVersionReportsReportLinkEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionValidityMapDataItemToEvent +{ + + private object dataItemsField; + + /// + public object DataItems + { + get => this.dataItemsField; + set => this.dataItemsField = value; + } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs index 6366266..64cc091 100644 --- a/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs @@ -1,1437 +1,960 @@ -namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentType +namespace Shared.PasteSpecialXml.EAF.XML.API.EquipmentType; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] +public partial class EquipmentTypeVersion { - // NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. + private string createdByField; + + private System.DateTime creationDateField; + + private object descriptionField; + + private ExtensionsVersionExtension[] extensionsField; + + private System.DateTime freezeDateField; + + private string frozenByField; + + private byte idField; + + private bool isFrozenField; + + private bool isRetiredField; + + private System.DateTime retireDateField; + + private object retiredByField; + + private SelectedDeploymentPackage[] deploymentPackagesField; + + private EquipmentTypeVersionDictionaries dictionariesField; + + private string nameField; + + private EquipmentTypeVersionParentType parentTypeField; + + private ParameterizedModelObjectDefinition[] equipmentComponentsField; + + private EventActionSequenceDefinition[] eventActionSequencesField; + + private object fileCommunicatorObjectTypesField; + + private FileConfiguration fileConfigurationField; + + private FileHandlerObjectTypes fileHandlerObjectTypesField; + + private ParameterizedModelObjectDefinition[] transientEquipmentObjectTypesField; + + private string id1Field; + + private string i___typeField; + /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] - public partial class EquipmentTypeVersion + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string CreatedBy { - - private string createdByField; - - private System.DateTime creationDateField; - - private object descriptionField; - - private ExtensionsVersionExtension[] extensionsField; - - private System.DateTime freezeDateField; - - private string frozenByField; - - private byte idField; - - private bool isFrozenField; - - private bool isRetiredField; - - private System.DateTime retireDateField; - - private object retiredByField; - - private SelectedDeploymentPackage[] deploymentPackagesField; - - private EquipmentTypeVersionDictionaries dictionariesField; - - private string nameField; - - private EquipmentTypeVersionParentType parentTypeField; - - private ParameterizedModelObjectDefinition[] equipmentComponentsField; - - private EventActionSequenceDefinition[] eventActionSequencesField; - - private object fileCommunicatorObjectTypesField; - - private FileConfiguration fileConfigurationField; - - private FileHandlerObjectTypes fileHandlerObjectTypesField; - - private ParameterizedModelObjectDefinition[] transientEquipmentObjectTypesField; - - private string id1Field; - - private string i___typeField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public string CreatedBy - { - get - { - return this.createdByField; - } - set - { - this.createdByField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime CreationDate - { - get - { - return this.creationDateField; - } - set - { - this.creationDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = true)] - public object Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - [System.Xml.Serialization.XmlArrayItemAttribute("VersionExtension", IsNullable = false)] - public ExtensionsVersionExtension[] Extensions - { - get - { - return this.extensionsField; - } - set - { - this.extensionsField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime FreezeDate - { - get - { - return this.freezeDateField; - } - set - { - this.freezeDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public string FrozenBy - { - get - { - return this.frozenByField; - } - set - { - this.frozenByField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public bool IsFrozen - { - get - { - return this.isFrozenField; - } - set - { - this.isFrozenField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public bool IsRetired - { - get - { - return this.isRetiredField; - } - set - { - this.isRetiredField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public System.DateTime RetireDate - { - get - { - return this.retireDateField; - } - set - { - this.retireDateField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = true)] - public object RetiredBy - { - get - { - return this.retiredByField; - } - set - { - this.retiredByField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + - "nt", IsNullable = false)] - public SelectedDeploymentPackage[] DeploymentPackages - { - get - { - return this.deploymentPackagesField; - } - set - { - this.deploymentPackagesField = value; - } - } - - /// - public EquipmentTypeVersionDictionaries Dictionaries - { - get - { - return this.dictionariesField; - } - set - { - this.dictionariesField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public EquipmentTypeVersionParentType ParentType - { - get - { - return this.parentTypeField; - } - set - { - this.parentTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation", IsNullable = false)] - public ParameterizedModelObjectDefinition[] EquipmentComponents - { - get - { - return this.equipmentComponentsField; - } - set - { - this.equipmentComponentsField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlArrayItemAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation", IsNullable = false)] - public EventActionSequenceDefinition[] EventActionSequences - { - get - { - return this.eventActionSequencesField; - } - set - { - this.eventActionSequencesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - public object FileCommunicatorObjectTypes - { - get - { - return this.fileCommunicatorObjectTypesField; - } - set - { - this.fileCommunicatorObjectTypesField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - public FileConfiguration FileConfiguration - { - get - { - return this.fileConfigurationField; - } - set - { - this.fileConfigurationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - public FileHandlerObjectTypes FileHandlerObjectTypes - { - get - { - return this.fileHandlerObjectTypesField; - } - set - { - this.fileHandlerObjectTypesField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation", IsNullable = false)] - public ParameterizedModelObjectDefinition[] TransientEquipmentObjectTypes - { - get - { - return this.transientEquipmentObjectTypesField; - } - set - { - this.transientEquipmentObjectTypesField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } + get => this.createdByField; + set => this.createdByField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + - "nt")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime CreationDate + { + get => this.creationDateField; + set => this.creationDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = true)] + public object Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + [System.Xml.Serialization.XmlArrayItemAttribute("VersionExtension", IsNullable = false)] + public ExtensionsVersionExtension[] Extensions + { + get => this.extensionsField; + set => this.extensionsField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime FreezeDate + { + get => this.freezeDateField; + set => this.freezeDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string FrozenBy + { + get => this.frozenByField; + set => this.frozenByField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public bool IsFrozen + { + get => this.isFrozenField; + set => this.isFrozenField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public bool IsRetired + { + get => this.isRetiredField; + set => this.isRetiredField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public System.DateTime RetireDate + { + get => this.retireDateField; + set => this.retireDateField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = true)] + public object RetiredBy + { + get => this.retiredByField; + set => this.retiredByField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + "nt", IsNullable = false)] - public partial class SelectedDeploymentPackage + public SelectedDeploymentPackage[] DeploymentPackages { - - private byte idField; - - private string packageNameField; - - private string packageVersionField; - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public string PackageName - { - get - { - return this.packageNameField; - } - set - { - this.packageNameField = value; - } - } - - /// - public string PackageVersion - { - get - { - return this.packageVersionField; - } - set - { - this.packageVersionField = value; - } - } + get => this.deploymentPackagesField; + set => this.deploymentPackagesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - public partial class ExtensionsVersionExtension + public EquipmentTypeVersionDictionaries Dictionaries { - - private byte idField; - - private string classNameField; - - private object configurationField; - - private string nameField; - - private string id1Field; - - private string i___typeField; - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s")] - public string ClassName - { - get - { - return this.classNameField; - } - set - { - this.classNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s", IsNullable = true)] - public object Configuration - { - get - { - return this.configurationField; - } - set - { - this.configurationField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + - "s")] - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute()] - public string i___type - { - get - { - return this.i___typeField; - } - set - { - this.i___typeField = value; - } - } + get => this.dictionariesField; + set => this.dictionariesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class EquipmentTypeVersionDictionaries + public string Name { - - private EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference equipmentTypeDictionaryReferenceField; - - /// - public EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference EquipmentTypeDictionaryReference - { - get - { - return this.equipmentTypeDictionaryReferenceField; - } - set - { - this.equipmentTypeDictionaryReferenceField = value; - } - } + get => this.nameField; + set => this.nameField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference + public EquipmentTypeVersionParentType ParentType { - - private string dictionaryNameField; - - private string dictionaryVersionField; - - private byte idField; - - private string id1Field; - - /// - public string DictionaryName - { - get - { - return this.dictionaryNameField; - } - set - { - this.dictionaryNameField = value; - } - } - - /// - public string DictionaryVersion - { - get - { - return this.dictionaryVersionField; - } - set - { - this.dictionaryVersionField = value; - } - } - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.parentTypeField; + set => this.parentTypeField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] - public partial class EquipmentTypeVersionParentType - { - - private byte idField; - - private string nameField; - - private string id1Field; - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + [System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + "mation", IsNullable = false)] - public partial class ParameterizedModelObjectDefinition + public ParameterizedModelObjectDefinition[] EquipmentComponents { - - private byte idField; - - private string nameField; - - private ParameterizedModelObjectDefinitionModelObjectParameterDefinition[] parametersField; - - private string typeField; - - private string id1Field; - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)] - public ParameterizedModelObjectDefinitionModelObjectParameterDefinition[] Parameters - { - get - { - return this.parametersField; - } - set - { - this.parametersField = value; - } - } - - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.equipmentComponentsField; + set => this.equipmentComponentsField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefinition - { - - private string enumTypeField; - - private byte idField; - - private string nameField; - - private string valueField; - - private string valueTypeField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public string EnumType - { - get - { - return this.enumTypeField; - } - set - { - this.enumTypeField = value; - } - } - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// - public string ValueType - { - get - { - return this.valueTypeField; - } - set - { - this.valueTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + [System.Xml.Serialization.XmlArrayItemAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + "mation", IsNullable = false)] - public partial class EventActionSequenceDefinition + public EventActionSequenceDefinition[] EventActionSequences { - - private EventActionSequenceDefinitionEventActionParameterDefinition[] actionsField; - - private string eventTypeField; - - private string handledEventField; - - private byte idField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("EventActionParameterDefinition", IsNullable = false)] - public EventActionSequenceDefinitionEventActionParameterDefinition[] Actions - { - get - { - return this.actionsField; - } - set - { - this.actionsField = value; - } - } - - /// - public string EventType - { - get - { - return this.eventTypeField; - } - set - { - this.eventTypeField = value; - } - } - - /// - public string HandledEvent - { - get - { - return this.handledEventField; - } - set - { - this.handledEventField = value; - } - } - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.eventActionSequencesField; + set => this.eventActionSequencesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes", IsNullable = false)] - public class FileConfiguration + public object FileCommunicatorObjectTypes { - - private string idField; - - /// - [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } + get => this.fileCommunicatorObjectTypesField; + set => this.fileCommunicatorObjectTypesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes", IsNullable = false)] - public class FileHandlerObjectTypes + public FileConfiguration FileConfiguration { - - private ParameterizedModelObjectDefinition parameterizedModelObjectDefinitionField; - - /// - [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public ParameterizedModelObjectDefinition ParameterizedModelObjectDefinition - { - get - { - return this.parameterizedModelObjectDefinitionField; - } - set - { - this.parameterizedModelObjectDefinitionField = value; - } - } + get => this.fileConfigurationField; + set => this.fileConfigurationField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + - "ntities", IsNullable = false)] - public partial class Extensions - { - - private ExtensionsVersionExtension[] versionExtensionField; - - /// - [System.Xml.Serialization.XmlElementAttribute("VersionExtension")] - public ExtensionsVersionExtension[] VersionExtension - { - get - { - return this.versionExtensionField; - } - set - { - this.versionExtensionField = value; - } - } - } - - /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes", IsNullable = false)] - public partial class EquipmentComponents + public FileHandlerObjectTypes FileHandlerObjectTypes { - - private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; - - /// - [System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition - { - get - { - return this.parameterizedModelObjectDefinitionField; - } - set - { - this.parameterizedModelObjectDefinitionField = value; - } - } + get => this.fileHandlerObjectTypesField; + set => this.fileHandlerObjectTypesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + [System.Xml.Serialization.XmlArrayAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes", IsNullable = false)] - public partial class EventActionSequences + [System.Xml.Serialization.XmlArrayItemAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] + public ParameterizedModelObjectDefinition[] TransientEquipmentObjectTypes { - - private EventActionSequenceDefinition[] eventActionSequenceDefinitionField; - - /// - [System.Xml.Serialization.XmlElementAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public EventActionSequenceDefinition[] EventActionSequenceDefinition - { - get - { - return this.eventActionSequenceDefinitionField; - } - set - { - this.eventActionSequenceDefinitionField = value; - } - } + get => this.transientEquipmentObjectTypesField; + set => this.transientEquipmentObjectTypesField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes")] - [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + - "Connector.EquipmentTypes", IsNullable = false)] - public partial class TransientEquipmentObjectTypes + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 { - - private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; - - /// - [System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition - { - get - { - return this.parameterizedModelObjectDefinitionField; - } - set - { - this.parameterizedModelObjectDefinitionField = value; - } - } + get => this.id1Field; + set => this.id1Field = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt", IsNullable = false)] +public partial class SelectedDeploymentPackage +{ + + private byte idField; + + private string packageNameField; + + private string packageVersionField; + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public string PackageName + { + get => this.packageNameField; + set => this.packageNameField = value; + } + + /// + public string PackageVersion + { + get => this.packageVersionField; + set => this.packageVersionField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +public partial class ExtensionsVersionExtension +{ + + private byte idField; + + private string classNameField; + + private object configurationField; + + private string nameField; + + private string id1Field; + + private string i___typeField; + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s")] + public string ClassName + { + get => this.classNameField; + set => this.classNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s", IsNullable = true)] + public object Configuration + { + get => this.configurationField; + set => this.configurationField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Backbone" + + "s")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class EquipmentTypeVersionDictionaries +{ + + private EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference equipmentTypeDictionaryReferenceField; + + /// + public EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference EquipmentTypeDictionaryReference + { + get => this.equipmentTypeDictionaryReferenceField; + set => this.equipmentTypeDictionaryReferenceField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class EquipmentTypeVersionDictionariesEquipmentTypeDictionaryReference +{ + + private string dictionaryNameField; + + private string dictionaryVersionField; + + private byte idField; + + private string id1Field; + + /// + public string DictionaryName + { + get => this.dictionaryNameField; + set => this.dictionaryNameField = value; + } + + /// + public string DictionaryVersion + { + get => this.dictionaryVersionField; + set => this.dictionaryVersionField = value; + } + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +public partial class EquipmentTypeVersionParentType +{ + + private byte idField; + + private string nameField; + + private string id1Field; + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] +public partial class ParameterizedModelObjectDefinition +{ + + private byte idField; + + private string nameField; + + private ParameterizedModelObjectDefinitionModelObjectParameterDefinition[] parametersField; + + private string typeField; + + private string id1Field; + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)] + public ParameterizedModelObjectDefinitionModelObjectParameterDefinition[] Parameters + { + get => this.parametersField; + set => this.parametersField = value; + } + + /// + public string Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +public partial class ParameterizedModelObjectDefinitionModelObjectParameterDefinition +{ + + private string enumTypeField; + + private byte idField; + + private string nameField; + + private string valueField; + + private string valueTypeField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public string EnumType + { + get => this.enumTypeField; + set => this.enumTypeField = value; + } + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public string Value + { + get => this.valueField; + set => this.valueField = value; + } + + /// + public string ValueType + { + get => this.valueTypeField; + set => this.valueTypeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] +public partial class EventActionSequenceDefinition +{ + + private EventActionSequenceDefinitionEventActionParameterDefinition[] actionsField; + + private string eventTypeField; + + private string handledEventField; + + private byte idField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("EventActionParameterDefinition", IsNullable = false)] + public EventActionSequenceDefinitionEventActionParameterDefinition[] Actions + { + get => this.actionsField; + set => this.actionsField = value; + } + + /// + public string EventType + { + get => this.eventTypeField; + set => this.eventTypeField = value; + } + + /// + public string HandledEvent + { + get => this.handledEventField; + set => this.handledEventField = value; + } + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public class FileConfiguration +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public class FileHandlerObjectTypes +{ + + private ParameterizedModelObjectDefinition parameterizedModelObjectDefinitionField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + "mation")] - public partial class EventActionSequenceDefinitionEventActionParameterDefinition + public ParameterizedModelObjectDefinition ParameterizedModelObjectDefinition { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} - private byte idField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = false)] +public partial class Extensions +{ - private object nameField; + private ExtensionsVersionExtension[] versionExtensionField; - private EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition[] parametersField; + /// + [System.Xml.Serialization.XmlElementAttribute("VersionExtension")] + public ExtensionsVersionExtension[] VersionExtension + { + get => this.versionExtensionField; + set => this.versionExtensionField = value; + } +} - private string typeField; +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class EquipmentComponents +{ - private byte positionField; + private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; - private string id1Field; + /// + [System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition + { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class EventActionSequences +{ - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } + private EventActionSequenceDefinition[] eventActionSequenceDefinitionField; - /// - [System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)] - public EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition[] Parameters - { - get - { - return this.parametersField; - } - set - { - this.parametersField = value; - } - } + /// + [System.Xml.Serialization.XmlElementAttribute("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public EventActionSequenceDefinition[] EventActionSequenceDefinition + { + get => this.eventActionSequenceDefinitionField; + set => this.eventActionSequenceDefinitionField = value; + } +} - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeField = value; - } - } +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class TransientEquipmentObjectTypes +{ - /// - public byte Position - { - get - { - return this.positionField; - } - set - { - this.positionField = value; - } - } + private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + /// + [System.Xml.Serialization.XmlElementAttribute("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition + { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +public partial class EventActionSequenceDefinitionEventActionParameterDefinition +{ + + private byte idField; + + private object nameField; + + private EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition[] parametersField; + + private string typeField; + + private byte positionField; + + private string id1Field; + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; } /// - [System.SerializableAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + - "mation")] - public partial class EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object Name { - - private object categoryField; - - private object descriptionField; - - private object displayNameField; - - private object enumTypeField; - - private byte idField; - - private bool isMandatoryField; - - private string nameField; - - private byte orderField; - - private string valueField; - - private string valueTypeField; - - private string id1Field; - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object Category - { - get - { - return this.categoryField; - } - set - { - this.categoryField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameField = value; - } - } - - /// - [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] - public object EnumType - { - get - { - return this.enumTypeField; - } - set - { - this.enumTypeField = value; - } - } - - /// - public byte Id - { - get - { - return this.idField; - } - set - { - this.idField = value; - } - } - - /// - public bool IsMandatory - { - get - { - return this.isMandatoryField; - } - set - { - this.isMandatoryField = value; - } - } - - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameField = value; - } - } - - /// - public byte Order - { - get - { - return this.orderField; - } - set - { - this.orderField = value; - } - } - - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueField = value; - } - } - - /// - public string ValueType - { - get - { - return this.valueTypeField; - } - set - { - this.valueTypeField = value; - } - } - - /// - [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] - public string Id1 - { - get - { - return this.id1Field; - } - set - { - this.id1Field = value; - } - } + get => this.nameField; + set => this.nameField = value; } + /// + [System.Xml.Serialization.XmlArrayItemAttribute("ModelObjectParameterDefinition", IsNullable = false)] + public EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition[] Parameters + { + get => this.parametersField; + set => this.parametersField = value; + } + + /// + public string Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + public byte Position + { + get => this.positionField; + set => this.positionField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } +} + +/// +[System.SerializableAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +public partial class EventActionSequenceDefinitionEventActionParameterDefinitionModelObjectParameterDefinition +{ + + private object categoryField; + + private object descriptionField; + + private object displayNameField; + + private object enumTypeField; + + private byte idField; + + private bool isMandatoryField; + + private string nameField; + + private byte orderField; + + private string valueField; + + private string valueTypeField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object Category + { + get => this.categoryField; + set => this.categoryField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object DisplayName + { + get => this.displayNameField; + set => this.displayNameField = value; + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] + public object EnumType + { + get => this.enumTypeField; + set => this.enumTypeField = value; + } + + /// + public byte Id + { + get => this.idField; + set => this.idField = value; + } + + /// + public bool IsMandatory + { + get => this.isMandatoryField; + set => this.isMandatoryField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public byte Order + { + get => this.orderField; + set => this.orderField = value; + } + + /// + public string Value + { + get => this.valueField; + set => this.valueField = value; + } + + /// + public string ValueType + { + get => this.valueTypeField; + set => this.valueTypeField = value; + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute("Id", Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id1 + { + get => this.id1Field; + set => this.id1Field = value; + } } \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/UnitTesting.cs b/Adaptation/_Tests/Shared/UnitTesting.cs index b2dacf8..6276954 100644 --- a/Adaptation/_Tests/Shared/UnitTesting.cs +++ b/Adaptation/_Tests/Shared/UnitTesting.cs @@ -8,86 +8,83 @@ using System.Text; using System.Text.Json; using System.Threading; -namespace Shared +namespace Shared; + +public class UnitTesting { - public class UnitTesting + protected readonly IsEnvironment _IsEnvironment; + + public IsEnvironment IsEnvironment => _IsEnvironment; + + public UnitTesting(TestContext testContext, Type declaringType) { - - protected readonly IsEnvironment _IsEnvironment; - - public IsEnvironment IsEnvironment => _IsEnvironment; - - public UnitTesting(TestContext testContext, Type declaringType) + if (testContext is null || declaringType is null) + _IsEnvironment = null; + else { - if (testContext is null || declaringType is null) - _IsEnvironment = null; - else - { - string projectDirectory = GetProjectDirectory(testContext); - string json = JsonSerializer.Serialize(testContext.Properties); - string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); - if (!Directory.Exists(vsCodeDirectory)) - Directory.CreateDirectory(vsCodeDirectory); - string launchText = GetLaunchText(); - File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText); - for (int i = 0; i < int.MaxValue; i++) - { - if (!json.Contains("Debugger.IsAttached") || Debugger.IsAttached) - break; - Thread.Sleep(500); - } - MethodBase methodBase = declaringType.GetMethod(testContext.TestName); - if (!(methodBase is null)) - { - TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute(); - if (!(testCategoryAttribute is null)) - { - foreach (string testCategory in testCategoryAttribute.TestCategories) - _IsEnvironment = new IsEnvironment(testCategory); - } - } - if (_IsEnvironment is null) - _IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); - } - } - - internal static string GetProjectDirectory(TestContext testContext) - { - string result; - string[] checkFiles = null; - result = Path.GetDirectoryName(testContext.DeploymentDirectory); + string projectDirectory = GetProjectDirectory(testContext); + string json = JsonSerializer.Serialize(testContext.Properties); + string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); + if (!Directory.Exists(vsCodeDirectory)) + _ = Directory.CreateDirectory(vsCodeDirectory); + string launchText = GetLaunchText(); + File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText); for (int i = 0; i < int.MaxValue; i++) { - if (string.IsNullOrEmpty(result)) + if (!json.Contains("Debugger.IsAttached") || Debugger.IsAttached) break; - checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly); - if (checkFiles.Any()) - break; - result = Path.GetDirectoryName(result); + Thread.Sleep(500); } - if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any()) - throw new Exception(result); - return result; + MethodBase methodBase = declaringType.GetMethod(testContext.TestName); + if (methodBase is not null) + { + TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute(); + if (testCategoryAttribute is not null) + { + foreach (string testCategory in testCategoryAttribute.TestCategories) + _IsEnvironment = new IsEnvironment(testCategory); + } + } + if (_IsEnvironment is null) + _IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); } + } - internal static string GetLaunchText() + internal static string GetProjectDirectory(TestContext testContext) + { + string result; + string[] checkFiles = null; + result = Path.GetDirectoryName(testContext.DeploymentDirectory); + for (int i = 0; i < int.MaxValue; i++) { - StringBuilder result = new StringBuilder(); - result. - AppendLine("{"). - AppendLine(" \"configurations\": ["). - AppendLine(" {"). - AppendLine(" \"name\": \".NET Core Attach\","). - AppendLine(" \"type\": \"coreclr\","). - AppendLine(" \"request\": \"attach\","). - AppendLine($" \"processId\": {System.Diagnostics.Process.GetCurrentProcess().Id}"). - AppendLine(" }"). - AppendLine(" ]"). - AppendLine("}"); - return result.ToString(); + if (string.IsNullOrEmpty(result)) + break; + checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly); + if (checkFiles.Any()) + break; + result = Path.GetDirectoryName(result); } + if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any()) + throw new Exception(result); + return result; + } + internal static string GetLaunchText() + { + StringBuilder result = new(); + _ = result. + AppendLine("{"). + AppendLine(" \"configurations\": ["). + AppendLine(" {"). + AppendLine(" \"name\": \".NET Core Attach\","). + AppendLine(" \"type\": \"coreclr\","). + AppendLine(" \"request\": \"attach\","). + AppendLine($" \"processId\": {Process.GetCurrentProcess().Id}"). + AppendLine(" }"). + AppendLine(" ]"). + AppendLine("}"); + return result.ToString(); } } \ No newline at end of file diff --git a/Adaptation/package.json b/Adaptation/package.json index 8247f48..85e4cd9 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -1,8 +1,23 @@ { "scripts": { + "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "build": "dotnet build --runtime win-x64 --self-contained", - "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity error", + "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn", "pull": "git pull", - "garbage-collect": "git gc" + "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\\\")", + "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\\\")", + "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\\\")", + "BX-Extract.Staging.v2_39_0-BIORAD3_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD3_EQPT\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BY-Extract.Staging.v2_39_0-BIORAD3": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0 & ClassName~BIORAD3\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")", + "BZ-Extract.Staging.v2_39_0": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~_Tests.Extract.Staging.v2_39_0\" --% -- TestRunParameters.Parameter(name=\\\"Debug\\\", value=\\\"Debugger.IsAttached\\\")" } } \ No newline at end of file diff --git a/MET08THFTIRQS408M.csproj b/MET08THFTIRQS408M.csproj index 90d3d63..c457749 100644 --- a/MET08THFTIRQS408M.csproj +++ b/MET08THFTIRQS408M.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {487D4926-8D41-4749-B1DA-110B9F5B5D98} - 9.0 + 10.0 Library Properties MET08THFTIRQS408M @@ -93,7 +93,9 @@ + + @@ -102,6 +104,7 @@ + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 49e1fa6..b275669 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.36.3.0")] -[assembly: AssemblyFileVersion("2.36.3.0")] +[assembly: AssemblyVersion("2.39.0.0")] +[assembly: AssemblyFileVersion("2.39.0.0")]