From 5cda49470811c676e7ce7e22e51846e27f367571 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Fri, 21 Feb 2025 13:47:08 -0700 Subject: [PATCH] Infineon.EAF.Runtime v2.59.0 With .gitignore *.traineddata --- .gitignore | 19 +- .vscode/settings.json | 55 + Adaptation/.config/dotnet-tools.json | 12 + Adaptation/.editorconfig | 281 ++ Adaptation/.vscode/extensions.json | 46 + Adaptation/.vscode/format-report.json | 1 + Adaptation/.vscode/launch.json | 10 + Adaptation/.vscode/mklink.md | 5 + Adaptation/.vscode/settings.json | 81 + Adaptation/.vscode/tasks.json | 110 + Adaptation/DEP08SIASM-Development.yml | 1 + Adaptation/DEP08SIASM.Tests.csproj | 95 + Adaptation/DEP08SIASM.yml | 1 + .../Core/AutoGenerated/BackboneComponent.cs | 5 + .../Core/AutoGenerated/BackboneStatusCache.cs | 5 + .../AutoGenerated/ILoggingSetupManager.cs | 5 + .../Eaf/Core/AutoGenerated/StatusItem.cs | 5 + Adaptation/Eaf/Core/Backbone.cs | 53 + Adaptation/Eaf/Core/Smtp/EmailMessage.cs | 24 + Adaptation/Eaf/Core/Smtp/ISmtp.cs | 6 + Adaptation/Eaf/Core/Smtp/MailPriority.cs | 8 + .../ChangeDataCollectionHandler.cs | 5 + .../AutoGenerated/DataCollectionRequest.cs | 5 + .../Control/AutoGenerated/EquipmentEvent.cs | 5 + .../AutoGenerated/EquipmentException.cs | 5 + .../AutoGenerated/EquipmentSelfDescription.cs | 5 + .../GetParameterValuesHandler.cs | 5 + .../AutoGenerated/IConnectionControl.cs | 5 + .../AutoGenerated/IDataTracingHandler.cs | 5 + .../AutoGenerated/IEquipmentCommandService.cs | 5 + .../AutoGenerated/IEquipmentControl.cs | 15 + .../IEquipmentSelfDescriptionBuilder.cs | 5 + .../Control/AutoGenerated/IPackage.cs | 5 + .../AutoGenerated/ISelfDescriptionLookup.cs | 5 + .../IVirtualParameterValuesHandler.cs | 5 + .../SetParameterValuesHandler.cs | 5 + .../Control/AutoGenerated/TraceRequest.cs | 5 + .../Control/IEquipmentDataCollection.cs | 38 + .../EquipmentCore/Control/IPackageSource.cs | 5 + .../Reporting/ParameterValue.cs | 23 + .../ElementDescription/EquipmentParameter.cs | 26 + .../SelfDescription/ParameterTypes/Field.cs | 15 + .../ParameterTypes/ParameterTypeDefinition.cs | 15 + .../ParameterTypes/StructuredType.cs | 14 + .../CellAutomation/IConfigurationObject.cs | 5 + .../ModelObjectParameterDefinition.cs | 29 + .../ModelObjectParameterType.cs | 16 + .../SecsConnectionConfiguration.cs | 43 + .../CellInstanceConnectionName.cs | 25 + .../FileHandlers/DownloadJpegFile/FileRead.cs | 168 + .../MonitorApplication/FileRead.cs | 140 + .../OpenInsight/CommonGatewayInterface.cs | 38 + .../FileHandlers/OpenInsight/FileRead.cs | 145 + Adaptation/FileHandlers/jpeg/Description.cs | 229 ++ Adaptation/FileHandlers/jpeg/FileRead.cs | 216 ++ Adaptation/FileHandlers/jpeg/ProcessData.cs | 486 +++ .../Common/Configuration/ConnectionSetting.cs | 16 + .../EquipmentConnector/File/Component/File.cs | 22 + .../File/Component/FilePathGenerator.cs | 38 + .../FileConnectorConfiguration.cs | 134 + ...onnectorParameterTypeDefinitionProvider.cs | 18 + .../Infineon/Monitoring/MonA/ExtWebClient.cs | 20 + Adaptation/Infineon/Monitoring/MonA/IMonIn.cs | 167 + Adaptation/Infineon/Monitoring/MonA/MonIn.cs | 283 ++ Adaptation/Infineon/Monitoring/MonA/State.cs | 11 + .../GCL/Annotations/NotNullAttribute.cs | 9 + .../GCL/SecsDriver/HsmsConnectionMode.cs | 7 + .../GCL/SecsDriver/HsmsSessionMode.cs | 7 + .../GCL/SecsDriver/SecsTransportType.cs | 7 + .../GCL/SecsDriver/SerialBaudRate.cs | 15 + Adaptation/Shared/Duplicator/Description.cs | 181 + Adaptation/Shared/FileRead.cs | 795 +++++ Adaptation/Shared/Logistics.cs | 201 ++ Adaptation/Shared/Logistics2.cs | 78 + Adaptation/Shared/Methods/IDescription.cs | 22 + Adaptation/Shared/Methods/IFileRead.cs | 22 + Adaptation/Shared/Methods/ILogistics.cs | 5 + Adaptation/Shared/Methods/ILogistics2.cs | 5 + Adaptation/Shared/Methods/IProcessData.cs | 14 + Adaptation/Shared/Methods/ISMTP.cs | 8 + Adaptation/Shared/Metrology/ScopeInfo.cs | 300 ++ Adaptation/Shared/Metrology/WS.Attachment.cs | 30 + Adaptation/Shared/Metrology/WS.Results.cs | 27 + Adaptation/Shared/Metrology/WS.cs | 123 + Adaptation/Shared/ParameterType.cs | 10 + .../Shared/ProcessDataStandardFormat.cs | 410 +++ Adaptation/Shared/Properties/IDescription.cs | 11 + Adaptation/Shared/Properties/IFileRead.cs | 18 + Adaptation/Shared/Properties/ILogistics.cs | 23 + Adaptation/Shared/Properties/ILogistics2.cs | 14 + Adaptation/Shared/Properties/IProcessData.cs | 10 + Adaptation/Shared/Properties/IScopeInfo.cs | 17 + Adaptation/Shared/Test.cs | 60 + .../Production/v2.59.0/DEP08SIASM.cs | 182 + .../Production/v2.59.0/R34-EQPT.cs | 65 + .../Production/v2.59.0/R34.cs | 65 + .../Production/v2.59.0/R36-EQPT.cs | 65 + .../Production/v2.59.0/R36.cs | 65 + .../Staging/v2.39.2/DEP08SIASM.cs | 167 + .../Staging/v2.39.2/R34-EQPT.cs | 63 + .../Staging/v2.39.2/R34.cs | 63 + .../Staging/v2.39.2/R36-EQPT.cs | 63 + .../Staging/v2.39.2/R36.cs | 63 + .../Staging/v2.43.0/DEP08SIASM.cs | 180 + .../Staging/v2.43.0/R34-EQPT.cs | 63 + .../Staging/v2.43.0/R34.cs | 63 + .../Staging/v2.43.0/R36-EQPT.cs | 63 + .../Staging/v2.43.0/R36.cs | 63 + .../Staging/v2.56.0/DEP08SIASM.cs | 160 + .../Staging/v2.56.0/R34-EQPT.cs | 61 + .../Staging/v2.56.0/R34.cs | 63 + .../Staging/v2.56.0/R36-EQPT.cs | 61 + .../Staging/v2.56.0/R36.cs | 63 + .../Staging/v2.57.0/DEP08SIASM.cs | 180 + .../Staging/v2.57.0/R34-EQPT.cs | 63 + .../Staging/v2.57.0/R34.cs | 65 + .../Staging/v2.57.0/R36-EQPT.cs | 63 + .../Staging/v2.57.0/R36.cs | 65 + .../Extract/Production/v2.59.0/DEP08SIASM.cs | 83 + .../Extract/Production/v2.59.0/R34-EQPT.cs | 31 + .../_Tests/Extract/Production/v2.59.0/R34.cs | 80 + .../Extract/Staging/v2.39.2/DEP08SIASM.cs | 90 + .../Extract/Staging/v2.39.2/R34-EQPT.cs | 35 + .../_Tests/Extract/Staging/v2.39.2/R34.cs | 48 + .../Extract/Staging/v2.39.2/R36-EQPT.cs | 29 + .../_Tests/Extract/Staging/v2.39.2/R36.cs | 29 + .../Extract/Staging/v2.43.0/DEP08SIASM.cs | 83 + .../Extract/Staging/v2.43.0/R34-EQPT.cs | 35 + .../_Tests/Extract/Staging/v2.43.0/R34.cs | 71 + .../Extract/Staging/v2.43.0/R36-EQPT.cs | 29 + .../_Tests/Extract/Staging/v2.43.0/R36.cs | 29 + .../Extract/Staging/v2.56.0/DEP08SIASM.cs | 63 + .../Extract/Staging/v2.56.0/R34-EQPT.cs | 31 + .../_Tests/Extract/Staging/v2.56.0/R34.cs | 69 + .../Extract/Staging/v2.57.0/DEP08SIASM.cs | 83 + .../Extract/Staging/v2.57.0/R34-EQPT.cs | 31 + .../_Tests/Extract/Staging/v2.57.0/R34.cs | 71 + Adaptation/_Tests/Shared/AdaptationTesting.cs | 1287 +++++++ .../_Tests/Shared/EAFLoggingUnitTesting.cs | 28 + Adaptation/_Tests/Shared/IsEnvironment.cs | 168 + Adaptation/_Tests/Shared/Log/ConsoleLogger.cs | 36 + .../_Tests/Shared/Log/ConsoleProvider.cs | 27 + Adaptation/_Tests/Shared/Log/DebugLogger.cs | 36 + Adaptation/_Tests/Shared/Log/DebugProvider.cs | 27 + .../_Tests/Shared/Log/FeedbackLogger.cs | 49 + .../_Tests/Shared/Log/FeedbackProvider.cs | 29 + Adaptation/_Tests/Shared/Log/IFeedback.cs | 11 + Adaptation/_Tests/Shared/Log/Log.cs | 139 + .../_Tests/Shared/LoggingUnitTesting.cs | 112 + Adaptation/_Tests/Shared/MethodBaseName.cs | 45 + .../EAF XML API/CellInstance.cs | 3058 +++++++++++++++++ .../EAF XML API/ConfigurationData.cs | 23 + .../EAF XML API/EquipmentDictionary.cs | 1302 +++++++ .../EAF XML API/EquipmentType.cs | 964 ++++++ Adaptation/_Tests/Shared/UnitTesting.cs | 100 + Adaptation/_Tests/Static/DEP08SIASM.cs | 104 + Adaptation/_Tests/Static/EAF.cs | 210 ++ Adaptation/_Tests/Static/jpeg.cs | 131 + Adaptation/_Tests/Static/xml.cs | 68 + Adaptation/appsettings.Development.json | 139 + Adaptation/appsettings.json | 139 + Adaptation/package.json | 17 + Adaptation/tessdata/pdf.ttf | Bin 0 -> 572 bytes DEP08SIASM.csproj | 172 + FileHandlers/FileRead.cs | 355 ++ Properties/AssemblyInfo.cs | 36 + README.md | 26 +- Shared/FilePathGenerator.cs | 20 + Shared/FilePathGeneratorInfo.cs | 63 + Shared/Mapper.cs | 74 + 170 files changed, 17870 insertions(+), 14 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 Adaptation/.config/dotnet-tools.json create mode 100644 Adaptation/.editorconfig create mode 100644 Adaptation/.vscode/extensions.json create mode 100644 Adaptation/.vscode/format-report.json create mode 100644 Adaptation/.vscode/launch.json create mode 100644 Adaptation/.vscode/mklink.md create mode 100644 Adaptation/.vscode/settings.json create mode 100644 Adaptation/.vscode/tasks.json create mode 100644 Adaptation/DEP08SIASM-Development.yml create mode 100644 Adaptation/DEP08SIASM.Tests.csproj create mode 100644 Adaptation/DEP08SIASM.yml create mode 100644 Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs create mode 100644 Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs create mode 100644 Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs create mode 100644 Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs create mode 100644 Adaptation/Eaf/Core/Backbone.cs create mode 100644 Adaptation/Eaf/Core/Smtp/EmailMessage.cs create mode 100644 Adaptation/Eaf/Core/Smtp/ISmtp.cs create mode 100644 Adaptation/Eaf/Core/Smtp/MailPriority.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs create mode 100644 Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs create mode 100644 Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs create mode 100644 Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs create mode 100644 Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs create mode 100644 Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs create mode 100644 Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs create mode 100644 Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs create mode 100644 Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs create mode 100644 Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs create mode 100644 Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs create mode 100644 Adaptation/FileHandlers/CellInstanceConnectionName.cs create mode 100644 Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs create mode 100644 Adaptation/FileHandlers/MonitorApplication/FileRead.cs create mode 100644 Adaptation/FileHandlers/OpenInsight/CommonGatewayInterface.cs create mode 100644 Adaptation/FileHandlers/OpenInsight/FileRead.cs create mode 100644 Adaptation/FileHandlers/jpeg/Description.cs create mode 100644 Adaptation/FileHandlers/jpeg/FileRead.cs create mode 100644 Adaptation/FileHandlers/jpeg/ProcessData.cs create mode 100644 Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs create mode 100644 Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs create mode 100644 Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs create mode 100644 Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs create mode 100644 Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs create mode 100644 Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs create mode 100644 Adaptation/Infineon/Monitoring/MonA/IMonIn.cs create mode 100644 Adaptation/Infineon/Monitoring/MonA/MonIn.cs create mode 100644 Adaptation/Infineon/Monitoring/MonA/State.cs create mode 100644 Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs create mode 100644 Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs create mode 100644 Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs create mode 100644 Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs create mode 100644 Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs create mode 100644 Adaptation/Shared/Duplicator/Description.cs create mode 100644 Adaptation/Shared/FileRead.cs create mode 100644 Adaptation/Shared/Logistics.cs create mode 100644 Adaptation/Shared/Logistics2.cs create mode 100644 Adaptation/Shared/Methods/IDescription.cs create mode 100644 Adaptation/Shared/Methods/IFileRead.cs create mode 100644 Adaptation/Shared/Methods/ILogistics.cs create mode 100644 Adaptation/Shared/Methods/ILogistics2.cs create mode 100644 Adaptation/Shared/Methods/IProcessData.cs create mode 100644 Adaptation/Shared/Methods/ISMTP.cs create mode 100644 Adaptation/Shared/Metrology/ScopeInfo.cs create mode 100644 Adaptation/Shared/Metrology/WS.Attachment.cs create mode 100644 Adaptation/Shared/Metrology/WS.Results.cs create mode 100644 Adaptation/Shared/Metrology/WS.cs create mode 100644 Adaptation/Shared/ParameterType.cs create mode 100644 Adaptation/Shared/ProcessDataStandardFormat.cs create mode 100644 Adaptation/Shared/Properties/IDescription.cs create mode 100644 Adaptation/Shared/Properties/IFileRead.cs create mode 100644 Adaptation/Shared/Properties/ILogistics.cs create mode 100644 Adaptation/Shared/Properties/ILogistics2.cs create mode 100644 Adaptation/Shared/Properties/IProcessData.cs create mode 100644 Adaptation/Shared/Properties/IScopeInfo.cs create mode 100644 Adaptation/Shared/Test.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36-EQPT.cs create mode 100644 Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.59.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.59.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.59.0/R34.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.2/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.2/R34-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.2/R34.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.2/R36-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.39.2/R36.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.57.0/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.57.0/R34-EQPT.cs create mode 100644 Adaptation/_Tests/Extract/Staging/v2.57.0/R34.cs create mode 100644 Adaptation/_Tests/Shared/AdaptationTesting.cs create mode 100644 Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs create mode 100644 Adaptation/_Tests/Shared/IsEnvironment.cs create mode 100644 Adaptation/_Tests/Shared/Log/ConsoleLogger.cs create mode 100644 Adaptation/_Tests/Shared/Log/ConsoleProvider.cs create mode 100644 Adaptation/_Tests/Shared/Log/DebugLogger.cs create mode 100644 Adaptation/_Tests/Shared/Log/DebugProvider.cs create mode 100644 Adaptation/_Tests/Shared/Log/FeedbackLogger.cs create mode 100644 Adaptation/_Tests/Shared/Log/FeedbackProvider.cs create mode 100644 Adaptation/_Tests/Shared/Log/IFeedback.cs create mode 100644 Adaptation/_Tests/Shared/Log/Log.cs create mode 100644 Adaptation/_Tests/Shared/LoggingUnitTesting.cs create mode 100644 Adaptation/_Tests/Shared/MethodBaseName.cs create mode 100644 Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs create mode 100644 Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs create mode 100644 Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs create mode 100644 Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs create mode 100644 Adaptation/_Tests/Shared/UnitTesting.cs create mode 100644 Adaptation/_Tests/Static/DEP08SIASM.cs create mode 100644 Adaptation/_Tests/Static/EAF.cs create mode 100644 Adaptation/_Tests/Static/jpeg.cs create mode 100644 Adaptation/_Tests/Static/xml.cs create mode 100644 Adaptation/appsettings.Development.json create mode 100644 Adaptation/appsettings.json create mode 100644 Adaptation/package.json create mode 100644 Adaptation/tessdata/pdf.ttf create mode 100644 DEP08SIASM.csproj create mode 100644 FileHandlers/FileRead.cs create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Shared/FilePathGenerator.cs create mode 100644 Shared/FilePathGeneratorInfo.cs create mode 100644 Shared/Mapper.cs diff --git a/.gitignore b/.gitignore index 3e759b7..cab8a8d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ x86/ bld/ [Bb]in/ [Oo]bj/ -[Ll]og/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -328,3 +327,21 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ + +## +## Visual Studio Code +## +**/.vscode/* +!**/.vscode/extensions.json +!**/.vscode/format-report.json +!**/.vscode/launch.json +!**/.vscode/settings.json +!**/.vscode/tasks.json +!**/.vscode/mklink.md + +*.lnk + +.kanbn +Adaptation/.kanbn + +*.traineddata \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..71cf24f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,55 @@ +{ + "files.eol": "\n", + "[markdown]": { + "editor.wordWrap": "off" + }, + "cSpell.words": [ + "PDSF", + "Syncthing" + ], + "files.exclude": { + "**/node_modules": true + }, + "files.watcherExclude": { + "**/node_modules": true + }, + "foam.files.ignore": [ + ".foam/**/*", + ".stfolder/**/*", + "**/_layouts/**/*", + "**/_site/**/*", + "**/.vscode/**/*", + "**/node_modules/**/*" + ], + "kanbn.showBurndownButton": false, + "kanbn.showSprintButton": false, + "foam.links.hover.enable": false, + "foam.placeholders.exclude": [ + ".kanbn/Archive/**/*" + ], + "foam.orphans.exclude": [ + ".journal/**/*" + ], + "foam.graph.style": { + "background": "#202020", + "node": { + "wired": "green", + "wireless": "orange", + "person": "white", + "topic": "#bc2a3c", + "kanbn": "#ff7b00", + "basic-note": "#773b93", + "daily-note": "#ff9d00", + "note": "#f2cb1d", + "placeholder": "#ff9d00", + "tag": "#0494c1", + "bug": "#bc2a3c", + "epic": "#ff7b00", + "feature": "#773b93", + "issue": "#ff9d00", + "task": "#f2cb1d", + "test-case": "#ff9d00", + "user-story": "#0494c1" + } + } +} \ No newline at end of file diff --git a/Adaptation/.config/dotnet-tools.json b/Adaptation/.config/dotnet-tools.json new file mode 100644 index 0000000..cd368e1 --- /dev/null +++ b/Adaptation/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-reportgenerator-globaltool": { + "version": "5.1.15", + "commands": [ + "reportgenerator" + ] + } + } +} \ No newline at end of file diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig new file mode 100644 index 0000000..69ecc38 --- /dev/null +++ b/Adaptation/.editorconfig @@ -0,0 +1,281 @@ +[*.md] +end_of_line = crlf +file_header_template = unset +indent_size = 2 +indent_style = space +insert_final_newline = false +root = true +tab_width = 2 +[*.csproj] +end_of_line = crlf +file_header_template = unset +indent_size = 2 +indent_style = space +insert_final_newline = false +root = true +tab_width = 2 +[*.cs] +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true +csharp_prefer_braces = false +csharp_prefer_simple_default_expression = true:warning +csharp_prefer_simple_using_statement = true:warning +csharp_prefer_static_local_function = true:warning +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = false +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true +csharp_style_allow_embedded_statements_on_same_line_experimental = true +csharp_style_conditional_delegate_call = true +csharp_style_deconstructed_variable_declaration = false +csharp_style_expression_bodied_accessors = when_on_single_line:warning +csharp_style_expression_bodied_constructors = when_on_single_line:warning +csharp_style_expression_bodied_indexers = when_on_single_line:warning +csharp_style_expression_bodied_lambdas = when_on_single_line:warning +csharp_style_expression_bodied_local_functions = when_on_single_line:warning +csharp_style_expression_bodied_methods = when_on_single_line:warning +csharp_style_expression_bodied_operators = when_on_single_line:warning +csharp_style_expression_bodied_properties = when_on_single_line:warning +csharp_style_implicit_object_creation_when_type_is_apparent = true:warning +csharp_style_inlined_variable_declaration = false +csharp_style_namespace_declarations = file_scoped:warning +csharp_style_pattern_local_over_anonymous_function = true:warning +csharp_style_pattern_matching_over_as_with_null_check = true:warning +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_prefer_index_operator = false:warning +csharp_style_prefer_not_pattern = true:warning +csharp_style_prefer_null_check_over_type_check = true +csharp_style_prefer_pattern_matching = true:warning +csharp_style_prefer_range_operator = false:warning +csharp_style_prefer_switch_expression = true:warning +csharp_style_throw_expression = true +csharp_style_unused_value_assignment_preference = discard_variable:warning +csharp_style_unused_value_expression_statement_preference = discard_variable:warning +csharp_style_var_elsewhere = false:warning +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = false:warning +csharp_using_directive_placement = outside_namespace +dotnet_code_quality_unused_parameters = all +dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter +dotnet_code_quality.CAXXXX.api_surface = private, internal +dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly +dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations +dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available +dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable +dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring +dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters +dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup +dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance +dotnet_diagnostic.CA1861.severity = none # CA1861: Prefer 'static readonly' fields over constant array arguments +dotnet_diagnostic.CA1862.severity = none # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase' +dotnet_diagnostic.CA1864.severity = none # CA1864: To avoid double lookup, call 'TryAdd' instead of calling 'Add' with a 'ContainsKey' guard +dotnet_diagnostic.CA1866.severity = none # CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char +dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead. +dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])' +dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name +dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); +dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. +dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary +dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified +dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031) +dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed +dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049) +dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter +dotnet_diagnostic.IDE0200.severity = warning # IDE0200: Lambda expression can be removed +dotnet_diagnostic.IDE0270.severity = none # IDE0270: Null check can be simplified +dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290) +dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified +dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified +dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified +dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation +dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning +dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method +dotnet_naming_rule.class_should_be_pascal_case.severity = warning +dotnet_naming_rule.class_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.class_should_be_pascal_case.symbols = class +dotnet_naming_rule.delegate_should_be_pascal_case.severity = warning +dotnet_naming_rule.delegate_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.delegate_should_be_pascal_case.symbols = delegate +dotnet_naming_rule.enum_should_be_pascal_case.severity = warning +dotnet_naming_rule.enum_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.enum_should_be_pascal_case.symbols = enum +dotnet_naming_rule.event_should_be_pascal_case.severity = warning +dotnet_naming_rule.event_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.event_should_be_pascal_case.symbols = event +dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.method_should_be_pascal_case.severity = warning +dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.method_should_be_pascal_case.symbols = method +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.private_method_should_be_pascal_case.severity = warning +dotnet_naming_rule.private_method_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.private_method_should_be_pascal_case.symbols = private_method +dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.severity = warning +dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.style = private_of_internal_field +dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.symbols = private_or_internal_field +dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.severity = warning +dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.style = private_of_internal_field +dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.symbols = private_or_internal_static_field +dotnet_naming_rule.property_should_be_pascal_case.severity = warning +dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.property_should_be_pascal_case.symbols = property +dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.severity = warning +dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.style = private_of_internal_field +dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.symbols = public_or_protected_field +dotnet_naming_rule.static_field_should_be_pascal_case.severity = warning +dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field +dotnet_naming_rule.static_method_should_be_pascal_case.severity = warning +dotnet_naming_rule.static_method_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.static_method_should_be_pascal_case.symbols = static_method +dotnet_naming_rule.struct_should_be_pascal_case.severity = warning +dotnet_naming_rule.struct_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.struct_should_be_pascal_case.symbols = struct +dotnet_naming_rule.types_should_be_pascal_case.severity = warning +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_style.begins_with_i.capitalization = pascal_case +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.private_of_internal_field.capitalization = pascal_case +dotnet_naming_style.private_of_internal_field.required_prefix = _ +dotnet_naming_style.private_of_internal_field.required_suffix = +dotnet_naming_style.private_of_internal_field.word_separator = +dotnet_naming_symbols.abstract_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.abstract_method.applicable_kinds = method +dotnet_naming_symbols.abstract_method.required_modifiers = abstract +dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.class.applicable_kinds = class +dotnet_naming_symbols.class.required_modifiers = +dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.delegate.applicable_kinds = delegate +dotnet_naming_symbols.delegate.required_modifiers = +dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.enum.applicable_kinds = enum +dotnet_naming_symbols.enum.required_modifiers = +dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.event.applicable_kinds = event +dotnet_naming_symbols.event.required_modifiers = +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.required_modifiers = +dotnet_naming_symbols.method.applicable_accessibilities = public +dotnet_naming_symbols.method.applicable_kinds = method +dotnet_naming_symbols.method.required_modifiers = +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.required_modifiers = +dotnet_naming_symbols.private_method.applicable_accessibilities = private +dotnet_naming_symbols.private_method.applicable_kinds = method +dotnet_naming_symbols.private_method.required_modifiers = +dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected +dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field +dotnet_naming_symbols.private_or_internal_field.required_modifiers = +dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected +dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field +dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static +dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.property.applicable_kinds = property +dotnet_naming_symbols.property.required_modifiers = +dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected +dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field +dotnet_naming_symbols.public_or_protected_field.required_modifiers = +dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.static_field.applicable_kinds = field +dotnet_naming_symbols.static_field.required_modifiers = static +dotnet_naming_symbols.static_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.static_method.applicable_kinds = method +dotnet_naming_symbols.static_method.required_modifiers = static +dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.struct.applicable_kinds = struct +dotnet_naming_symbols.struct.required_modifiers = +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.required_modifiers = +dotnet_remove_unnecessary_suppression_exclusions = 0 +dotnet_separate_import_directive_groups = false +dotnet_sort_system_directives_first = false +dotnet_style_allow_multiple_blank_lines_experimental = false:warning +dotnet_style_allow_statement_immediately_after_block_experimental = true +dotnet_style_coalesce_expression = true +dotnet_style_collection_initializer = true:warning +dotnet_style_explicit_tuple_names = true:warning +dotnet_style_namespace_match_folder = true +dotnet_style_null_propagation = true:warning +dotnet_style_object_initializer = true:warning +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity +dotnet_style_parentheses_in_other_operators = never_if_unnecessary +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity +dotnet_style_predefined_type_for_locals_parameters_members = true +dotnet_style_predefined_type_for_member_access = true:warning +dotnet_style_prefer_auto_properties = true:warning +dotnet_style_prefer_compound_assignment = true:warning +dotnet_style_prefer_conditional_expression_over_assignment = false +dotnet_style_prefer_conditional_expression_over_return = false +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_simplified_boolean_expressions = true:warning +dotnet_style_prefer_simplified_interpolation = true +dotnet_style_qualification_for_event = false:error +dotnet_style_qualification_for_field = false +dotnet_style_qualification_for_method = false:error +dotnet_style_qualification_for_property = false:error +dotnet_style_readonly_field = true:warning +dotnet_style_require_accessibility_modifiers = for_non_interface_members +end_of_line = crlf +file_header_template = unset +indent_size = 4 +indent_style = space +insert_final_newline = false +root = true +tab_width = 4 +# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 +# https://github.com/dotnet/aspnetcore/blob/main/.editorconfig +# https://github.com/dotnet/project-system/blob/main/.editorconfig \ No newline at end of file diff --git a/Adaptation/.vscode/extensions.json b/Adaptation/.vscode/extensions.json new file mode 100644 index 0000000..26a6234 --- /dev/null +++ b/Adaptation/.vscode/extensions.json @@ -0,0 +1,46 @@ +{ + "recommendations": [ + "adrianwilczynski.asp-net-core-switcher", + "adrianwilczynski.namespace", + "adrianwilczynski.terminal-commands", + "aliasadidev.nugetpackagemanagergui", + "bodil.file-browser", + "codezombiech.gitignore", + "cweijan.vscode-office", + "donjayamanne.githistory", + "EditorConfig.EditorConfig", + "eg2.vscode-npm-script", + "esbenp.prettier-vscode", + "formulahendry.dotnet-test-explorer", + "GitHub.remotehub", + "GitHub.vscode-pull-request-github", + "hashhar.gitattributes", + "hediet.vscode-drawio", + "mikeburgh.xml-format", + "ms-dotnettools.blazorwasm-companion", + "ms-dotnettools.csharp", + "ms-dotnettools.vscode-dotnet-runtime", + "ms-edgedevtools.vscode-edge-devtools", + "ms-vscode-remote.remote-ssh", + "ms-vscode-remote.remote-ssh-edit", + "ms-vscode.powershell", + "patcx.vscode-nuget-gallery", + "rangav.vscode-thunder-client", + "streetsidesoftware.code-spell-checker", + "VirtusLab.codetale", + "VisualStudioExptTeam.vscodeintellicode", + "vscode-icons-team.vscode-icons" + ], + "unwantedRecommendations": [ + "virtuslab.codetale", + "ms-azuretools.vscode-docker", + "christian-kohler.npm-intellisense", + "firefox-devtools.vscode-firefox-debug", + "dbaeumer.vscode-eslint", + "dbaeumer.jshint", + "felipecaputo.git-project-manager", + "eamodio.gitlens", + "hookyqr.beautify", + "davidanson.vscode-markdownlint" + ] +} \ No newline at end of file diff --git a/Adaptation/.vscode/format-report.json b/Adaptation/.vscode/format-report.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/Adaptation/.vscode/format-report.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json new file mode 100644 index 0000000..ff26980 --- /dev/null +++ b/Adaptation/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "configurations": [ + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": 8084 + } + ] +} diff --git a/Adaptation/.vscode/mklink.md b/Adaptation/.vscode/mklink.md new file mode 100644 index 0000000..5803c6e --- /dev/null +++ b/Adaptation/.vscode/mklink.md @@ -0,0 +1,5 @@ +# mklink + +```bash +mklink /J "T:\DEP08SIHTRPLC\06_SourceCode\DEP08SIHTRPLC\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\DEP08SIHTRPLC" +``` diff --git a/Adaptation/.vscode/settings.json b/Adaptation/.vscode/settings.json new file mode 100644 index 0000000..ea870fc --- /dev/null +++ b/Adaptation/.vscode/settings.json @@ -0,0 +1,81 @@ +{ + "[markdown]": { + "editor.wordWrap": "off" + }, + "cSpell.words": [ + "Analyte", + "CICN", + "EGANAIXG", + "ELODS", + "EQPT", + "etcs", + "GRATXT", + "grpf", + "Hmmssfff", + "hvfet", + "Icpms", + "IPDSF", + "Irmn", + "IRMNSPC", + "ISMTP", + "ISNULL", + "JOBID", + "JVXRD", + "Klarf", + "Lehighton", + "Lian", + "messa", + "milli", + "mvfet", + "MVIN", + "PDSF", + "pdsfc", + "PPID", + "pptst", + "reactno", + "RPMPL", + "RPMXY", + "rtsp", + "RUNMO", + "SIASM", + "statusdtm", + "stddev", + "Stks", + "SUMMO", + "Tesseract", + "TIBCO", + "TMAL", + "TMGA", + "TXTAPC", + "TXTIQS", + "Villach", + "XRDAI", + "XRDFWHM", + "XRDSL", + "XRDXRR", + "XRDXY" + ], + "coverage-gutters.coverageBaseDir": "../../../../DEP08SIASM/05_TestResults/TestResults/**", + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#7ea1d9", + "activityBar.activeBorder": "#f8e6ed", + "activityBar.background": "#7ea1d9", + "activityBar.foreground": "#15202b", + "activityBar.inactiveForeground": "#15202b99", + "activityBarBadge.background": "#f8e6ed", + "activityBarBadge.foreground": "#15202b", + "sash.hoverBorder": "#7ea1d9", + "statusBar.background": "#5684ce", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#7ea1d9", + "statusBarItem.remoteBackground": "#5684ce", + "statusBarItem.remoteForeground": "#e7e7e7", + "titleBar.activeBackground": "#5684ce", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#5684ce99", + "titleBar.inactiveForeground": "#e7e7e799", + "commandCenter.border": "#e7e7e799" + }, + "peacock.color": "#5684ce", + "cSpell.enabled": false +} \ No newline at end of file diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json new file mode 100644 index 0000000..0d26306 --- /dev/null +++ b/Adaptation/.vscode/tasks.json @@ -0,0 +1,110 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Test-Debug", + "command": "dotnet", + "type": "process", + "args": [ + "test", + "-c", + "Debug" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Test-Release", + "command": "dotnet", + "type": "process", + "args": [ + "test", + "-c", + "Release" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Format", + "command": "dotnet", + "type": "process", + "args": [ + "format", + "--report", + ".vscode", + "--verbosity", + "detailed", + "--severity", + "warn" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Nuget Clear", + "command": "dotnet", + "type": "process", + "args": [ + "nuget", + "locals", + "all", + "--clear" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for EAF Deployment Packages", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "../DEP08SIASM.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "Project", + "type": "shell", + "command": "code ../DEP08SIASM.csproj", + "problemMatcher": [] + }, + { + "label": "Git Config", + "type": "shell", + "command": "code ../.git/config", + "problemMatcher": [] + }, + { + "label": "Kanbn Console", + "type": "npm", + "script": "kanbn.board", + "problemMatcher": [] + }, + { + "label": "Kanbn Write Boad", + "type": "shell", + "command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md", + "problemMatcher": [] + }, + { + "label": "Kanbn Write json", + "type": "npm", + "script": "kanbn.board.json", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/Adaptation/DEP08SIASM-Development.yml b/Adaptation/DEP08SIASM-Development.yml new file mode 100644 index 0000000..4d6a3b4 --- /dev/null +++ b/Adaptation/DEP08SIASM-Development.yml @@ -0,0 +1 @@ +ECHO is on. diff --git a/Adaptation/DEP08SIASM.Tests.csproj b/Adaptation/DEP08SIASM.Tests.csproj new file mode 100644 index 0000000..f6584b6 --- /dev/null +++ b/Adaptation/DEP08SIASM.Tests.csproj @@ -0,0 +1,95 @@ + + + SAK + SAK + SAK + SAK + + + disable + false + disable + win-x64 + net8.0 + + + trx + XPlat Code Coverage + ../../../../DEP08SIASM/05_TestResults/TestResults + + + true + true + true + + + Windows + + + OSX + + + Linux + + + + + + + + NU1701 + NU1701 + NU1701 + NU1701 + NU1701 + NU1701 + NU1701 + + + + + + + + + + + + + + + + + NU1701 + + + + + + + + + NU1701 + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + \ No newline at end of file diff --git a/Adaptation/DEP08SIASM.yml b/Adaptation/DEP08SIASM.yml new file mode 100644 index 0000000..4d6a3b4 --- /dev/null +++ b/Adaptation/DEP08SIASM.yml @@ -0,0 +1 @@ +ECHO is on. diff --git a/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs b/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs new file mode 100644 index 0000000..06ec233 --- /dev/null +++ b/Adaptation/Eaf/Core/AutoGenerated/BackboneComponent.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.Core; + +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 new file mode 100644 index 0000000..69d3b7a --- /dev/null +++ b/Adaptation/Eaf/Core/AutoGenerated/BackboneStatusCache.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.Core; + +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 new file mode 100644 index 0000000..62e12d8 --- /dev/null +++ b/Adaptation/Eaf/Core/AutoGenerated/ILoggingSetupManager.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.Core; + +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 new file mode 100644 index 0000000..f981297 --- /dev/null +++ b/Adaptation/Eaf/Core/AutoGenerated/StatusItem.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.Core; + +public class StatusItem +{ +} \ No newline at end of file diff --git a/Adaptation/Eaf/Core/Backbone.cs b/Adaptation/Eaf/Core/Backbone.cs new file mode 100644 index 0000000..f39f081 --- /dev/null +++ b/Adaptation/Eaf/Core/Backbone.cs @@ -0,0 +1,53 @@ +using Adaptation.PeerGroup.GCL.Annotations; +using System; +using System.Collections.Generic; + +namespace Adaptation.Eaf.Core; + +public class Backbone +{ + +#pragma warning disable CA1822 +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + public const string STATE_ERROR = "Error"; + public const string STATE_OFFLINE = "Offline"; + public const string STATE_RUNNING = "Running"; + public const string STATE_SHUTDOWN = "Shutting Down"; + public const string STATE_STARTING = "Starting"; + + 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; } + + 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 new file mode 100644 index 0000000..90163d6 --- /dev/null +++ b/Adaptation/Eaf/Core/Smtp/EmailMessage.cs @@ -0,0 +1,24 @@ +using System; + +namespace Adaptation.Eaf.Core.Smtp; + +public class EmailMessage +{ + +#pragma warning disable IDE0060 + + 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 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 new file mode 100644 index 0000000..0446065 --- /dev/null +++ b/Adaptation/Eaf/Core/Smtp/ISmtp.cs @@ -0,0 +1,6 @@ +namespace Adaptation.Eaf.Core.Smtp; + +public interface ISmtp +{ + 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 new file mode 100644 index 0000000..b59d146 --- /dev/null +++ b/Adaptation/Eaf/Core/Smtp/MailPriority.cs @@ -0,0 +1,8 @@ +namespace Adaptation.Eaf.Core.Smtp; + +public enum MailPriority +{ + 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 new file mode 100644 index 0000000..80e911e --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ChangeDataCollectionHandler.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..d49c557 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/DataCollectionRequest.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..9d45cb1 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentEvent.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..c0cf1c3 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentException.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..92d7722 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/EquipmentSelfDescription.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..dca26fc --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/GetParameterValuesHandler.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..7481501 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IConnectionControl.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..cf0602a --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IDataTracingHandler.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..9f6000e --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentCommandService.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..8b4f8d1 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentControl.cs @@ -0,0 +1,15 @@ +using Adaptation.PeerGroup.GCL.Annotations; + +namespace Adaptation.Eaf.EquipmentCore.Control; + +public interface IEquipmentControl : IPackageSource +{ + [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 new file mode 100644 index 0000000..f34413f --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IEquipmentSelfDescriptionBuilder.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..eef26c3 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IPackage.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..be924e9 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/ISelfDescriptionLookup.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..e7a76fc --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/IVirtualParameterValuesHandler.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..2615f40 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/SetParameterValuesHandler.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..8d26e7b --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/AutoGenerated/TraceRequest.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..d0980ee --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/IEquipmentDataCollection.cs @@ -0,0 +1,38 @@ +using Adaptation.Eaf.EquipmentCore.DataCollection.Reporting; +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; } + + 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 new file mode 100644 index 0000000..86760aa --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/Control/IPackageSource.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.EquipmentCore.Control; + +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 new file mode 100644 index 0000000..864fa32 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/DataCollection/Reporting/ParameterValue.cs @@ -0,0 +1,23 @@ +using Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription; +using Adaptation.PeerGroup.GCL.Annotations; +using System; + +namespace Adaptation.Eaf.EquipmentCore.DataCollection.Reporting; + +public class ParameterValue +{ + +#pragma warning disable IDE0060 + + 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 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 new file mode 100644 index 0000000..3a3a0e2 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ElementDescription/EquipmentParameter.cs @@ -0,0 +1,26 @@ +using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ElementDescription; + +public class EquipmentParameter +{ + +#pragma warning disable IDE0060 + + public EquipmentParameter(EquipmentParameter source, ParameterTypeDefinition typeDefinition) { } + public EquipmentParameter(string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { } + public EquipmentParameter(string id, string name, ParameterTypeDefinition typeDefinition, string description, bool isTransient = false, bool isReadOnly = true) { } + + 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 new file mode 100644 index 0000000..baf938a --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/Field.cs @@ -0,0 +1,15 @@ +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +public class Field +{ + +#pragma warning disable IDE0060 + + public Field(string name, string description, bool canBeNull, ParameterTypeDefinition typeDefinition) { } + + public string Name { get; } + public string Description { get; } + public ParameterTypeDefinition TypeDefinition { get; } + public bool CanBeNull { get; } + +} \ No newline at end of file diff --git a/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs new file mode 100644 index 0000000..6037e47 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/ParameterTypeDefinition.cs @@ -0,0 +1,15 @@ +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +public abstract class ParameterTypeDefinition +{ + +#pragma warning disable IDE0060 + + public ParameterTypeDefinition(string name, string description) { } + + public string Name { get; } + public string Description { get; } + + 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 new file mode 100644 index 0000000..b808fc9 --- /dev/null +++ b/Adaptation/Eaf/EquipmentCore/SelfDescription/ParameterTypes/StructuredType.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; + +public class StructuredType : ParameterTypeDefinition +{ + +#pragma warning disable IDE0060 + + public StructuredType(string name, string description, IList fields) : base(name, description) { } + + 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 new file mode 100644 index 0000000..70ef834 --- /dev/null +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/IConfigurationObject.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +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 new file mode 100644 index 0000000..5742acc --- /dev/null +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterDefinition.cs @@ -0,0 +1,29 @@ +using System; + +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +[System.Runtime.Serialization.DataContract(IsReference = true)] +public class ModelObjectParameterDefinition : IConfigurationObject +{ + +#pragma warning disable IDE0060 + + public ModelObjectParameterDefinition() { } + public ModelObjectParameterDefinition(string name, ModelObjectParameterType valueType, object defaultValue) { } + public ModelObjectParameterDefinition(string name, Type enumType, object defaultValue) { } + + [System.Runtime.Serialization.DataMember] + public virtual long Id { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual string Name { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual string Value { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual ModelObjectParameterType ValueType { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual string EnumType { get; set; } + + 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 new file mode 100644 index 0000000..c5a85c2 --- /dev/null +++ b/Adaptation/Eaf/Management/ConfigurationData/CellAutomation/ModelObjectParameterType.cs @@ -0,0 +1,16 @@ +namespace Adaptation.Eaf.Management.ConfigurationData.CellAutomation; + +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 +} \ 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 new file mode 100644 index 0000000..b8c1bd3 --- /dev/null +++ b/Adaptation/Eaf/Management/ConfigurationData/Semiconductor/CellInstances/SecsConnectionConfiguration.cs @@ -0,0 +1,43 @@ +using Adaptation.PeerGroup.GCL.SecsDriver; +using System; + +namespace Adaptation.Eaf.Management.ConfigurationData.Semiconductor.CellInstances; + +[System.Runtime.Serialization.DataContract] +public class SecsConnectionConfiguration +{ + public SecsConnectionConfiguration() { } + + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T6HsmsControlMessage { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T5ConnectionSeperation { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T4InterBlock { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T3MessageReply { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T2Protocol { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T1InterCharacter { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual SerialBaudRate? BaudRate { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual SecsTransportType? PortType { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? Port { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan LinkTestTimer { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual string Host { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? DeviceId { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual HsmsSessionMode? SessionMode { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual HsmsConnectionMode? ConnectionMode { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T7ConnectionIdle { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual TimeSpan T8NetworkIntercharacter { get; set; } +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs new file mode 100644 index 0000000..f020ba1 --- /dev/null +++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs @@ -0,0 +1,25 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; + +namespace Adaptation.FileHandlers; + +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, Dictionary> staticRuns, bool useCyclicalForDescription, int? connectionCount) + { + IFileRead result = cellInstanceConnectionName switch + { + nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null), + _ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped") + }; + return result; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs b/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs new file mode 100644 index 0000000..b8608c1 --- /dev/null +++ b/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs @@ -0,0 +1,168 @@ +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 FFMpegCore; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text.Json; +using System.Threading; + +namespace Adaptation.FileHandlers.DownloadJpegFile; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private readonly Timer _Timer; + private readonly string _FFmpegFileName; + private readonly string _StaticFileServer; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _StaticFileServer = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".StaticFileServer")); + string ffmpegFileName = Path.Combine(AppContext.BaseDirectory, "ffmpeg.dll"); + _FFmpegFileName = Path.Combine(AppContext.BaseDirectory, "ffmpeg.exe"); + if (File.Exists(ffmpegFileName) && !File.Exists(_FFmpegFileName)) + File.Copy(ffmpegFileName, _FFmpegFileName); + if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process) + _Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite); + else + { + _Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite); + Callback(null); + } + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults); + + 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; + } + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback))); + + private void DownloadJpegFileSynchronously() + { + if (string.IsNullOrEmpty(_StaticFileServer)) + throw new Exception(); + string fileName = $"{_CellInstanceName}_{DateTime.Now.Ticks}{_FileConnectorConfiguration.TargetFileName}"; + string destFileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, fileName); + string sourceFileName = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, fileName); + Uri uri = new(string.Concat("rtsp://", _StaticFileServer, '/', _FileConnectorConfiguration.SourceDirectoryCloaking)); + if (!File.Exists(_FFmpegFileName)) + File.WriteAllText(Path.ChangeExtension(destFileName, ".err"), $"<{_FFmpegFileName}> doesn't exits!"); + else + { + FFMpegArguments fFMpegArguments = FFMpegArguments.FromUrlInput(uri, arg => arg.WithCustomArgument("-timeout 1")); + FFMpegArgumentProcessor fFMpegArgumentProcessor = fFMpegArguments.OutputToFile(sourceFileName, true, arg => arg.WithCustomArgument("-frames:v 1")); + bool check = fFMpegArgumentProcessor.ProcessSynchronously(throwOnError: true); + if (check) + File.Move(sourceFileName, destFileName); + else + File.WriteAllText(Path.ChangeExtension(destFileName, ".err"), check.ToString()); + } + } + + private void Callback(object state) + { + try + { + if (_IsEAFHosted) + DownloadJpegFileSynchronously(); + } + 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/MonitorApplication/FileRead.cs b/Adaptation/FileHandlers/MonitorApplication/FileRead.cs new file mode 100644 index 0000000..2965f4d --- /dev/null +++ b/Adaptation/FileHandlers/MonitorApplication/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 Infineon.Monitoring.MonA; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text.Json; + +namespace Adaptation.FileHandlers.MonitorApplication; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private readonly string _MonitorApplicationSite; + private readonly string _MonitorApplicationResource; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _MonitorApplicationSite = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "MonitorApplication.Site"); + _MonitorApplicationResource = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "MonitorApplication.Resource"); + } + + 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); + } + + 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; + } + + private void SendData(DateTime dateTime, List descriptions) +#pragma warning restore IDE0060 + { + if (dateTime == DateTime.MinValue) + throw new Exception(); + MonIn monIn = MonIn.GetInstance(); + int value = int.TryParse(descriptions[0].Lot, out int check) ? check : 0; + string performanceName = string.Concat(_MonitorApplicationResource, "_", _Logistics.MesEntity); + _ = monIn.SendPerformanceMessage(_MonitorApplicationSite, _MonitorApplicationResource, performanceName, value: value, description: string.Empty); + if (string.IsNullOrEmpty(_MonitorApplicationResource)) // Never! + _ = monIn.SendStatus(_MonitorApplicationSite, _MonitorApplicationResource, "Heartbeat", State.Unknown); + } + + 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 = jpeg.ProcessData.GetDescriptions(jsonElements); + Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); + if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) + SendData(dateTime, descriptions); + results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); + return results; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/OpenInsight/CommonGatewayInterface.cs b/Adaptation/FileHandlers/OpenInsight/CommonGatewayInterface.cs new file mode 100644 index 0000000..b7f3449 --- /dev/null +++ b/Adaptation/FileHandlers/OpenInsight/CommonGatewayInterface.cs @@ -0,0 +1,38 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; + +namespace Adaptation.FileHandlers.OpenInsight; + +public class CommonGatewayInterface +{ + + internal static async void PutReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List descriptions, string logisticsSequenceMemoryDirectory) + { + HttpContent httpContent = null; + string status = descriptions[0].MID; + string reactorNumber = logistics.MesEntity.Substring(1); + string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss"); + string contentFile = Path.Combine(logisticsSequenceMemoryDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt"); + Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}"); + try + { + HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent); + if (httpResponseMessage.StatusCode is not System.Net.HttpStatusCode.OK) + File.WriteAllText(contentFile, "Failed!"); + else + { + string content = await httpResponseMessage.Content.ReadAsStringAsync(); + File.WriteAllText(contentFile, content); + } + } + catch (Exception ex) + { + File.WriteAllText(contentFile, $"{ex.Message}{Environment.NewLine}{ex.StackTrace}{Environment.NewLine}{fileRead.CellInstanceConnectionName}"); + } + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs new file mode 100644 index 0000000..deacbf8 --- /dev/null +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -0,0 +1,145 @@ +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.Net.Http; +using System.Text.Json; + +namespace Adaptation.FileHandlers.OpenInsight; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private readonly string _MemoryPath; + private readonly HttpClient _HttpClient; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) + { + _MinFileLength = 10; + _NullData = string.Empty; + _Logistics = new(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (!_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory"); + _HttpClient = new(); + string openInsightCommonGatewayInterfaceReactorStatesStatus = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.CommonGatewayInterface.ReactorStates.Status"); + _HttpClient.BaseAddress = new(openInsightCommonGatewayInterfaceReactorStatesStatus); + } + + 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); + } + + 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; + } + + private void SendData(DateTime dateTime, List descriptions) +#pragma warning restore IDE0060 + { + if (dateTime == DateTime.MinValue) + throw new Exception(); + string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; + string logisticsSequenceMemoryDirectory = Path.Combine(_MemoryPath, _EquipmentType, "Source", weekDirectory, _Logistics.Sequence.ToString()); + if (!Directory.Exists(logisticsSequenceMemoryDirectory)) + _ = Directory.CreateDirectory(logisticsSequenceMemoryDirectory); + if (_HttpClient is null) + throw new Exception($"{nameof(_HttpClient)} is null!"); + CommonGatewayInterface.PutReactorStatesStatus(this, _Logistics, _HttpClient, descriptions, logisticsSequenceMemoryDirectory); + } + + 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 = jpeg.ProcessData.GetDescriptions(jsonElements); + Test[] tests = (from l in descriptions select (Test)l.Test).ToArray(); + if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0) + SendData(dateTime, descriptions); + results = new Tuple>(pdsf.Item1, tests, jsonElements, new List()); + return results; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/jpeg/Description.cs b/Adaptation/FileHandlers/jpeg/Description.cs new file mode 100644 index 0000000..ec1ef04 --- /dev/null +++ b/Adaptation/FileHandlers/jpeg/Description.cs @@ -0,0 +1,229 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; + +namespace Adaptation.FileHandlers.jpeg; + +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 int Red { get; set; } + public int Green { get; set; } + public int TotalDelta { get; set; } + public string ClosestMatchFileName { get; set; } + + public string RDS { 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; + } + + List IDescription.GetDetailNames() + { + List results = new(); + 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(Red), + nameof(Green), + nameof(TotalDelta), + nameof(ClosestMatchFileName), + }; + 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() + { + string[] results = new string[] { "Test Name", "Test Value" }; + return results.ToList(); + } + + 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.Count == 0 || iProcessData is not ProcessData processData) + results.Add(GetDefault(fileRead, logistics)); + else + { + string nullData; + Description description; + object configDataNullData = fileRead.NullData; + if (configDataNullData is null) + nullData = string.Empty; + else + nullData = configDataNullData.ToString(); + for (int i = 0; i < iProcessData.Details.Count; i++) + { + if (iProcessData.Details[i] is not string _) + 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 = logistics.DateTimeFromSequence.ToUniversalTime().ToString("MM/dd/yyyy HH:mm:ss"), + Employee = string.Empty, + Lot = processData.Text, + PSN = string.Empty, + Reactor = logistics.ProcessJobID, + Recipe = string.Empty, + // + Red = processData.Red, + Green = processData.Green, + TotalDelta = processData.TotalDelta, + ClosestMatchFileName = processData.ClosestMatchFileName, + }; + results.Add(description); + } + } + return results; + } + + private static Description GetDisplayNames() + { + Description result = new(); + return result; + } + + private Description GetDefault(IFileRead fileRead, Logistics logistics) + { + Description result = new() + { + Test = -1, + Count = 0, + Index = -1, + // + EventName = fileRead.EventName, + NullData = fileRead.NullData, + JobID = fileRead.CellInstanceName, + Sequence = logistics.Sequence.ToString(), + MesEntity = fileRead.MesEntity, + ReportFullPath = logistics.ReportFullPath, + ProcessJobID = logistics.ProcessJobID, + MID = logistics.MID, + // + Date = nameof(Date), + Employee = nameof(Employee), + Lot = nameof(Lot), + PSN = nameof(PSN), + Reactor = nameof(Reactor), + Recipe = nameof(Recipe), + // + Red = -1, + Green = -1, + TotalDelta = -1, + ClosestMatchFileName = nameof(ClosestMatchFileName), + }; + return result; + } + + internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/jpeg/FileRead.cs b/Adaptation/FileHandlers/jpeg/FileRead.cs new file mode 100644 index 0000000..937801d --- /dev/null +++ b/Adaptation/FileHandlers/jpeg/FileRead.cs @@ -0,0 +1,216 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text.Json; +using System.Text.RegularExpressions; + +namespace Adaptation.FileHandlers.jpeg; + +public class FileRead : Shared.FileRead, IFileRead +{ + + private long? _TickOffset; + protected long _LastChange; + protected string _LastText; + protected readonly int _EndX; + protected readonly int _EndY; + protected readonly Size _Size; + protected readonly int _StartX; + protected readonly int _StartY; + protected readonly int _OffSetX; + protected readonly int _OffSetY; + protected string _TessDataDirectory; + protected List _PreviousTotalDeltaCollection; + protected readonly Dictionary _Reactors; + protected readonly List> _ColorCollections; + + public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) : + base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null) + { + _MinFileLength = 36790; + _NullData = string.Empty; + _LastText = string.Empty; + _Logistics = new(this); + if (_FileParameter is null) + throw new Exception(cellInstanceConnectionName); + if (_ModelObjectParameterDefinitions is null) + throw new Exception(cellInstanceConnectionName); + if (_IsDuplicator) + throw new Exception(cellInstanceConnectionName); + _LastChange = DateTime.Now.AddDays(-1).Ticks; + _Reactors = new Dictionary(); + string alias = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias")); + _Reactors.Add(alias, alias); + string x86 = Path.Combine(AppContext.BaseDirectory, "x86"); + if (!Directory.Exists(x86)) + _ = Directory.CreateDirectory(x86); + _TessDataDirectory = Path.Combine(AppContext.BaseDirectory, "tessdata"); + if (!Directory.Exists(_TessDataDirectory)) + _ = Directory.CreateDirectory(_TessDataDirectory); + string pdfttfSource = Path.Combine(AppContext.BaseDirectory, "pdf.ttf"); + string pdfttfDestination = Path.Combine(_TessDataDirectory, Path.GetFileName(pdfttfSource)); + if (File.Exists(pdfttfSource) && !File.Exists(pdfttfDestination)) + File.Copy(pdfttfSource, pdfttfDestination); + string tesseract41dllSource = Path.Combine(AppContext.BaseDirectory, "tesseract41.dll"); + string tesseract41dllDestination = Path.Combine(x86, Path.GetFileName(tesseract41dllSource)); + if (File.Exists(tesseract41dllSource) && !File.Exists(tesseract41dllDestination)) + File.Copy(tesseract41dllSource, tesseract41dllDestination); + string engtraineddataSource = Path.Combine(AppContext.BaseDirectory, "eng.traineddata"); + string engtraineddataDestination = Path.Combine(_TessDataDirectory, Path.GetFileName(engtraineddataSource)); + if (File.Exists(engtraineddataSource) && !File.Exists(engtraineddataDestination)) + File.Copy(engtraineddataSource, engtraineddataDestination); + string leptonica1800dllSource = Path.Combine(AppContext.BaseDirectory, "leptonica-1.80.0.dll"); + string leptonica1800dllDestination = Path.Combine(x86, Path.GetFileName(leptonica1800dllSource)); + if (File.Exists(leptonica1800dllSource) && !File.Exists(leptonica1800dllDestination)) + File.Copy(leptonica1800dllSource, leptonica1800dllDestination); + ModelObjectParameterDefinition[] images = GetProperties(cellInstanceConnectionName, modelObjectParameters, "Image."); + string startX = GetPropertyValue(cellInstanceConnectionName, images, "Image.StartX"); + string startY = GetPropertyValue(cellInstanceConnectionName, images, "Image.StartY"); + string endX = GetPropertyValue(cellInstanceConnectionName, images, "Image.EndX"); + string endY = GetPropertyValue(cellInstanceConnectionName, images, "Image.EndY"); + _StartX = int.Parse(startX); + _StartY = int.Parse(startY); + _EndX = int.Parse(endX); + _EndY = int.Parse(endY); + _ColorCollections = new(); + _PreviousTotalDeltaCollection = new(); + (_OffSetX, _OffSetY) = ProcessData.GetOffSet(_FileConnectorConfiguration.SourceDirectoryCloaking); + string masterImageDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory.Master.Images"); + List<(string File, Size Size, Color[] Colors)> colorCollections = ProcessData.GetColorCollections(_StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, cellInstanceName, masterImageDirectory); + int[] distinctSizes = (from l in colorCollections select l.Size.Width * l.Size.Height).Distinct().ToArray(); + if (distinctSizes.Length != 1) + throw new Exception($"All Master Images must be the same size{Environment.NewLine}{string.Join(Environment.NewLine, distinctSizes)}"); + _Size = colorCollections[0].Size; + _ColorCollections.AddRange(from l in colorCollections select new Tuple(l.File, l.Colors)); + } + + void IFileRead.Move(Tuple> extractResults, Exception exception) => Move(extractResults); + + 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; + } + + private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) + { + Tuple> results = new(string.Empty, null, null, new List()); + _TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks; + _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true); + SetFileParameterLotIDToLogisticsMID(); + if (_Logistics.FileInfo.Length < _MinFileLength) + results.Item4.Add(_Logistics.FileInfo); + else + { + IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _StartX, _StartY, _EndX, _EndY, _OffSetX, _OffSetY, _Size, _ColorCollections); + if (iProcessData is not ProcessData processData) + throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks)); + string lastText = Regex.Replace(_LastText, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + string text = Regex.Replace(processData.Text, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0]; + if (string.IsNullOrEmpty(lastText)) + lastText = "_"; + string mid = string.Concat(lastText, '-', text); + SetFileParameterLotID(mid); + string processJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors); + _Logistics.Update(mid, processJobID); + if (iProcessData.Details.Count == 0) + throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks)); + if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks) + File.Delete(reportFullPath); + else + { + if (processData.Text != _LastText) + { + if (_PreviousTotalDeltaCollection.Count > 50) + { + double average = _PreviousTotalDeltaCollection.Average(); + double sum = _PreviousTotalDeltaCollection.Sum(l => Math.Pow(l - average, 2)); + double standardDeviation = Math.Sqrt(sum / _PreviousTotalDeltaCollection.Count); + double deviation = standardDeviation * 3; + double upper = average + deviation; + double lower = average - deviation; + var dynamic = new { _Logistics.Sequence, average, sum, standardDeviation, upper, lower, processData.TotalDelta, processData.Text, _PreviousTotalDeltaCollection.Count }; + string message = JsonSerializer.Serialize(dynamic, new JsonSerializerOptions { WriteIndented = true }); + _Log.Debug(message); + if (processData.TotalDelta > upper || processData.TotalDelta < lower) + _SMTP.SendHighPriorityEmailMessage($"Exception:{_CellInstanceConnectionName}", message); + } + _PreviousTotalDeltaCollection.Add(processData.TotalDelta); + if (_PreviousTotalDeltaCollection.Count > short.MaxValue) + { + for (int i = 1; i < 500; i++) + _PreviousTotalDeltaCollection.RemoveAt(0); + } + } + _LastText = processData.Text; + _LastChange = DateTime.Now.Ticks; + results = iProcessData.GetResults(this, _Logistics, results.Item4); + } + } + return results; + } + +} \ No newline at end of file diff --git a/Adaptation/FileHandlers/jpeg/ProcessData.cs b/Adaptation/FileHandlers/jpeg/ProcessData.cs new file mode 100644 index 0000000..b6f7b8e --- /dev/null +++ b/Adaptation/FileHandlers/jpeg/ProcessData.cs @@ -0,0 +1,486 @@ +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using log4net; +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using Tesseract; + +namespace Adaptation.FileHandlers.jpeg; + +public class ProcessData : IProcessData +{ + + private readonly List _Details; + + private readonly ILog _Log; + + public string JobID { get; set; } + public string MesEntity { get; set; } + + public int Red { get; set; } + public int Green { get; set; } + public string Text { get; set; } + public int TotalDelta { get; set; } + public string ClosestMatchFileName { get; set; } + + List Shared.Properties.IProcessData.Details => _Details; + + public ProcessData(IFileRead fileRead, Logistics logistics, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List> colorCollections) + { + JobID = logistics.JobID; + fileInfoCollection.Clear(); + _Details = new List(); + MesEntity = logistics.MesEntity; + _Log = LogManager.GetLogger(typeof(ProcessData)); + Parse(fileRead, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY, size, colorCollections); + } + + internal static (int, int) GetOffSet(string sourceDirectoryCloaking) + { + int offSetX; + int offSetY; + string[] offset = sourceDirectoryCloaking.Split('x'); + if (offset.Length != 2 || !int.TryParse(offset[0], out int x) || !int.TryParse(offset[1], out int y)) + { + offSetX = 0; + offSetY = 0; + } + else + { + offSetX = x; + offSetY = y; + } + return new(offSetX, offSetY); + } + + private static string Get(string value, bool useSplitForMID) + { + string result = value; + if (useSplitForMID) + { + if (result.IndexOf(".") > -1) + result = result.Split('.')[0].Trim(); + if (result.IndexOf("_") > -1) + result = result.Split('_')[0].Trim(); + if (result.IndexOf("-") > -1) + result = result.Split('-')[0].Trim(); + } + result = string.Concat(result.Substring(0, 1).ToUpper(), result.Substring(1).ToLower()); + return result; + } + + string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary reactors) + { + string result = string.Empty; + string filePrefixAsMID; + foreach (KeyValuePair keyValuePair in reactors) + { + foreach (string filePrefix in keyValuePair.Value.Split('|')) + { + filePrefixAsMID = Get(filePrefix, useSplitForMID: true); + if (logistics.MID.StartsWith(filePrefix) || logistics.MID.StartsWith(filePrefixAsMID)) + { + result = keyValuePair.Key; + break; + } + } + } + if (string.IsNullOrEmpty(result) && reactors.Count == 1) + result = reactors.ElementAt(0).Key; + return result; + } + + Tuple> IProcessData.GetResults(IFileRead fileRead, Logistics logistics, List fileInfoCollection) + { + Tuple> results; + List tests = new(); + foreach (object item in _Details) + tests.Add(Test.CDE); + List descriptions = fileRead.GetDescriptions(fileRead, tests, this); + if (tests.Count != descriptions.Count) + throw new Exception(); + for (int i = 0; i < tests.Count; i++) + { + if (descriptions[i] is not Description description) + throw new Exception(); + if (description.Test != (int)tests[i]) + throw new Exception(); + } + List 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; + } + +#nullable enable +#pragma warning disable CA1416 + + private static (Size, Color[]) Get(string reportFullPath, int startX, int startY, int endX, int endY, int offSetX, int offSetY) + { + Color color; + List colors = new(); + int startXValue = startX + offSetX; + int startYValue = startY + offSetY; + int endXValue = endX + offSetX; + int endYValue = endY + offSetY; + using Bitmap? bitmap = Image.FromFile(reportFullPath) as Bitmap; + if (bitmap is null) + throw new Exception($"Couldn't load image from <{reportFullPath}>"); + for (int x = startXValue; x < endXValue; x++) + { + for (int y = startYValue; y < endYValue; y++) + { + color = bitmap.GetPixel(x, y); + colors.Add(color); + } + } + return new(bitmap.Size, colors.ToArray()); + } + + private static System.Drawing.Imaging.ImageFormat Get(string extension) + { + System.Drawing.Imaging.ImageFormat imageFormat = extension switch + { + ".bmp" => System.Drawing.Imaging.ImageFormat.Bmp, + ".gif" => System.Drawing.Imaging.ImageFormat.Gif, + ".jpeg" => System.Drawing.Imaging.ImageFormat.Jpeg, + ".jpg" => System.Drawing.Imaging.ImageFormat.Jpeg, + ".png" => System.Drawing.Imaging.ImageFormat.Png, + ".tiff" => System.Drawing.Imaging.ImageFormat.Tiff, + _ => throw new Exception("Extension not mapped"), + }; + return imageFormat; + } + + private static (Color[], int, int) Get(IFileRead fileRead, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, string extension, Size size) + { + Color color; + List colors = new(); + MemoryStream memoryStream = new(); + int startXValue = startX + offSetX; + int startYValue = startY + offSetY; + int endXValue = endX + offSetX; + int endYValue = endY + offSetY; + Bitmap selectedBitmap = new(endXValue - startXValue, endYValue - startYValue); + System.Drawing.Imaging.ImageFormat imageFormat = Get(extension); + using Bitmap? bitmap = Image.FromFile(fileRead.ReportFullPath) as Bitmap; + string saveFileName = Path.ChangeExtension(fileRead.ReportFullPath, extension); + if (bitmap is null) + throw new Exception($"Couldn't load image from <{fileRead.ReportFullPath}>"); + if (!size.Equals(bitmap.Size)) + throw new Exception("Source size doesn't match master image size "); + for (int x = startXValue; x < endXValue; x++) + { + for (int y = startYValue; y < endYValue; y++) + { + color = bitmap.GetPixel(x, y); + colors.Add(color); + selectedBitmap.SetPixel(x - startXValue, y - startYValue, color); + } + } + selectedBitmap.Save(memoryStream, imageFormat); + if (!fileRead.IsEAFHosted) + { + fileInfoCollection.Add(new FileInfo(saveFileName)); + SaveToFile(extension, saveFileName, memoryStream); + } + return new(colors.ToArray(), endXValue - startXValue, endYValue - startYValue); + } + + private static string Get(IFileRead fileRead, string extension, string extra) + { + string result; + string? directoryName = Path.GetDirectoryName(fileRead.ReportFullPath); + if (string.IsNullOrEmpty(directoryName)) + throw new Exception("Couldn't get directoryName!"); + string? fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileRead.ReportFullPath); + if (string.IsNullOrEmpty(fileNameWithoutExtension)) + throw new Exception("Couldn't get fileNameWithoutExtension!"); + result = Path.Combine(directoryName, $"{fileNameWithoutExtension} - {extra}{extension}"); + return result; + } + + private static void SaveToFile(string extension, string saveFileName, MemoryStream memoryStream) + { + System.Drawing.Imaging.ImageFormat imageFormat = extension switch + { + ".bmp" => System.Drawing.Imaging.ImageFormat.Bmp, + ".gif" => System.Drawing.Imaging.ImageFormat.Gif, + ".jpeg" => System.Drawing.Imaging.ImageFormat.Jpeg, + ".jpg" => System.Drawing.Imaging.ImageFormat.Jpeg, + ".png" => System.Drawing.Imaging.ImageFormat.Png, + ".tiff" => System.Drawing.Imaging.ImageFormat.Tiff, + _ => throw new Exception("Extension not mapped"), + }; + using Bitmap bitmap = new(memoryStream); + bitmap.Save(saveFileName, imageFormat); + } + +#pragma warning restore CA1416 + + private static void SaveText(int red, int green, string closestMatchFileNameEnding, string textFileName, List<(string File, int TotalDelta)> totalDeltaCollection) + { + string format = "00000"; + List lines = new() { red.ToString(format), green.ToString(format), closestMatchFileNameEnding }; + foreach ((string file, int totalDelta) in totalDeltaCollection) + { + lines.Add(file); + lines.Add(totalDelta.ToString(format)); + } + File.WriteAllLines(textFileName, lines); + } + + internal static List<(string, Size, Color[])> GetColorCollections(int startX, int startY, int endX, int endY, int offSetX, int offSetY, string cellInstanceName, string masterImageDirectory) + { + List<(string, Size, Color[])> results = new(); + (Size Size, Color[] Colors) result; + string fileName; + string[] files = Directory.GetFiles(masterImageDirectory, "*.jpeg", SearchOption.TopDirectoryOnly); + foreach (string file in files) + { + fileName = Path.GetFileName(file); + if (!fileName.StartsWith(cellInstanceName)) + continue; + result = Get(file, startX, startY, endX, endY, offSetX, offSetY); + results.Add(new(file, result.Size, result.Colors)); + } + return results; + } + + private void Parse(IFileRead fileRead, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List> colorCollections) + { + Red = 0; + Green = 0; + int delta; + Color color; + int totalDelta; + const int thresHold = 70; + const string extension = ".tiff"; + List<(string File, int TotalDelta)> totalDeltaCollection = new(); + (Color[] sourceColors, int width, int height) = Get(fileRead, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY, extension, size); + foreach ((string file, Color[] colors) in colorCollections) + { + totalDelta = 0; + if (colors.Length != sourceColors.Length) + continue; + for (int i = 0; i < sourceColors.Length; i++) + { + color = sourceColors[i]; + if (color.R > thresHold) + Red += 1; + if (color.G > thresHold) + Green += 1; + delta = color.R - colors[i].R; + if (delta > 0) + totalDelta += delta; + else + totalDelta += delta * -1; + delta = color.G - colors[i].G; + if (delta > 0) + totalDelta += delta; + else + totalDelta += delta * -1; + delta = color.B - colors[i].B; + if (delta > 0) + totalDelta += delta; + else + totalDelta += delta * -1; + } + totalDeltaCollection.Add(new(file, totalDelta)); + } + totalDeltaCollection = (from l in totalDeltaCollection orderby l.TotalDelta select l).ToList(); + ClosestMatchFileName = Path.GetFileNameWithoutExtension(totalDeltaCollection[0].File); + string[] closestMatchFileNameSplit = ClosestMatchFileName.Split('-'); + Text = closestMatchFileNameSplit.Last().TrimStart(); + TotalDelta = totalDeltaCollection[0].TotalDelta; + string textFileName = Get(fileRead, ".txt", $"{TotalDelta} - {Text}"); + if (!fileRead.IsEAFHosted) + { + _Log.Debug(textFileName); + fileInfoCollection.Add(new FileInfo(textFileName)); + SaveText(Red, Green, Text, textFileName, totalDeltaCollection); + } + _Details.Add(Text); + } + +#nullable enable + + internal static List GetDescriptions(JsonElement[] jsonElements) + { + List results = new(); + Description? description; + JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString }; + foreach (JsonElement jsonElement in jsonElements) + { + if (jsonElement.ValueKind != JsonValueKind.Object) + throw new Exception(); + description = JsonSerializer.Deserialize(jsonElement.ToString(), jsonSerializerOptions); + if (description is null) + continue; + results.Add(description); + } + return results; + } + +#pragma warning disable CA1416 + + private static MemoryStream GetMemoryStream(System.Drawing.Imaging.ImageFormat imageFormat, Bitmap bitmap, int startX, int startY, int endX, int endY, int offSetX, int offSetY) + { + Color color; + int negitiveGrayScale; + MemoryStream result = new(); + int startXValue = startX + offSetX; + int startYValue = startY + offSetY; + int endXValue = endX + offSetX; + int endYValue = endY + offSetY; + using Bitmap selectedBitmap = new(endXValue - startXValue, endYValue - startYValue); + for (int x = startXValue; x < endXValue; x++) + { + for (int y = startYValue; y < endYValue; y++) + { + color = bitmap.GetPixel(x, y); + negitiveGrayScale = 255 - (int)((color.R * 0.3) + (color.G * 0.59) + (color.B * 0.11)); + if (negitiveGrayScale < 162) + selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 0, 0, 0)); + else + selectedBitmap.SetPixel(x - startXValue, y - startYValue, Color.FromArgb(color.A, 255, 255, 255)); + } + } + selectedBitmap.Save(result, imageFormat); + return result; + } + + private static List GetMemoryStreams(string reportFullPath, string extension) + { + List results = new(); + System.Drawing.Imaging.ImageFormat imageFormat = Get(extension); + using Bitmap? bitmap = Image.FromFile(reportFullPath) as Bitmap; + if (bitmap is null) + throw new Exception($"Couldn't load image from <{reportFullPath}>"); + results.Add(GetMemoryStream(imageFormat, bitmap, 6, 130, 791, 953, 0, 0)); + results.Add(GetMemoryStream(imageFormat, bitmap, 48, 795, 359, 869, 0, 0)); + results.Add(GetMemoryStream(imageFormat, bitmap, 376, 814, 430, 832, 0, 0)); + results.Add(GetMemoryStream(imageFormat, bitmap, 373, 793, 433, 874, 0, 0)); + return results; + } + + public static List<(float, string, List)> Parse(string reportFullPath) + { + List<(float, string, List)> results = new(); + string text; + float pageMeanConfidence; + MemoryStream memoryStream; + List blocks = new(); + const string extension = ".tiff"; + StringBuilder stringBuilder = new(); + using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default); + List memoryStreams = GetMemoryStreams(reportFullPath, extension); + for (int i = 0; i < memoryStreams.Count; i++) + { + _ = stringBuilder.Clear(); + memoryStream = memoryStreams[i]; + using Pix img = Pix.LoadFromMemory(memoryStream.GetBuffer()); + using Page page = engine.Process(img); + text = page.GetText(); + pageMeanConfidence = page.GetMeanConfidence(); + using ResultIterator iter = page.GetIterator(); + iter.Begin(); + do + { + do + { + do + { + do + { + _ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' '); + if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0) + { + blocks.Add(stringBuilder.ToString()); + _ = stringBuilder.Clear(); + } + } while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word)); + if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine)) + _ = stringBuilder.AppendLine(); + } while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine)); + } while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para)); + } while (iter.Next(PageIteratorLevel.Block)); + if (stringBuilder.Length > 0) + blocks.Add(stringBuilder.ToString()); + results.Add(new(pageMeanConfidence, text, blocks)); + // if (!fileRead.IsEAFHosted) + // { + // fileInfoCollection.Add(new FileInfo(saveFileName)); + SaveToFile(extension, $"{reportFullPath}{i}{extension}", memoryStream); + // } + } + return results; + } + +#pragma warning restore CA1416 + + public static (float, string, List) Parse(string reportFullPath, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY) + { + (float, string, List) result; + List blocks = new(); + StringBuilder stringBuilder = new(); + using TesseractEngine engine = new(string.Empty, "eng", EngineMode.Default); + using Pix img = Pix.LoadFromFile(reportFullPath); + using Page page = engine.Process(img); + string text = page.GetText(); + float pageMeanConfidence = page.GetMeanConfidence(); + using ResultIterator iter = page.GetIterator(); + iter.Begin(); + do + { + do + { + do + { + do + { + _ = stringBuilder.Append(iter.GetText(PageIteratorLevel.Word)).Append(' '); + if (iter.IsAtFinalOf(PageIteratorLevel.TextLine, PageIteratorLevel.Word) && stringBuilder.Length > 0) + { + blocks.Add(stringBuilder.ToString()); + _ = stringBuilder.Clear(); + } + } while (iter.Next(PageIteratorLevel.TextLine, PageIteratorLevel.Word)); + if (iter.IsAtFinalOf(PageIteratorLevel.Para, PageIteratorLevel.TextLine)) + _ = stringBuilder.AppendLine(); + } while (iter.Next(PageIteratorLevel.Para, PageIteratorLevel.TextLine)); + } while (iter.Next(PageIteratorLevel.Block, PageIteratorLevel.Para)); + } while (iter.Next(PageIteratorLevel.Block)); + if (stringBuilder.Length > 0) + blocks.Add(stringBuilder.ToString()); + result = new(pageMeanConfidence, text, blocks); + return result; + } + + private void Parse(IFileRead fileRead, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY) + { + (float pageMeanConfidence, string text, List blocks) = Parse(fileRead.ReportFullPath, fileInfoCollection, startX, startY, endX, endY, offSetX, offSetY); + _Log.Debug(string.Format("Mean confidence: {0}", pageMeanConfidence)); + _Log.Debug(string.Format("Text (GetText): \r\n{0}", text)); + _Log.Debug("Text (iterator):"); + if (blocks.Count == 0) + _Details.Add(text); + else + { + blocks = (from l in blocks where l.Split(':').Length == 3 select l).ToList(); + if (blocks.Count == 0) + _Details.Add(text); + else + _Details.Add(blocks[0]); + } + } + +} \ No newline at end of file diff --git a/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs b/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs new file mode 100644 index 0000000..7cd0603 --- /dev/null +++ b/Adaptation/Ifx/Eaf/Common/Configuration/ConnectionSetting.cs @@ -0,0 +1,16 @@ +namespace Adaptation.Ifx.Eaf.Common.Configuration; + +[System.Runtime.Serialization.DataContract] +public class ConnectionSetting +{ + +#pragma warning disable IDE0060 + + public ConnectionSetting(string name, string value) { } + + [System.Runtime.Serialization.DataMember] + public string Name { get; set; } + [System.Runtime.Serialization.DataMember] + 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 new file mode 100644 index 0000000..bb50d23 --- /dev/null +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/File.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; + +public class File +{ + +#pragma warning disable IDE0060 + + 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 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 new file mode 100644 index 0000000..2d3132c --- /dev/null +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Component/FilePathGenerator.cs @@ -0,0 +1,38 @@ +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using System; +using System.Collections.Generic; + +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Component; + +public class FilePathGenerator +{ + +#pragma warning disable IDE0060 + + 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(); + + 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(); + +} \ 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 new file mode 100644 index 0000000..05fe1cc --- /dev/null +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/Configuration/FileConnectorConfiguration.cs @@ -0,0 +1,134 @@ +using Adaptation.Ifx.Eaf.Common.Configuration; +using System; +using System.Collections.Generic; + +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; + +[System.Runtime.Serialization.DataContract] +public class FileConnectorConfiguration +{ + public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360; + public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15; + + [System.Runtime.Serialization.DataMember] + public virtual bool? TriggerOnChanged { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? PostProcessingRetries { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual bool? CopySourceFolderStructure { get; set; } + [System.Runtime.Serialization.DataMember] + public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; } + [System.Runtime.Serialization.DataMember] + public string AlternateTargetFolder { get; set; } + [System.Runtime.Serialization.DataMember] + public long? FileHandleTimeout { get; set; } + [System.Runtime.Serialization.DataMember] + public bool? DeleteEmptySourceSubFolders { get; set; } + [System.Runtime.Serialization.DataMember] + public long? IdleEventWaitTimeInSeconds { get; set; } + [System.Runtime.Serialization.DataMember] + public string FileAgeThreshold { get; set; } + public bool? FolderAgeCheckIndividualSubFolders { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual ZipModeEnum? ZipMode { get; set; } + [System.Runtime.Serialization.DataMember] + public FileAgeFilterEnum? FileAgeFilterMode { get; set; } + [System.Runtime.Serialization.DataMember] + public string ZipTargetFileName { get; set; } + [System.Runtime.Serialization.DataMember] + public string ZipErrorTargetFileName { get; set; } + [System.Runtime.Serialization.DataMember] + public long? ZipFileSubFolderLevel { get; set; } + [System.Runtime.Serialization.DataMember] + public string DefaultPlaceHolderValue { get; set; } + [System.Runtime.Serialization.DataMember] + public bool? UseZip64Mode { get; set; } + [System.Runtime.Serialization.DataMember] + public List ConnectionSettings { get; set; } + public string SourceDirectoryCloaking { get; set; } + public string FolderAgeThreshold { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? FileScanningIntervalInSeconds { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual bool? TriggerOnCreated { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? ZipFileTime { get; set; } + [System.Runtime.Serialization.DataMember] + public string SourceFileLocation { get; set; } + [System.Runtime.Serialization.DataMember] + public string SourceFileFilter { get; set; } + public List SourceFileFilters { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual bool? IncludeSubDirectories { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual FileScanningOptionEnum? FileScanningOption { get; set; } + [System.Runtime.Serialization.DataMember] + public string TargetFileLocation { get; set; } + [System.Runtime.Serialization.DataMember] + public string ErrorTargetFileLocation { get; set; } + [System.Runtime.Serialization.DataMember] + public string TargetFileName { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? FileHandleWaitTime { get; set; } + [System.Runtime.Serialization.DataMember] + public IfFileExistEnum? IfFileExistAction { get; set; } + [System.Runtime.Serialization.DataMember] + public long? ConnectionRetryInterval { get; set; } + [System.Runtime.Serialization.DataMember] + public PreProcessingModeEnum? PreProcessingMode { get; set; } + [System.Runtime.Serialization.DataMember] + public PostProcessingModeEnum? PostProcessingMode { get; set; } + [System.Runtime.Serialization.DataMember] + public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; } + [System.Runtime.Serialization.DataMember] + public virtual long? ZipFileAmount { get; set; } + [System.Runtime.Serialization.DataMember] + 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 + } +} \ 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 new file mode 100644 index 0000000..57475d5 --- /dev/null +++ b/Adaptation/Ifx/Eaf/EquipmentConnector/File/SelfDescription/FileConnectorParameterTypeDefinitionProvider.cs @@ -0,0 +1,18 @@ +using Adaptation.Eaf.EquipmentCore.SelfDescription.ParameterTypes; +using System.Collections.Generic; + +namespace Adaptation.Ifx.Eaf.EquipmentConnector.File.SelfDescription; + +public class FileConnectorParameterTypeDefinitionProvider +{ + +#pragma warning disable CA1822 +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + public FileConnectorParameterTypeDefinitionProvider() { } + + public IEnumerable GetAllParameterTypeDefinition() => null; + public ParameterTypeDefinition GetParameterTypeDefinition(string name) => null; + +} \ No newline at end of file diff --git a/Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs b/Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs new file mode 100644 index 0000000..7e1ffe0 --- /dev/null +++ b/Adaptation/Infineon/Monitoring/MonA/ExtWebClient.cs @@ -0,0 +1,20 @@ +using System; +using System.Net; + +namespace Infineon.Monitoring.MonA; + +#nullable disable +#pragma warning disable SYSLIB0014 + +public class ExtWebClient : WebClient +{ + protected override WebRequest GetWebRequest(Uri address) + { + WebRequest webRequest = base.GetWebRequest(address); + if (webRequest != null) + webRequest.PreAuthenticate = PreAuthenticate; + return webRequest; + } + + public bool PreAuthenticate { get; set; } +} \ No newline at end of file diff --git a/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs b/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs new file mode 100644 index 0000000..6552d47 --- /dev/null +++ b/Adaptation/Infineon/Monitoring/MonA/IMonIn.cs @@ -0,0 +1,167 @@ +using System; + +namespace Infineon.Monitoring.MonA; + +public interface IMonIn +{ + string SendStatus(string site, string resource, string stateName, State state); + + string SendStatus( + string site, + DateTime timeStamp, + string resource, + string stateName, + State state); + + string SendStatus( + string site, + string resource, + string stateName, + State state, + string description); + + string SendStatus( + string site, + DateTime timeStamp, + string resource, + string stateName, + State state, + string description); + + string SendStatus( + string site, + string resource, + string subresource, + string stateName, + State state); + + string SendStatus( + string site, + DateTime timeStamp, + string resource, + string subresource, + string stateName, + State state); + + string SendStatus( + string site, + string resource, + string subresource, + string stateName, + State state, + string description); + + string SendStatus( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string stateName, + State state, + string description); + + string SendPerformanceMessage( + string site, + string resource, + string performanceName, + double value); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value); + + string SendPerformanceMessage( + string site, + string resource, + string performanceName, + double value, + string description); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + string description); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + int? interval); + + string SendPerformanceMessage( + string site, + string resource, + DateTime? timeStamp, + string performanceName, + double value, + string unit); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + string unit, + int? interval); + + string SendPerformanceMessage( + string site, + string resource, + string subresource, + string performanceName, + double value); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value); + + string SendPerformanceMessage( + string site, + string resource, + string subresource, + string performanceName, + double value, + string description); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + int? interval); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + string unit); + + string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + string description, + string unit, + int? interval); +} \ No newline at end of file diff --git a/Adaptation/Infineon/Monitoring/MonA/MonIn.cs b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs new file mode 100644 index 0000000..7a8a711 --- /dev/null +++ b/Adaptation/Infineon/Monitoring/MonA/MonIn.cs @@ -0,0 +1,283 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using System.Text; + +namespace Infineon.Monitoring.MonA; + +public class MonIn : IMonIn, IDisposable +{ + private static readonly DateTime _Utc1970DateTime = new(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + public const string MonInUrl = "http://moninhttp.{0}.infineon.com/input/text"; + private static readonly Dictionary _Instances = new(); + private readonly ExtWebClient _WebClient; + private readonly string _MonInUrl; + private static CultureInfo _CultureInfo; + + public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text") + { + MonIn instance; + lock (_Instances) + { + if (_Instances.TryGetValue(url, out instance)) + { + instance = new MonIn(url); + _Instances.Add(url, instance); + } + } + return instance; + } + + private MonIn(string url) + { + _WebClient = new ExtWebClient(); + _WebClient.Headers[HttpRequestHeader.ContentType] = "application/text"; + _WebClient.Encoding = Encoding.UTF8; + _CultureInfo = new CultureInfo("en-US"); + _MonInUrl = url; + } + + public void SetBasicAuthentication(string username, string password) + { + _WebClient.PreAuthenticate = true; + _WebClient.Headers[HttpRequestHeader.Authorization] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password)); + } + + public string SendStatus(string site, string resource, string stateName, State state) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, string.Empty); + + public string SendStatus( + string site, + DateTime timeStamp, + string resource, + string stateName, + State state) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, string.Empty); + + public string SendStatus( + string site, + string resource, + string stateName, + State state, + string description) => SendStatus(site, new DateTime?(), resource, string.Empty, stateName, state, description); + + public string SendStatus( + string site, + DateTime timeStamp, + string resource, + string stateName, + State state, + string description) => SendStatus(site, new DateTime?(timeStamp), resource, string.Empty, stateName, state, description); + + public string SendStatus( + string site, + string resource, + string subresource, + string stateName, + State state) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, string.Empty); + + public string SendStatus( + string site, + DateTime timeStamp, + string resource, + string subresource, + string stateName, + State state) => SendStatus(site, new DateTime?(timeStamp), resource, subresource, stateName, state, string.Empty); + + public string SendStatus( + string site, + string resource, + string subresource, + string stateName, + State state, + string description) => SendStatus(site, new DateTime?(), resource, subresource, stateName, state, description); + + public string SendStatus( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string stateName, + State state, + string description) + { + string statusMessage = CreateStatusMessage(site, timeStamp, resource, subresource, stateName, state.ToString(), description); + lock (_WebClient) + return _WebClient.UploadString(string.Format(_MonInUrl, site), statusMessage); + } + + public string SendPerformanceMessage( + string site, + string resource, + string performanceName, + double value) => SendPerformanceMessage(site, new DateTime?(), resource, string.Empty, performanceName, value, string.Empty, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + string resource, + string performanceName, + double value, + string description) => SendPerformanceMessage(site, new DateTime?(), resource, string.Empty, performanceName, value, description, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + string description) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, description, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + int? interval) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, string.Empty, interval); + + public string SendPerformanceMessage( + string site, + string resource, + DateTime? timeStamp, + string performanceName, + double value, + string unit) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, unit, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string performanceName, + double value, + string unit, + int? interval) => SendPerformanceMessage(site, timeStamp, resource, string.Empty, performanceName, value, string.Empty, unit, interval); + + public string SendPerformanceMessage( + string site, + string resource, + string subresource, + string performanceName, + double value) => SendPerformanceMessage(site, new DateTime?(), resource, subresource, performanceName, value, string.Empty, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + string resource, + string subresource, + string performanceName, + double value, + string description) => SendPerformanceMessage(site, new DateTime?(), resource, subresource, performanceName, value, description, string.Empty, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + int? interval) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, string.Empty, interval); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + string unit) => SendPerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, string.Empty, unit, new int?()); + + public string SendPerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + string description, + string unit, + int? interval) + { + string performanceMessage = CreatePerformanceMessage(site, timeStamp, resource, subresource, performanceName, value, description, unit, interval); + lock (_WebClient) + return _WebClient.UploadString(string.Format(_MonInUrl, site), performanceMessage); + } + + private static string CreateStatusMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string stateName, + string state, + string description) + { + StringBuilder stringBuilder = new(); + if (string.IsNullOrEmpty(subresource)) + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), stateName.Trim(), state.Trim(), description.Trim()); + else + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), stateName.Trim(), state.Trim(), description.Trim()); + return stringBuilder.ToString(); + } + + private static string CreatePerformanceMessage( + string site, + DateTime? timeStamp, + string resource, + string subresource, + string performanceName, + double value, + string description, + string unit, + int? interval) + { + StringBuilder stringBuilder = new(); + if (string.IsNullOrEmpty(subresource)) + { + if (unit.Equals(string.Empty) && !interval.HasValue) + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} \n{5}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim()); + else + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" {4} {5} {{interval={6}, unit={7}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim()); + } + else if (unit.Equals(string.Empty) && !interval.HasValue) + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} \n{6}", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim()); + else + _ = stringBuilder.AppendFormat(_CultureInfo, "> {0} {1} \"{2}\" \"{3}\" \"{4}\" {5} {6} {{interval={7}, unit={8}}}\n", site.Trim(), timeStamp.HasValue ? GetDateTimeNowAsPosix(timeStamp.Value) : (object)"now", resource.Trim(), subresource.Trim(), performanceName.Trim(), value, description.Trim(), interval.HasValue ? interval.Value.ToString() : (object)string.Empty, unit.Trim()); + return stringBuilder.ToString(); + } + + private static string GetDateTimeNowAsPosix(DateTime timeStamp) + { + if (timeStamp > DateTime.Now) + timeStamp = DateTime.Now; + return ((int)timeStamp.ToUniversalTime().Subtract(_Utc1970DateTime).TotalSeconds).ToString(CultureInfo.InvariantCulture); + } + + public void Dispose() + { + KeyValuePair keyValuePair = new(); + foreach (KeyValuePair instance in _Instances) + { + if (instance.Value == this) + { + keyValuePair = instance; + break; + } + } + _ = _Instances.Remove(keyValuePair.Key); + _WebClient?.Dispose(); + } + +} \ No newline at end of file diff --git a/Adaptation/Infineon/Monitoring/MonA/State.cs b/Adaptation/Infineon/Monitoring/MonA/State.cs new file mode 100644 index 0000000..d6bface --- /dev/null +++ b/Adaptation/Infineon/Monitoring/MonA/State.cs @@ -0,0 +1,11 @@ +namespace Infineon.Monitoring.MonA; + +public enum State +{ + Up, + Ok, + Warning, + Critical, + Down, + Unknown, +} \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs b/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs new file mode 100644 index 0000000..e32df4c --- /dev/null +++ b/Adaptation/PeerGroup/GCL/Annotations/NotNullAttribute.cs @@ -0,0 +1,9 @@ +using System; + +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 +{ + public NotNullAttribute() { } +} \ No newline at end of file diff --git a/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs new file mode 100644 index 0000000..af1ea65 --- /dev/null +++ b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsConnectionMode.cs @@ -0,0 +1,7 @@ +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum HsmsConnectionMode +{ + 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 new file mode 100644 index 0000000..eecd8b7 --- /dev/null +++ b/Adaptation/PeerGroup/GCL/SecsDriver/HsmsSessionMode.cs @@ -0,0 +1,7 @@ +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum HsmsSessionMode +{ + 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 new file mode 100644 index 0000000..5e68d64 --- /dev/null +++ b/Adaptation/PeerGroup/GCL/SecsDriver/SecsTransportType.cs @@ -0,0 +1,7 @@ +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum SecsTransportType +{ + 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 new file mode 100644 index 0000000..a5bd2c3 --- /dev/null +++ b/Adaptation/PeerGroup/GCL/SecsDriver/SerialBaudRate.cs @@ -0,0 +1,15 @@ +namespace Adaptation.PeerGroup.GCL.SecsDriver; + +public enum SerialBaudRate +{ + 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 new file mode 100644 index 0000000..964612e --- /dev/null +++ b/Adaptation/Shared/Duplicator/Description.cs @@ -0,0 +1,181 @@ +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; + +namespace Adaptation.Shared.Duplicator; + +public class Description : IDescription, Properties.IDescription +{ + + public int Test { get; set; } + public int Count { get; set; } + public int Index { get; set; } + public string RDS { get; set; } + // + public string EventName { get; set; } + public string NullData { get; set; } + 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; + } + + 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(); + if (iProcessData is null || iProcessData.Details.Count == 0) + results.Add(GetDefault(fileRead, logistics)); + else + { + string nullData; + Description description; + object configDataNullData = fileRead.NullData; + if (configDataNullData is null) + nullData = string.Empty; + else + nullData = configDataNullData.ToString(); + for (int i = 0; i < iProcessData.Details.Count; i++) + { + if (iProcessData.Details[i] is null) + 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 = DateTime.Now.ToString(GetDateFormat()), + RDS = string.Empty, + }; + results.Add(description); + } + } + return results; + } + + private static Description GetDisplayNames() + { + Description result = new(); + return result; + } + + private static 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; + } + + internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; + +} \ No newline at end of file diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs new file mode 100644 index 0000000..c8bed49 --- /dev/null +++ b/Adaptation/Shared/FileRead.cs @@ -0,0 +1,795 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared.Methods; +using log4net; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading; + +namespace Adaptation.Shared; + +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 _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 Dictionary> _StaticRuns; + 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; + bool Properties.IFileRead.IsDuplicator => _IsDuplicator; + 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, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) + { + _SMTP = smtp; + _IsEvent = isEvent; + _DummyRuns = dummyRuns; + _LastTicksDuration = 0; + _StaticRuns = staticRuns; + _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; + _TracePath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Trace"); + _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 && connectionCount > 1) + throw new Exception(cellInstanceConnectionName); + // if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent) + // throw new Exception(cellInstanceConnectionName); + // if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent) + // throw new Exception(cellInstanceConnectionName); + } + if (isDuplicator) + _MesEntity = string.Empty; + else + _MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias")); + _EventName = eventName; + _EventNameFileRead = eventNameFileRead; + _EquipmentType = parameterizedModelObjectDefinitionTypeAppended; + long breakAfterSeconds; + if (_FileConnectorConfiguration is null) + breakAfterSeconds = 360; + else + { + if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased) + breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileHandleTimeout.Value); + else if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.FileWatcher) + breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value); + else + throw new Exception(); + } + _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 (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking)) + // throw new Exception("SourceDirectoryCloaking is empty?"); + // if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~")) + // throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!"); + // } + } + } + + 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 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.Length == 0) + 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.Length == 0) + throw new Exception(cellInstanceConnectionName); + return results; + } + + protected void UpdateLastTicksDuration(long ticksDuration) + { + if (ticksDuration < 50000000) + ticksDuration = 50000000; + _LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667); + _Log.Info($"{new TimeSpan(ticksDuration).TotalMilliseconds} TotalMillisecond(s) to process {Environment.NewLine}{_CellInstanceConnectionName}{Environment.NewLine}<{_ReportFullPath}>"); + } + + protected void WaitForThread(Thread thread, List threadExceptions) + { + if (thread is not null) + { + ThreadState threadState; + for (short i = 0; i < short.MaxValue; i++) + { + if (thread is null) + break; + else + { + threadState = thread.ThreadState; + if (threadState is not ThreadState.Running and not ThreadState.WaitSleepJoin) + break; + } + Thread.Sleep(500); + } + lock (threadExceptions) + { + if (threadExceptions.Count != 0) + { + 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; + } + } + } + } + + private void WriteAllLines(string to, string[] exceptionLines) + { + string fileName = string.Concat(to, @"\readme.txt"); + try + { + if (!Directory.Exists(to)) + _ = Directory.CreateDirectory(to); + File.WriteAllLines(fileName, exceptionLines); + } + catch (Exception ex) { _Log.Error(ex.Message); } + } + + 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 }; + if (!_IsDuplicator) + WriteAllLines(to, results); + } + if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Count != 0) + { + 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 string GetTupleFile(Logistics logistics, List descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription + { + string result; + string rds; + string fileName; + string dateValue; + string rdsPlaceholder = "%RDS%"; + string mesEntityPlaceholder = "%MesEntity%"; + if (descriptions.Count == 0 || string.IsNullOrEmpty(descriptions[0].RDS)) + rds = logistics.MID; + else + rds = descriptions[0].RDS; + string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries); + if (segments.Length == 0) + result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity)); + else + { + segments = segments[1].Split('%'); + string datePlaceholder = "%DateTime%"; + dateValue = logistics.DateTimeFromSequence.ToString(segments[0]); + foreach (string segment in scopeInfo.FileName.Split('%')) + { + if (!segment.Contains(segments[0])) + continue; + datePlaceholder = string.Concat('%', segment, '%'); + } + fileName = scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue); + if (!duplicateFile.Contains("Viewer")) + result = Path.Combine(duplicateDirectory, fileName); + else + result = Path.Combine(duplicateDirectory, $"Viewer_{fileName}"); + } + if (result.Contains('%')) + throw new Exception("Placeholder exists!"); + return result; + } + + protected void WaitForFileConsumption(string sourceDirectoryCloaking, Logistics logistics, DateTime dateTime, List descriptions, string successDirectory, string duplicateDirectory, string duplicateFile, List<(Properties.IScopeInfo, string)> collection) where T : Properties.IDescription + { + bool check; + long preWait; + string tupleFile; + string tupleFileName = string.Empty; + List duplicateFiles = new(); + StringBuilder stringBuilder = new(); + List consumedFileIndices = new(); + bool moreThanAnHour = _BreakAfterSeconds > 3600; + long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks; + if (_FileConnectorConfiguration?.FileHandleWaitTime is null) + preWait = dateTime.AddMilliseconds(1234).Ticks; + else + preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks; + if (collection.Count == 0) + duplicateFiles.Add(duplicateFile); + string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath); + string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath)); + foreach ((Properties.IScopeInfo scopeInfo, string text) in collection) + { + if (scopeInfo.FileName.StartsWith(@"\")) + tupleFile = scopeInfo.FileName; + else if (!scopeInfo.FileName.Contains('%')) + tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc"); + else + tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile); + tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0]; + duplicateFiles.Add(tupleFile); + if (_IsEAFHosted) + File.WriteAllText(tupleFile, text); + } + for (short i = 0; i < short.MaxValue; i++) + { + if (DateTime.Now.Ticks > preWait) + break; + Thread.Sleep(100); + } + if (!moreThanAnHour) + { + for (short z = 0; z < short.MaxValue; z++) + { + 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])) + { + if (string.IsNullOrEmpty(tupleFileName)) + consumedFileIndices.Add(i); + else if (duplicateFiles.All(l => Path.GetFileNameWithoutExtension(l).Split('.')[0] == tupleFileName)) + { + for (int j = 0; j < duplicateFiles.Count; j++) + consumedFileIndices.Add(j); + } + else + consumedFileIndices.Add(i); + } + } + if (consumedFileIndices.Count == duplicateFiles.Count) + break; + } + } + 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(250); + } + } + } + + 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, "%"))) + { + 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; + string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; + if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType) + directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, _CellInstanceName, _CellInstanceConnectionName); + else + directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, _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) + { + 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 segments; + 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.TryGetValue(jsonProperty.Name, out segments)) + description = string.Empty; + else + description = segments.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 static void NestExistingFiles(FileConnectorConfiguration fileConnectorConfiguration) + { + if (!fileConnectorConfiguration.IncludeSubDirectories.Value) + { + string[] matches = GetMatches(fileConnectorConfiguration); + if (matches is not null && matches.Length > 0) + { + string fileName; + string nestedDirectory = Path.Combine(fileConnectorConfiguration.SourceFileLocation, DateTime.Now.Ticks.ToString()); + if (!Directory.Exists(nestedDirectory)) + _ = Directory.CreateDirectory(nestedDirectory); + foreach (string match in matches) + { + fileName = Path.GetFileName(match); + File.Move(match, Path.Combine(nestedDirectory, fileName)); + } + } + } + } + + protected static string[] GetMatches(FileConnectorConfiguration fileConnectorConfiguration) + { + string[] segments; + string[] results = null; + foreach (string subSourceFileFilter in fileConnectorConfiguration.SourceFileFilters) + { + segments = subSourceFileFilter.Split('\\'); + if (fileConnectorConfiguration.IncludeSubDirectories.Value) + results = Directory.GetFiles(fileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories); + else + results = Directory.GetFiles(fileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly); + if (results.Length != 0) + break; + } + return results; + } + + protected Tuple> ReExtract(IFileRead fileRead, List headerNames, Dictionary keyValuePairs) + { + Tuple> results; + if (!Directory.Exists(_FileConnectorConfiguration.SourceFileLocation)) + results = null; + else + { + string[] matches = GetMatches(_FileConnectorConfiguration); + if (matches is null || matches.Length == 0) + results = null; + else + { + _ReportFullPath = matches[0]; + results = fileRead.GetExtractResult(_ReportFullPath, _EventName); + if (!_IsEAFHosted) + TriggerEvents(results, headerNames, keyValuePairs); + } + } + 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; + } + + private 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)) + { + _ = Directory.CreateDirectory(itemDirectory); + FileInfo fileInfo = new(_Logistics.ReportFullPath); + Directory.SetCreationTime(itemDirectory, fileInfo.LastWriteTime); + } + 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(); + } + } + } + + internal static List GetDirectoryNames(string directory) + { +#nullable enable + List results = new(); + string? fileName; + string? checkDirectory = directory; + string? pathRoot = Path.GetPathRoot(directory); + string extension = Path.GetExtension(directory); + if (string.IsNullOrEmpty(pathRoot)) + throw new NullReferenceException(nameof(pathRoot)); + if (Directory.Exists(directory)) + { + fileName = Path.GetFileName(directory); + if (!string.IsNullOrEmpty(fileName)) + results.Add(fileName); + } + else if ((string.IsNullOrEmpty(extension) || extension.Length > 3) && !File.Exists(directory)) + { + fileName = Path.GetFileName(directory); + if (!string.IsNullOrEmpty(fileName)) + results.Add(fileName); + } + for (int i = 0; i < int.MaxValue; i++) + { + checkDirectory = Path.GetDirectoryName(checkDirectory); + if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot) + break; + fileName = Path.GetFileName(checkDirectory); + if (string.IsNullOrEmpty(fileName)) + continue; + results.Add(fileName); + } + results.Add(pathRoot); + results.Reverse(); + return results; +#nullable disable + } + + private string GetJobIdDirectory(string path) + { + string result; + List directoryNames = GetDirectoryNames(path); + if (!directoryNames.Contains(_Logistics.JobID)) + result = Path.GetDirectoryName(path); + else + { + result = string.Empty; + foreach (string directoryName in directoryNames) + { + result = Path.Combine(result, directoryName); + if (directoryName == _Logistics.JobID) + break; + } + } + return result; + } + + private static void DeleteEmptyTopDirectories(string rootDirectory) + { + if (Directory.Exists(rootDirectory)) + { + string[] files; + string[] directories; + string[] subDirectories = Directory.GetDirectories(rootDirectory, "*", SearchOption.TopDirectoryOnly); + foreach (string subDirectory in subDirectories) + { + files = Directory.GetFiles(subDirectory, "*", SearchOption.AllDirectories); + if (files.Length > 0) + continue; + directories = Directory.GetDirectories(subDirectory, "*", SearchOption.TopDirectoryOnly); + if (directories.Length > 0) + continue; + try + { Directory.Delete(subDirectory); } + catch (UnauthorizedAccessException) + { + new DirectoryInfo(subDirectory).Attributes = FileAttributes.Normal; + Directory.Delete(subDirectory); + } + } + } + } + + private void Shared1811(string to, FileInfo sourceFile) + { + if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength) + { + string directoryName = Path.GetFileName(to); + string jobIdDirectory = GetJobIdDirectory(to); + DateTime dateTime = DateTime.Now.AddMinutes(-15); + string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00"); + string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}"; + string destinationDirectory = Path.Combine(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).Length != 0) + continue; + if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0) + continue; + if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Length != 0) + continue; + if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Length != 0) + continue; + if (new DirectoryInfo(checkDirectory).CreationTime > dateTime) + continue; + Directory.Delete(checkDirectory, recursive: false); + } + } + catch (Exception) { throw; } + DeleteEmptyTopDirectories(jobIdDirectory); + } + } + + private 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).Length == 0) + Directory.Delete(directory); + } + } + } + + protected void WaitForFileConsumption(DateTime dateTime, List descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription + { + if (!isDummyRun && _IsEAFHosted) + WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection); + else + { + long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.ConnectionRetryInterval.Value).Ticks; + for (short i = 0; i < short.MaxValue; i++) + { + if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter) + break; + Thread.Sleep(500); + } + } + } + + internal static string GetJobIdParentDirectory(string directory) + { + string result; + if (!string.IsNullOrEmpty(Path.GetFileName(directory))) + result = Path.GetFullPath(GetParentParent(directory)); + else + result = Path.GetFullPath(GetParentParent(Path.GetDirectoryName(directory))); + if (!Directory.Exists(result)) + _ = Directory.CreateDirectory(result); + return result; + } + + internal string[] GetInProcessDirectory(string jobIdDirectory) + { + string[] results; + if (!_IsEAFHosted) + results = new string[] { jobIdDirectory }; + else + { + string logisticsSequence = _Logistics.Sequence.ToString(); + results = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly); + } + if ((results is null) || results.Length != 1) + throw new Exception("Didn't find directory by logistics sequence"); + return results; + } + + internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath) + { + string result; + string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_'); + if (segments.Length <= 2) + result = segments[0]; + else + result = string.Concat(segments[0], segments[2]); + return result; + } + + internal static string GetParentParent(string value) + { + string result = Path.GetDirectoryName(Path.GetDirectoryName(value)); + return result; + } + +} + +// 2022-06-08 -> Shared - FileRead \ No newline at end of file diff --git a/Adaptation/Shared/Logistics.cs b/Adaptation/Shared/Logistics.cs new file mode 100644 index 0000000..cb1f805 --- /dev/null +++ b/Adaptation/Shared/Logistics.cs @@ -0,0 +1,201 @@ +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace Adaptation.Shared; + +public class Logistics : ILogistics +{ + + protected readonly DateTime _DateTimeFromSequence; + protected readonly FileInfo _FileInfo; + protected readonly string _JobID; + protected readonly List _Logistics1; + protected readonly List _Logistics2; + protected string _MID; + protected readonly string _MesEntity; + protected readonly object _NullData; + protected string _ProcessJobID; + protected readonly string _ReportFullPath; + protected readonly long _Sequence; + protected readonly double _TotalSecondsSinceLastWriteTimeFromSequence; + + public DateTime DateTimeFromSequence => _DateTimeFromSequence; + public FileInfo FileInfo => _FileInfo; + public string JobID => _JobID; + public List Logistics1 => _Logistics1; + public List Logistics2 => _Logistics2; + public string MID => _MID; + public string MesEntity => _MesEntity; + public object NullData => _NullData; + public string ProcessJobID => _ProcessJobID; + public string ReportFullPath => _ReportFullPath; + public long Sequence => _Sequence; + public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence; + + 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); + _Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList(); + _Logistics2 = new List(); + } + + public Logistics(IFileRead fileRead, long tickOffset, 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 = new(reportFullPath); + DateTime dateTime = new(_FileInfo.LastWriteTime.Ticks + tickOffset); + 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()); + _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; + _FileInfo = new(reportFullPath); + _Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1")) + { + _NullData = null; + _JobID = "null"; + dateTime = _FileInfo.LastWriteTime; + _Sequence = dateTime.Ticks; + _DateTimeFromSequence = dateTime; + _TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; + _MesEntity = DefaultMesEntity(dateTime); + _ReportFullPath = reportFullPath; + _ProcessJobID = "R##"; + _MID = "null"; + _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 = _FileInfo.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 = _FileInfo.LastWriteTime; + else + dateTime = new DateTime(sequence); + } + _Sequence = dateTime.Ticks; + _DateTimeFromSequence = dateTime; + _TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds; + DateTime lastWriteTime = _FileInfo.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]; + } + } + Logistics2 logistics2; + _Logistics2 = new List(); + for (int i = 1; i < Logistics1.Count; i++) + { + if (Logistics1[i].StartsWith("LOGISTICS_2")) + { + logistics2 = new Logistics2(Logistics1[i]); + Logistics2.Add(logistics2); + } + } + for (int i = Logistics1.Count - 1; i > -1; i--) + { + if (Logistics1[i].StartsWith("LOGISTICS_2")) + Logistics1.RemoveAt(i); + } + } + + private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY"); + + internal void Update(string mid, string processJobID) + { + _MID = mid; + _ProcessJobID = processJobID; + } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Logistics2.cs b/Adaptation/Shared/Logistics2.cs new file mode 100644 index 0000000..a067258 --- /dev/null +++ b/Adaptation/Shared/Logistics2.cs @@ -0,0 +1,78 @@ +using System; + +namespace Adaptation.Shared; + +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) + { + 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]; + } + } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Methods/IDescription.cs b/Adaptation/Shared/Methods/IDescription.cs new file mode 100644 index 0000000..30dc635 --- /dev/null +++ b/Adaptation/Shared/Methods/IDescription.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Text.Json; + +namespace Adaptation.Shared.Methods; + +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); + +} \ No newline at end of file diff --git a/Adaptation/Shared/Methods/IFileRead.cs b/Adaptation/Shared/Methods/IFileRead.cs new file mode 100644 index 0000000..3d690c1 --- /dev/null +++ b/Adaptation/Shared/Methods/IFileRead.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +namespace Adaptation.Shared.Methods; + +public interface IFileRead : Properties.IFileRead +{ + + void WaitForThread(); + JsonProperty[] GetDefault(); + string GetEventDescription(); + List GetHeaderNames(); + 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 new file mode 100644 index 0000000..ea9ca27 --- /dev/null +++ b/Adaptation/Shared/Methods/ILogistics.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Shared.Methods; + +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 new file mode 100644 index 0000000..35b9e57 --- /dev/null +++ b/Adaptation/Shared/Methods/ILogistics2.cs @@ -0,0 +1,5 @@ +namespace Adaptation.Shared.Methods; + +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 new file mode 100644 index 0000000..e3fdeab --- /dev/null +++ b/Adaptation/Shared/Methods/IProcessData.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; + +namespace Adaptation.Shared.Methods; + +public interface IProcessData : Properties.IProcessData +{ + + 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 new file mode 100644 index 0000000..378da64 --- /dev/null +++ b/Adaptation/Shared/Methods/ISMTP.cs @@ -0,0 +1,8 @@ +namespace Adaptation.Shared.Methods; + +public interface ISMTP +{ + 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 new file mode 100644 index 0000000..539bd09 --- /dev/null +++ b/Adaptation/Shared/Metrology/ScopeInfo.cs @@ -0,0 +1,300 @@ +using System; +using System.IO; + +namespace Adaptation.Shared.Metrology; + +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 = "", string extraExtension = "") + { + 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 new file mode 100644 index 0000000..8edb116 --- /dev/null +++ b/Adaptation/Shared/Metrology/WS.Attachment.cs @@ -0,0 +1,30 @@ +namespace Adaptation.Shared.Metrology; + +public partial class WS +{ + + public class Attachment + { + + public string SubGroupId { get; set; } + public long HeaderId { get; set; } + public string HeaderIdDirectory { get; set; } + public string UniqueId { get; set; } + public string DestinationFileName { get; set; } + public string SourceFileName { get; set; } + public string AttachmentId { get; set; } + + public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName) + { + SubGroupId = subGroupId; + HeaderId = headerId; + HeaderIdDirectory = headerIdDirectory; + UniqueId = uniqueId; + DestinationFileName = destinationFileName; + SourceFileName = sourceFileName; + AttachmentId = System.Guid.NewGuid().ToString(); + } + + } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Metrology/WS.Results.cs b/Adaptation/Shared/Metrology/WS.Results.cs new file mode 100644 index 0000000..2d1c603 --- /dev/null +++ b/Adaptation/Shared/Metrology/WS.Results.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Text.Json; + +namespace Adaptation.Shared.Metrology; + +public partial class WS +{ + // 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; } + + // 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; } + + // 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 new file mode 100644 index 0000000..c49e61d --- /dev/null +++ b/Adaptation/Shared/Metrology/WS.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Text; +using System.Text.Json; + +namespace Adaptation.Shared.Metrology; + +public partial class WS +{ + + public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120) + { + Results results = new(); + 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()) + { + httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); + 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, new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); + string checkDirectory = Path.Combine(directory, $"-{results.HeaderID}"); + if (!Directory.Exists(checkDirectory)) + _ = Directory.CreateDirectory(checkDirectory); + File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json); + } + if (!results.Success) + results.Errors.Add(results.ToString()); + } + catch (Exception e) + { + Exception exception = e; + StringBuilder stringBuilder = new(); + while (exception is not null) + { + _ = stringBuilder.AppendLine(exception.Message); + exception = exception.InnerException; + } + results.Errors ??= new List(); + results.Errors.Add(resultsJson); + results.Errors.Add(stringBuilder.ToString()); + } + return new(resultsJson, results); + } + + public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60) + { + using HttpClient httpClient = new(); + string json = JsonSerializer.Serialize(attachment); + httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0); + StringContent httpContent = new(json, Encoding.UTF8, "application/json"); + HttpResponseMessage httpResponseMessage = httpClient.PostAsync($"{url}/attachment", httpContent).Result; + if (!httpResponseMessage.IsSuccessStatusCode) + { + string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result; + throw new Exception($"Attachment failed: {resultBody}"); + } + } + + public static void AttachFiles(string url, List headerAttachments = null, List dataAttachments = null) + { + string directory; + try + { + if (headerAttachments is not null) + { + foreach (Attachment attachment in headerAttachments) + { + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); + } + } + if (dataAttachments is not null) + { + foreach (Attachment attachment in dataAttachments) + { + directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception(); + if (!Directory.Exists(directory)) + _ = Directory.CreateDirectory(directory); + File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true); + } + } + if (headerAttachments is not null) + { + foreach (Attachment attachment in headerAttachments) + AttachFile(url, attachment); + } + if (dataAttachments is not null) + { + foreach (Attachment attachment in dataAttachments) + AttachFile(url, attachment); + } + //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 new file mode 100644 index 0000000..cd3fc15 --- /dev/null +++ b/Adaptation/Shared/ParameterType.cs @@ -0,0 +1,10 @@ +namespace Adaptation.Shared; + +public enum ParameterType +{ + 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 new file mode 100644 index 0000000..b2ca7b6 --- /dev/null +++ b/Adaptation/Shared/ProcessDataStandardFormat.cs @@ -0,0 +1,410 @@ +using Adaptation.Shared.Methods; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; + +namespace Adaptation.Shared; + +public class ProcessDataStandardFormat +{ + + public enum SearchFor + { + EquipmentIntegration = 1, + BusinessIntegration = 2, + SystemExport = 3, + Archive = 4 + } + + public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText) + { + string result; + if (jsonElements.Length == 0) + 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;) + { + foreach (JsonProperty jsonProperty in jsonElements[0].EnumerateObject()) + { + columns += 1; + _ = stringBuilder.Append('"').Append(jsonProperty.Name).Append('"').Append('\t'); + } + 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()); + } + 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(); + 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++) + { + 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.Length == 0 || !bodyLines[0].Contains('\t')) + results = JsonSerializer.Deserialize("[]"); + else + { + string value; + string[] segments; + List lines = new(); + StringBuilder stringBuilder = new(); + foreach (string bodyLine in bodyLines) + { + _ = stringBuilder.Clear(); + _ = 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("}"); + lines.Add(stringBuilder.ToString()); + } + string json = $"[{string.Join(",", lines)}]"; + results = JsonSerializer.Deserialize(json); + } + return results; + } + + 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) + { + segments = bodyLine.Split('\t'); + for (int c = 1; c < segments.Length; c++) + { + if (c >= columns.Length) + continue; + results[columns[c]].Add(segments[c]); + } + } + return results; + } + + public static Tuple>>> GetTestDictionary(Tuple pdsf) + { + Dictionary>> results = new(); + List collection; + string testColumn = nameof(Test); + Dictionary> keyValuePairs = GetDictionary(pdsf); + if (!keyValuePairs.TryGetValue(testColumn, out collection)) + throw new Exception(); + int min; + int max; + Test testKey; + List vs; + string columnKey; + Dictionary> tests = new(); + for (int i = 0; i < collection.Count; i++) + { + if (Enum.TryParse(collection[i], out Test test)) + { + if (!results.ContainsKey(test)) + { + 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); + } + } + } + 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(); + 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) + { + 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.Count == 0) + { + _ = 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 inputSeparator = '\t'; + char outputSeparator = '\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(inputSeparator); + 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(inputSeparator).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(inputSeparator); + 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(inputSeparator); + for (int s = 0; s < segments.Length; s++) + { + 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(outputSeparator); + _ = 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(inputSeparator); + for (int s = 0; s < segments.Length; s++) + _ = stringBuilder.Append(segments[s].PadLeft(vs[s], ' ')).Append(outputSeparator); + _ = 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 new file mode 100644 index 0000000..1166e17 --- /dev/null +++ b/Adaptation/Shared/Properties/IDescription.cs @@ -0,0 +1,11 @@ +namespace Adaptation.Shared.Properties; + +public interface IDescription +{ + + int Test { get; } + int Count { get; } + int Index { get; } + string RDS { get; } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IFileRead.cs b/Adaptation/Shared/Properties/IFileRead.cs new file mode 100644 index 0000000..5cf9a69 --- /dev/null +++ b/Adaptation/Shared/Properties/IFileRead.cs @@ -0,0 +1,18 @@ +namespace Adaptation.Shared.Properties; + +public interface IFileRead +{ + bool IsEvent { get; } + string NullData { get; } + string MesEntity { get; } + bool IsEAFHosted { get; } + string EventName { get; } + bool IsDuplicator { 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 new file mode 100644 index 0000000..398bed9 --- /dev/null +++ b/Adaptation/Shared/Properties/ILogistics.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Adaptation.Shared.Properties; + +public interface ILogistics +{ + + public DateTime DateTimeFromSequence { get; } + public FileInfo FileInfo { get; } + public string JobID { get; } + public List Logistics1 { get; } + public List Logistics2 { get; } + public string MID { get; } + public string MesEntity { get; } + public object NullData { get; } + public string ProcessJobID { get; } + public string ReportFullPath { get; } + public long Sequence { get; } + public double TotalSecondsSinceLastWriteTimeFromSequence { get; } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Properties/ILogistics2.cs b/Adaptation/Shared/Properties/ILogistics2.cs new file mode 100644 index 0000000..ae8a15a --- /dev/null +++ b/Adaptation/Shared/Properties/ILogistics2.cs @@ -0,0 +1,14 @@ +namespace Adaptation.Shared.Properties; + +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; } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IProcessData.cs b/Adaptation/Shared/Properties/IProcessData.cs new file mode 100644 index 0000000..e378288 --- /dev/null +++ b/Adaptation/Shared/Properties/IProcessData.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace Adaptation.Shared.Properties; + +public interface IProcessData +{ + + List Details { get; } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Properties/IScopeInfo.cs b/Adaptation/Shared/Properties/IScopeInfo.cs new file mode 100644 index 0000000..10d7385 --- /dev/null +++ b/Adaptation/Shared/Properties/IScopeInfo.cs @@ -0,0 +1,17 @@ +using System; + +namespace Adaptation.Shared.Properties; + +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; } + +} \ No newline at end of file diff --git a/Adaptation/Shared/Test.cs b/Adaptation/Shared/Test.cs new file mode 100644 index 0000000..169f05b --- /dev/null +++ b/Adaptation/Shared/Test.cs @@ -0,0 +1,60 @@ +namespace Adaptation.Shared; + +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, + Climatec = 54, //Largest + CV = 3, + DailyRPMAverage = 19, + DailyRPMPLRatio = 20, + DailyRPMXY = 18, + Denton = 9, + DiffusionLength = 45, + GRATXTCenter = 51, + GRATXTEdge = 52, + 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, + SRP2100 = 53, + 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/Production/v2.59.0/DEP08SIASM.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/DEP08SIASM.cs new file mode 100644 index 0000000..54ea717 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/DEP08SIASM.cs @@ -0,0 +1,182 @@ +#if true +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0; + +[TestClass] +public class DEP08SIASM : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; } + + static DEP08SIASM() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIASM(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Dummy() + { + string check = "637400762024374000.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34-EQPT.cs new file mode 100644 index 0000000..acaa139 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34-EQPT.cs @@ -0,0 +1,65 @@ +#if true +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0; + +[TestClass] +public class R34_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34_EQPT EAFLoggingUnitTesting { get; private set; } + + static R34_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R34_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34.cs new file mode 100644 index 0000000..34135af --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R34.cs @@ -0,0 +1,65 @@ +#if true +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0; + +[TestClass] +public class R34 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34 EAFLoggingUnitTesting { get; private set; } + + static R34() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R34__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36-EQPT.cs new file mode 100644 index 0000000..e17ec3d --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36-EQPT.cs @@ -0,0 +1,65 @@ +#if true +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0; + +[TestClass] +public class R36_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36_EQPT EAFLoggingUnitTesting { get; private set; } + + static R36_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R36_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36.cs new file mode 100644 index 0000000..5097d9e --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/R36.cs @@ -0,0 +1,65 @@ +#if true +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0; + +[TestClass] +public class R36 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36 EAFLoggingUnitTesting { get; private set; } + + static R36() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R36__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/DEP08SIASM.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/DEP08SIASM.cs new file mode 100644 index 0000000..26914c7 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/DEP08SIASM.cs @@ -0,0 +1,167 @@ +#if v2_39_2 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2; + +[TestClass] +public class DEP08SIASM : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; } + + public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIASM(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM() + { + string check = "~IsXToOpenInsightMetrologyViewer"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_() + { + string check = "~IsXToIQSSi"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__() + { + string check = "~IsXToOpenInsight"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___() + { + string check = "~IsXToOpenInsightMetrologyViewerAttachments"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____() + { + string check = "~IsXToAPC"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____() + { + string check = "~IsXToSPaCe"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______() + { + string check = "~IsXToArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______() + { + string check = "~IsArchive"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM________() + { + string check = "~IsDummy"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34-EQPT.cs new file mode 100644 index 0000000..3e65964 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_39_2 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2; + +[TestClass] +public class R34_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34_EQPT EAFLoggingUnitTesting { get; private set; } + + public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34.cs new file mode 100644 index 0000000..5741c26 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R34.cs @@ -0,0 +1,63 @@ +#if v2_39_2 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2; + +[TestClass] +public class R34 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34 EAFLoggingUnitTesting { get; private set; } + + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36-EQPT.cs new file mode 100644 index 0000000..2b222c6 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_39_2 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2; + +[TestClass] +public class R36_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36_EQPT EAFLoggingUnitTesting { get; private set; } + + public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36.cs new file mode 100644 index 0000000..6322fc1 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.39.2/R36.cs @@ -0,0 +1,63 @@ +#if v2_39_2 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_39_2; + +[TestClass] +public class R36 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36 EAFLoggingUnitTesting { get; private set; } + + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R36__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIASM.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIASM.cs new file mode 100644 index 0000000..9d2253c --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/DEP08SIASM.cs @@ -0,0 +1,180 @@ +#if v2_43_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4; + +[TestClass] +public class DEP08SIASM : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; } + + public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIASM(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Dummy() + { + string check = "637400762024374000.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34-EQPT.cs new file mode 100644 index 0000000..0b1fddf --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_43_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4; + +[TestClass] +public class R34_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34_EQPT EAFLoggingUnitTesting { get; private set; } + + public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34.cs new file mode 100644 index 0000000..a6dfc07 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R34.cs @@ -0,0 +1,63 @@ +#if v2_43_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4; + +[TestClass] +public class R34 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34 EAFLoggingUnitTesting { get; private set; } + + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36-EQPT.cs new file mode 100644 index 0000000..3f2d18e --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_43_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4; + +[TestClass] +public class R36_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36_EQPT EAFLoggingUnitTesting { get; private set; } + + public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36.cs new file mode 100644 index 0000000..dc2929e --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.43.0/R36.cs @@ -0,0 +1,63 @@ +#if v2_43_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4; + +[TestClass] +public class R36 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36 EAFLoggingUnitTesting { get; private set; } + + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R36__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIASM.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIASM.cs new file mode 100644 index 0000000..cd41b16 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/DEP08SIASM.cs @@ -0,0 +1,160 @@ +#if v2_56_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; + +[TestClass] +public class DEP08SIASM : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; } + + public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIASM(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Dummy() + { + string check = "637400762024374000.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34-EQPT.cs new file mode 100644 index 0000000..0220d93 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34-EQPT.cs @@ -0,0 +1,61 @@ +#if v2_56_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; + +[TestClass] +public class R34_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34_EQPT EAFLoggingUnitTesting { get; private set; } + + public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs new file mode 100644 index 0000000..3adcd27 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R34.cs @@ -0,0 +1,63 @@ +#if v2_56_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; + +[TestClass] +public class R34 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34 EAFLoggingUnitTesting { get; private set; } + + static R34() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R34__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36-EQPT.cs new file mode 100644 index 0000000..ffc07cf --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36-EQPT.cs @@ -0,0 +1,61 @@ +#if v2_56_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; + +[TestClass] +public class R36_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36_EQPT EAFLoggingUnitTesting { get; private set; } + + public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R36_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs new file mode 100644 index 0000000..a55b9fe --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.56.0/R36.cs @@ -0,0 +1,63 @@ +#if v2_56_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0; + +[TestClass] +public class R36 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36 EAFLoggingUnitTesting { get; private set; } + + static R36() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R36__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/DEP08SIASM.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/DEP08SIASM.cs new file mode 100644 index 0000000..b4a2778 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/DEP08SIASM.cs @@ -0,0 +1,180 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; + +[TestClass] +public class DEP08SIASM : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08SIASM EAFLoggingUnitTesting { get; private set; } + + public DEP08SIASM() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08SIASM(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__MoveMatchingFiles() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewer() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__IQSSi() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsight() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__APC() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__SPaCe() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Processed() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Archive() + { + string check = "*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Dummy() + { + string check = "637400762024374000.zip"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34-EQPT.cs new file mode 100644 index 0000000..5a10d9c --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; + +[TestClass] +public class R34_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34_EQPT EAFLoggingUnitTesting { get; private set; } + + public R34_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R34_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34.cs new file mode 100644 index 0000000..4356647 --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R34.cs @@ -0,0 +1,65 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; + +[TestClass] +public class R34 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R34 EAFLoggingUnitTesting { get; private set; } + + static R34() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R34() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R34(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R34(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R34__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36-EQPT.cs new file mode 100644 index 0000000..db40b9c --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36-EQPT.cs @@ -0,0 +1,63 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; + +[TestClass] +public class R36_EQPT : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36_EQPT EAFLoggingUnitTesting { get; private set; } + + public R36_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36_EQPT(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R36_EQPT__DownloadJpegFile() + { + string check = ".jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36.cs b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36.cs new file mode 100644 index 0000000..963a10f --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Staging/v2.57.0/R36.cs @@ -0,0 +1,65 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0; + +[TestClass] +public class R36 : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static R36 EAFLoggingUnitTesting { get; private set; } + + static R36() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public R36() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public R36(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new R36(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R36__jpeg() + { + string check = "*.jpeg"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/DEP08SIASM.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/DEP08SIASM.cs new file mode 100644 index 0000000..f764ec3 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/DEP08SIASM.cs @@ -0,0 +1,83 @@ +#if true +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Production.v2_59_0; + +[TestClass] +public class DEP08SIASM +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_59_0.DEP08SIASM _DEP08SIASM; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_59_0.DEP08SIASM.ClassInitialize(testContext); + _DEP08SIASM = CreateSelfDescription.Production.v2_59_0.DEP08SIASM.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__APC() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Processed() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Archive() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__DEP08SIASM__Dummy() => _DEP08SIASM.Production__v2_59_0__DEP08SIASM__Dummy(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/R34-EQPT.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/R34-EQPT.cs new file mode 100644 index 0000000..75bcbd8 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/R34-EQPT.cs @@ -0,0 +1,31 @@ +#if true +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Production.v2_59_0; + +[TestClass] +public class R34_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_59_0.R34_EQPT _R34_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_59_0.R34_EQPT.ClassInitialize(testContext); + _R34_EQPT = CreateSelfDescription.Production.v2_59_0.R34_EQPT.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Production__v2_59_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Production__v2_59_0__R34_EQPT__DownloadJpegFile(); + + [Ignore] + [TestMethod] + public void Production__v2_59_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Production__v2_59_0__R34_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/R34.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/R34.cs new file mode 100644 index 0000000..e20187e --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.59.0/R34.cs @@ -0,0 +1,80 @@ +#if true +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Production.v2_59_0; + +[TestClass] +public class R34 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_59_0.R34 _R34; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_59_0.R34.ClassInitialize(testContext); + _R34 = CreateSelfDescription.Production.v2_59_0.R34.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R34__jpeg() => _R34.Production__v2_59_0__R34__jpeg(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production__v2_59_0__R34__jpeg638000598531758005__Normal() + { + string check = "*.jpeg"; + _R34.Production__v2_59_0__R34__jpeg(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); + // var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}"; + // if (venc_rc_mode == "5") + // { + // uri += $"&ts_muxrate={venc_bitrate}; + // } + // else + // { + // uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0"; + // } + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199 + // http://10.95.154.28/set_adv?vga_auto_adjust=1 + // http://10.95.154.28/set_time?sync_time= + // http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299 + // http://10.95.154.28/get_status?_=1655307702476 + NonThrowTryCatch(); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.2/DEP08SIASM.cs b/Adaptation/_Tests/Extract/Staging/v2.39.2/DEP08SIASM.cs new file mode 100644 index 0000000..3749e14 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.2/DEP08SIASM.cs @@ -0,0 +1,90 @@ +#if v2_39_2 +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_39_2; + +[TestClass] +public class DEP08SIASM +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_39_2.DEP08SIASM _DEP08SIASM; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_2.DEP08SIASM.ClassInitialize(testContext); + _DEP08SIASM = CreateSelfDescription.Staging.v2_39_2.DEP08SIASM.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM__(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM__637825304581476827__Normal() + { + string check = "~IsXToOpenInsight"; + _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM__(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _DEP08SIASM.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _DEP08SIASM.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM___() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM___(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM____(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_____(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM______(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______() => _DEP08SIASM.Staging__v2_39_2__DEP08SIASM__DEP08SIASM_______(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.2/R34-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.39.2/R34-EQPT.cs new file mode 100644 index 0000000..1ea31ae --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.2/R34-EQPT.cs @@ -0,0 +1,35 @@ +#if v2_39_2 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_39_2; + +[TestClass] +public class R34_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_39_2.R34_EQPT _R34_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_2.R34_EQPT.ClassInitialize(testContext); + _R34_EQPT = CreateSelfDescription.Staging.v2_39_2.R34_EQPT.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_39_2__R34_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.2/R34.cs b/Adaptation/_Tests/Extract/Staging/v2.39.2/R34.cs new file mode 100644 index 0000000..d0e6461 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.2/R34.cs @@ -0,0 +1,48 @@ +#if v2_39_2 +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_39_2; + +[TestClass] +public class R34 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_39_2.R34 _R34; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_2.R34.ClassInitialize(testContext); + _R34 = CreateSelfDescription.Staging.v2_39_2.R34.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34__jpeg() => _R34.Staging__v2_39_2__R34__jpeg(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R34__jpeg637812143477007703__Normal() + { + string check = "*.jpeg"; + _R34.Staging__v2_39_2__R34__jpeg(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.2/R36-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.39.2/R36-EQPT.cs new file mode 100644 index 0000000..e0969b7 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.2/R36-EQPT.cs @@ -0,0 +1,29 @@ +#if v2_39_2 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_39_2; + +[TestClass] +public class R36_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_39_2.R36_EQPT _R36_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_2.R36_EQPT.ClassInitialize(testContext); + _R36_EQPT = CreateSelfDescription.Staging.v2_39_2.R36_EQPT.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_39_2__R36_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.39.2/R36.cs b/Adaptation/_Tests/Extract/Staging/v2.39.2/R36.cs new file mode 100644 index 0000000..42ad25c --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.39.2/R36.cs @@ -0,0 +1,29 @@ +#if v2_39_2 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_39_2; + +[TestClass] +public class R36 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_39_2.R36 _R36; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_39_2.R36.ClassInitialize(testContext); + _R36 = CreateSelfDescription.Staging.v2_39_2.R36.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_39_2__R36__jpeg() => _R36.Staging__v2_39_2__R36__jpeg(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs new file mode 100644 index 0000000..7856c6d --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/DEP08SIASM.cs @@ -0,0 +1,83 @@ +#if v2_43_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class DEP08SIASM +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.DEP08SIASM _DEP08SIASM; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.ClassInitialize(testContext); + _DEP08SIASM = CreateSelfDescription.Staging.v2_43_4.DEP08SIASM.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_43_4__DEP08SIASM__Dummy(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs new file mode 100644 index 0000000..2333749 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/R34-EQPT.cs @@ -0,0 +1,35 @@ +#if v2_43_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class R34_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.R34_EQPT _R34_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.R34_EQPT.ClassInitialize(testContext); + _R34_EQPT = CreateSelfDescription.Staging.v2_43_4.R34_EQPT.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_43_4__R34_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs new file mode 100644 index 0000000..d104832 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/R34.cs @@ -0,0 +1,71 @@ +#if v2_43_0 +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class R34 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.R34 _R34; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.R34.ClassInitialize(testContext); + _R34 = CreateSelfDescription.Staging.v2_43_4.R34.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34__jpeg() => _R34.Staging__v2_43_4__R34__jpeg(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R34__jpeg638000598531758005__Normal() + { + string check = "*.jpeg"; + _R34.Staging__v2_43_4__R34__jpeg(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); + // var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}"; + // if (venc_rc_mode == "5") + // { + // uri += $"&ts_muxrate={venc_bitrate}; + // } + // else + // { + // uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0"; + // } + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199 + // http://10.95.154.28/set_adv?vga_auto_adjust=1 + // http://10.95.154.28/set_time?sync_time= + // http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299 + // http://10.95.154.28/get_status?_=1655307702476 + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs new file mode 100644 index 0000000..31f6410 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/R36-EQPT.cs @@ -0,0 +1,29 @@ +#if v2_43_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class R36_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.R36_EQPT _R36_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.R36_EQPT.ClassInitialize(testContext); + _R36_EQPT = CreateSelfDescription.Staging.v2_43_4.R36_EQPT.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R36_EQPT__DownloadJpegFile() => _R36_EQPT.Staging__v2_43_4__R36_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs b/Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs new file mode 100644 index 0000000..4c66736 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.43.0/R36.cs @@ -0,0 +1,29 @@ +#if v2_43_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_43_4; + +[TestClass] +public class R36 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_43_4.R36 _R36; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_43_4.R36.ClassInitialize(testContext); + _R36 = CreateSelfDescription.Staging.v2_43_4.R36.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_43_4__R36__jpeg() => _R36.Staging__v2_43_4__R36__jpeg(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs new file mode 100644 index 0000000..d1e8acd --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/DEP08SIASM.cs @@ -0,0 +1,63 @@ +#if v2_56_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_56_0; + +[TestClass] +public class DEP08SIASM +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_56_0.DEP08SIASM _DEP08SIASM; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.ClassInitialize(testContext); + _DEP08SIASM = CreateSelfDescription.Staging.v2_56_0.DEP08SIASM.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__MoveMatchingFiles(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewer(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__IQSSi(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsight(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__APC(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__SPaCe(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Processed(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Archive(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_56_0__DEP08SIASM__Dummy(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs new file mode 100644 index 0000000..1dd7011 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34-EQPT.cs @@ -0,0 +1,31 @@ +#if v2_56_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_56_0; + +[TestClass] +public class R34_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_56_0.R34_EQPT _R34_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_56_0.R34_EQPT.ClassInitialize(testContext); + _R34_EQPT = CreateSelfDescription.Staging.v2_56_0.R34_EQPT.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile(); + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_56_0__R34_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs new file mode 100644 index 0000000..33120c6 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.56.0/R34.cs @@ -0,0 +1,69 @@ +#if v2_56_0 +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_56_0; + +[TestClass] +public class R34 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_56_0.R34 _R34; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_56_0.R34.ClassInitialize(testContext); + _R34 = CreateSelfDescription.Staging.v2_56_0.R34.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Staging__v2_56_0__R34__jpeg() => _R34.Staging__v2_56_0__R34__jpeg(); + +#if (!DEBUG) + [Ignore] +#endif + [TestMethod] + public void Staging__v2_56_0__R34__jpeg638000598531758005__Normal() + { + string check = "*.jpeg"; + _R34.Staging__v2_56_0__R34__jpeg(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); + // var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}"; + // if (venc_rc_mode == "5") + // { + // uri += $"&ts_muxrate={venc_bitrate}; + // } + // else + // { + // uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0"; + // } + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199 + // http://10.95.154.28/set_adv?vga_auto_adjust=1 + // http://10.95.154.28/set_time?sync_time= + // http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299 + // http://10.95.154.28/get_status?_=1655307702476 + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.57.0/DEP08SIASM.cs b/Adaptation/_Tests/Extract/Staging/v2.57.0/DEP08SIASM.cs new file mode 100644 index 0000000..8381e94 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.57.0/DEP08SIASM.cs @@ -0,0 +1,83 @@ +#if v2_57_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_57_0; + +[TestClass] +public class DEP08SIASM +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_57_0.DEP08SIASM _DEP08SIASM; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_57_0.DEP08SIASM.ClassInitialize(testContext); + _DEP08SIASM = CreateSelfDescription.Staging.v2_57_0.DEP08SIASM.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__MoveMatchingFiles() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__MoveMatchingFiles(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewer() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewer(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__IQSSi() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__IQSSi(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsight() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__OpenInsight(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__OpenInsightMetrologyViewerAttachments(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__APC() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__APC(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__SPaCe() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__SPaCe(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Processed() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__Processed(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Archive() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__Archive(); + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__DEP08SIASM__Dummy() => _DEP08SIASM.Staging__v2_57_0__DEP08SIASM__Dummy(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.57.0/R34-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.57.0/R34-EQPT.cs new file mode 100644 index 0000000..29a3356 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.57.0/R34-EQPT.cs @@ -0,0 +1,31 @@ +#if v2_57_0 +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adaptation._Tests.Extract.Staging.v2_57_0; + +[TestClass] +public class R34_EQPT +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_57_0.R34_EQPT _R34_EQPT; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_57_0.R34_EQPT.ClassInitialize(testContext); + _R34_EQPT = CreateSelfDescription.Staging.v2_57_0.R34_EQPT.EAFLoggingUnitTesting; + } + + [Ignore] + [TestMethod] + public void Staging__v2_57_0__R34_EQPT__DownloadJpegFile() => _R34_EQPT.Staging__v2_57_0__R34_EQPT__DownloadJpegFile(); + + [Ignore] + [TestMethod] + public void Staging__v2_57_0__R34_EQPT__DownloadJpegFile637812143477007703__Normal() => _R34_EQPT.Staging__v2_57_0__R34_EQPT__DownloadJpegFile(); + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Staging/v2.57.0/R34.cs b/Adaptation/_Tests/Extract/Staging/v2.57.0/R34.cs new file mode 100644 index 0000000..c0578b6 --- /dev/null +++ b/Adaptation/_Tests/Extract/Staging/v2.57.0/R34.cs @@ -0,0 +1,71 @@ +#if v2_57_0 +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Staging.v2_57_0; + +[TestClass] +public class R34 +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Staging.v2_57_0.R34 _R34; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Staging.v2_57_0.R34.ClassInitialize(testContext); + _R34 = CreateSelfDescription.Staging.v2_57_0.R34.EAFLoggingUnitTesting; + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R34__jpeg() => _R34.Staging__v2_57_0__R34__jpeg(); + +#if (!DEBUG) + [Ignore] +#endif + [TestMethod] + public void Staging__v2_57_0__R34__jpeg638000598531758005__Normal() + { + string check = "*.jpeg"; + _R34.Staging__v2_57_0__R34__jpeg(); + MethodBase methodBase = new StackFrame().GetMethod(); + string[] variables = _R34.AdaptationTesting.GetVariables(methodBase, check); + IFileRead fileRead = _R34.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false); + // var uri = $"http://{hostip}/set_output?input=0&output=0&venc_framerate={venc_framerate}&venc_gop={venc_gop}&venc_width={venc_width}&venc_height={venc_height}&venc_bitrate={venc_bitrate}&http_ts_uri={http_ts_uri}&http_flv_uri={http_flv_uri}&rtsp_uri={rtsp_uri}&rtmp_enable={rtmp_enable}&rtmp_uri={rtmp_uri}&rtmp_publish_uri={rtmp_publish_uri}&rtmp_publish_enable={rtmp_publish_enable}&http_ts_enable={http_ts_enable}&http_flv_enable={http_flv_enable}&rtsp_enable={rtsp_enable}&venc_profile={venc_profile}&http_hls_uri={http_hls_uri}&http_hls_enable={http_hls_enable}&venc_width_height_same_as_input={venc_width_height_same_as_input}&multicast_ip={multicast_ip}&multicast_port={multicast_port}&multicast_enable={multicast_enable}&venc_codec={venc_codec}&srt_enable={srt_enable}&srt_port={srt_port}&srt_publish_enable={srt_publish_enable}&srt_publish_uri={srt_publish_uri}&srt_key={srt_key}&srt_key_enable={srt_key_enable}&max_qp={venc_max_qp}"; + // if (venc_rc_mode == "5") + // { + // uri += $"&ts_muxrate={venc_bitrate}; + // } + // else + // { + // uri += $"&venc_rc_mode={venc_rc_mode}&ts_muxrate=0"; + // } + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=30&venc_gop=30&venc_width=1920&venc_height=1080&venc_bitrate=2800&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307410424 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=265&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655307485097 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=0&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326370050 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=60&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326507855 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=300&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=1&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326566457 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=0&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326739485 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655326928562 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327093005 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=1&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327167711 + // http://10.95.154.28/set_output?input=0&output=0&venc_framerate=5&venc_gop=5&venc_width=640&venc_height=480&venc_bitrate=32000&http_ts_uri=/0.ts&http_flv_uri=/0.flv&rtsp_uri=/0&rtmp_enable=0&rtmp_uri=/0&rtmp_publish_uri=rtmp%3A%2F%2F192.168.1.169%2Flive%2F0&rtmp_publish_enable=0&http_ts_enable=0&http_flv_enable=1&rtsp_enable=1&venc_profile=2&http_hls_uri=/0.m3u8&http_hls_enable=0&venc_width_height_same_as_input=0&multicast_ip=238.0.0.1&multicast_port=1234&multicast_enable=0&venc_codec=96&srt_enable=0&srt_port=9000&srt_publish_enable=0&srt_publish_uri=srt%3A%2F%2F192.168.1.169%3A9000&srt_key=0123456789&srt_key_enable=0&max_qp=42&venc_rc_mode=0&ts_muxrate=0&_=1655327315199 + // http://10.95.154.28/set_adv?vga_auto_adjust=1 + // http://10.95.154.28/set_time?sync_time= + // http://10.95.154.28/set_time?sync_time=1655307949&_=1655307949299 + // http://10.95.154.28/get_status?_=1655307702476 + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs new file mode 100644 index 0000000..854c8ea --- /dev/null +++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs @@ -0,0 +1,1287 @@ +using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.CellInstance; +using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData; +using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary; +using Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType; +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.Ifx.Eaf.Common.Configuration; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +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.Linq; +using System.Reflection; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; + +namespace Adaptation._Tests.Shared; + +public class AdaptationTesting : ISMTP +{ + + protected readonly string _DummyRoot; + protected readonly string _Environment; + protected readonly string _HostNameAndPort; + protected readonly bool _HasWaitForProperty; + protected readonly TestContext _TestContext; + protected readonly bool _SkipEquipmentDictionary; + protected readonly string _TestContextPropertiesAsJson; + 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 DummyRoot => _DummyRoot; + public string Environment => _Environment; + public TestContext TestContext => _TestContext; + public string HostNameAndPort => _HostNameAndPort; + public bool HasWaitForProperty => _HasWaitForProperty; + public bool SkipEquipmentDictionary => _SkipEquipmentDictionary; + public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson; + 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(string dummyRoot, TestContext testContext, bool skipEquipmentDictionary, string testContextPropertiesAsJson, bool hasWaitForProperty) + { + + string environment = GetEnvironment(testContext); + string hostNameAndPort = GetHostNameAndPort(environment); + _DummyRoot = dummyRoot; + _TestContext = testContext; + _Environment = environment; + _HostNameAndPort = hostNameAndPort; + _HasWaitForProperty = hasWaitForProperty; + _SkipEquipmentDictionary = skipEquipmentDictionary; + _TestContextPropertiesAsJson = testContextPropertiesAsJson; + _CellInstanceVersions = new Dictionary(); + _EquipmentTypeVersions = new Dictionary(); + _EquipmentTypeVersions = new Dictionary(); + _ParameterizedModelObjectDefinitionTypes = new Dictionary(); + _ParameterizedModelObjectDefinitionTypes = new Dictionary(); + _EquipmentDictionaryVersions = new Dictionary(); + _FileConnectorConfigurations = new Dictionary(); + _ModelObjectParameters = new Dictionary>(); + _EquipmentDictionaryEventDescriptions = new Dictionary>>(); + } + + protected static string GetEnvironment(TestContext testContext) + { + string result = testContext.TestName.Split('_')[0]; + return result; + } + + protected static string GetHostNameAndPort(string environment) + { + string result; + result = environment switch + { + "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; + } + + public static string GetTestResultsDirectory(string testContextTestResultsDirectory, bool hasWaitForProperty) + { + string result = string.Empty; + string testResults = "05_TestResults"; + string checkDirectory = testContextTestResultsDirectory; + if (hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))) + throw new Exception($"A:{checkDirectory}; B:{testResults};"); + else if (!hasWaitForProperty && (string.IsNullOrEmpty(checkDirectory) || !checkDirectory.Contains(testResults))) + result = testContextTestResultsDirectory; + else + { + 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; + } + } + } + if (string.IsNullOrEmpty(result)) + throw new Exception(); + return result; + } + + private string GetTestResultsDirectory(bool hasWaitForProperty) + { + string result = GetTestResultsDirectory(_TestContext.TestResultsDirectory, hasWaitForProperty); + return result; + } + + protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName) + { + 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--) + { + 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(); + } + return result; + } + + 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[] 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; + } + + public static MethodBaseName GetMethodBaseName(string dummyRoot, string environment, bool hasWaitForProperty, string methodBaseName, string testResultsDirectory) + { + MethodBaseName result; + string comment; + string fileFullName; + string dummyDirectory; + string withActualCICN; + string separator = "__"; + string textFileDirectory; + string connectionNameAndTicks; + string cellInstanceConnectionName; + string ticks = DateTime.Now.Ticks.ToString(); + string cellInstanceConnectionNameFromMethodBaseName; + string[] segments = methodBaseName.Split(new string[] { separator }, 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, separator, rawVersionName, separator, cellInstanceName, separator); + 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 + { + cellInstanceConnectionNameFromMethodBaseName = connectionNameAndTicks.Substring(0, connectionNameAndTicks.Length - ticks.Length); + ticks = connectionNameAndTicks.Substring(cellInstanceConnectionNameFromMethodBaseName.Length); + } + } + if (string.IsNullOrEmpty(ticks) || string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || !long.TryParse(ticks, out _)) + { + ticks = string.Empty; + comment = string.Empty; + cellInstanceConnectionNameFromMethodBaseName = after; + } + cellInstanceConnectionName = GetCellInstanceConnectionName(cellInstanceConnectionNameFromMethodBaseName); + withActualCICN = GetMethodBaseNameWithActualCICN(methodBaseName, rawCellInstanceName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceConnectionName, ticks); + if (hasWaitForProperty) + dummyDirectory = string.Empty; + else if (string.IsNullOrEmpty(ticks)) + dummyDirectory = string.Empty; + else + { + if (string.IsNullOrEmpty(dummyRoot)) + throw new Exception($"{nameof(dummyRoot)} is empty!"); + if (!withActualCICN.Contains(ticks)) + throw new Exception($"{withActualCICN} doesn't contain {ticks}!"); + segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); + dummyDirectory = Path.Combine(dummyRoot, cellInstanceName, ticks, string.Join(null, segments)); + if (!Directory.Exists(dummyDirectory)) + _ = Directory.CreateDirectory(dummyDirectory); + } + if (string.IsNullOrEmpty(ticks)) + { + textFileDirectory = string.Empty; + fileFullName = Path.Combine(versionDirectory, withActualCICN, $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + } + else + { + segments = withActualCICN.Split(new string[] { ticks }, StringSplitOptions.None); + textFileDirectory = Path.Combine(versionDirectory, segments[0], string.Concat(ticks, segments[1])); + fileFullName = Path.Combine(versionDirectory, segments[0], $"{cellInstanceConnectionNameFromMethodBaseName}.json"); + } + result = new(after, before, cellInstanceConnectionName, cellInstanceConnectionNameFromMethodBaseName, cellInstanceName, cellInstanceVersionName, comment, dummyDirectory, fileFullName, rawCellInstanceName, rawVersionName, separator, testResultsDirectory, textFileDirectory, ticks, versionDirectory, withActualCICN); + return result; + } + + private MethodBaseName GetMethodBaseName(MethodBase methodBase) + { + MethodBaseName result; + string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty); + result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory); + return result; + } + + private string[] GetTextFiles(MethodBaseName mbn) + { + string[] results; + if (string.IsNullOrEmpty(mbn.TextFileDirectory)) + results = Array.Empty(); + else if (!Directory.Exists(mbn.TextFileDirectory)) + { + results = Array.Empty(); + if (!_HasWaitForProperty) + _ = Directory.CreateDirectory(mbn.TextFileDirectory); + else + { + string renameDirectory = Path.Combine(Path.GetDirectoryName(mbn.TextFileDirectory), $"_Rename - {Path.GetFileName(mbn.TextFileDirectory)}"); + _ = 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 + { + results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly); + if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && results.Length == 0) + { + _ = Process.Start("explorer.exe", mbn.TextFileDirectory); + File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty); + } + } + return results; + } + + 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; + } + + public static CellInstanceVersion GetCellInstanceVersion(string url) + { + CellInstanceVersion result; + byte[] byteArray; + ConfigurationData configurationData; + string decodedCellInstanceConfigurationData; + string xml; + try + { + xml = XDocument.Load(url).ToString(); + } + catch (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.TryGetValue(cellInstanceServiceV2, out cellInstanceVersion)) + { + 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++) + { + 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 (results.Count == 0 || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName))) + throw new Exception("Match not found (check test method name matches Mango)!"); + return results; + } + + protected static int[] GetCellInstanceConnectionNameIndexes(string cellInstanceConnectionName, Dictionary componentModelComponentsIndexes) + { + int[] result; + if (string.IsNullOrEmpty(cellInstanceConnectionName)) + result = componentModelComponentsIndexes.ElementAt(0).Value; + else + { + if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.TryGetValue(cellInstanceConnectionName, out result)) + throw new Exception(); + } + 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 + throw new Exception(); + _ = stringBuilder. + AppendLine("using Adaptation.Shared.Methods;"). + AppendLine("using Microsoft.Extensions.Logging;"). + AppendLine("using Microsoft.VisualStudio.TestTools.UnitTesting;"). + AppendLine("using Adaptation._Tests.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;"); + _ = stringBuilder.AppendLine(). + Append("namespace Adaptation._Tests.").Append(loopName).Append('.').Append(_Environment).Append('.').Append(cellInstanceVersionNameAsCode).AppendLine(";"). + AppendLine(). + AppendLine("[TestClass]"); + if (i == 2) + _ = stringBuilder. + Append("public class ").AppendLine(cellInstanceNameWithoutHyphen). + AppendLine("{"). + AppendLine(). + AppendLine("#pragma warning disable CA2254"). + AppendLine("#pragma warning disable IDE0060"). + 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(). + AppendLine("#pragma warning disable CA2254"). + AppendLine("#pragma warning disable IDE0060"). + AppendLine(). + AppendLine("internal static string DummyRoot { get; private set; }"). + Append("internal static ").Append(cellInstanceNameWithoutHyphen).AppendLine(" EAFLoggingUnitTesting { get; private set; }"); + else + throw new Exception(); + if (i == 2) + _ = stringBuilder.AppendLine(); + else if (i == 1) + _ = stringBuilder. + AppendLine(). + Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Dummy\";"). + AppendLine(). + Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, 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(DummyRoot, 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 not null)"). + AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(\"Cleanup\");"). + AppendLine("if (EAFLoggingUnitTesting is not 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 + check = (from l in componentsCellComponentCellComponent.Equipment.ConnectionSettings.Setting where l.Name == sourceDirectoryCloaking select l.Value).FirstOrDefault(); + if (string.IsNullOrEmpty(check)) + check = componentsCellComponentCellComponent.Equipment.SourceFileFilter; + if (i == 2) + { + _ = stringBuilder. + AppendLine("#if true"). + AppendLine("[Ignore]"). + AppendLine("#endif"). + AppendLine("[TestMethod]"). + Append("public void ").Append(methodName).Append("() => ").Append('_').Append(cellInstanceNameWithoutHyphen).Append('.').Append(methodName).AppendLine("();").AppendLine(); + } + else if (i == 1) + { + if (componentsCellComponentCellComponent.Equipment.EquipmentType.Version != cellInstanceVersionName) + throw new Exception($"Versions should match! {componentsCellComponentCellComponent.Equipment.EquipmentType.Version} != {cellInstanceVersionName}"); + equipmentTypeName = componentsCellComponentCellComponent.Equipment.EquipmentType.Name; + _ = stringBuilder. + AppendLine("#if true"). + AppendLine("[Ignore]"). + AppendLine("#endif"). + AppendLine("[TestMethod]"). + Append("public void ").Append(methodName).AppendLine("()"). + AppendLine("{"). + 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("_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);"). + AppendLine("EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, \" - Exit\"));"). + AppendLine("}"). + AppendLine(); + } + else + throw new Exception(); + } + _ = stringBuilder. + AppendLine("}"). + AppendLine(); + if (i == 2) + extractText = stringBuilder.ToString().Trim(); + else if (i == 1) + createSelfDescriptionText = stringBuilder.ToString().Trim(); + else + throw new Exception(); + _ = stringBuilder.Clear(); + } + if (componentsCellComponentCellComponentEquipmentDictionaryNames.Count != 0 && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy)) + { + 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 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; + result.ErrorTargetFileLocation ??= string.Empty; + result.SourceFileLocation ??= string.Empty; + result.TargetFileLocation ??= string.Empty; + result.FolderAgeCheckIndividualSubFolders ??= false; + result.ConnectionSettings = new List(); + result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList(); + if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null) + { + 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; + else + { + 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.TryGetValue(cellInstanceServiceV2With, out fileConnectorConfiguration)) + { + 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; + } + + protected static EquipmentTypeVersion GetEquipmentTypeVersion(string url) + { + EquipmentTypeVersion result; + byte[] byteArray; + ConfigurationData configurationData; + string decodedCellInstanceConfigurationData; + string xml; + try + { + xml = XDocument.Load(url).ToString(); + } + catch (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.TryGetValue(equipmentTypeServiceV2, out equipmentTypeVersion)) + { + 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.Length == 0 || !(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 + { + equipmentDictionaryName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryName; + equipmentDictionaryVersionName = componentsCellComponentCellComponentEquipment.EquipmentDictionaries.CellEquipmentDictionaryReference.DictionaryVersion; + } + } + results = new string[] { equipmentDictionaryName, equipmentDictionaryVersionName }; + return results; + } + + protected static EquipmentDictionaryVersion GetEquipmentDictionaryVersion(string url) + { + EquipmentDictionaryVersion result; + string xml; + try + { + xml = XDocument.Load(url).ToString(); + } + catch (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; + } + + 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.TryGetValue(equipmentDictionaryServiceV2, out equipmentDictionaryVersion)) + { + 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; + List> collection; + 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.TryGetValue(equipmentDictionaryVersionTuple.Item1, out collection)) + results = collection; + 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, string equipmentDictionaryName, List> equipmentDictionaryIsAlwaysEnabledEvents, int edaConnectionPortNumber) + { + Dictionary results = new() + { + { nameof(System.Environment), _Environment }, + { nameof(HostNameAndPort), _HostNameAndPort }, + { nameof(cellInstanceName), cellInstanceName }, + { nameof(equipmentTypeName), equipmentTypeName }, + { nameof(cellInstanceVersionName), cellInstanceVersionName }, + { nameof(edaConnectionPortNumber), edaConnectionPortNumber }, + { nameof(equipmentDictionaryName), equipmentDictionaryName }, + { nameof(cellInstanceConnectionName), cellInstanceConnectionName }, + { nameof(FileConnectorConfiguration), fileConnectorConfiguration }, + { nameof(IList), modelObjectParameters }, + { nameof(parameterizedModelObjectDefinitionType), parameterizedModelObjectDefinitionType }, + { nameof(equipmentDictionaryIsAlwaysEnabledEvents), equipmentDictionaryIsAlwaysEnabledEvents } + }; + return results; + } + + public (string i, string v, string c, string n, int p, string f) GetCellInstanceVersionCore(string testName) + { + (string, string, string, string, int, string) results; + MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, @"D:\Tmp\Phares"); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + results = new(mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2.CellCommunicatingRule, cellInstanceVersionTuple.Item2.CellNotCommunicatingRule, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber, cellInstanceVersionTuple.Item2.FrozenBy); + return results; + } + + public string[] GetCSharpText(string testName) + { + string[] results; + string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty); + MethodBaseName mbn = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, testName, testResultsDirectory); + FileInfo fileInfo = new(mbn.FileFullName); + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + results = GetCSharpTextB(fileInfo, mbn.CellInstanceName, mbn.CellInstanceVersionName, cellInstanceVersionTuple.Item2); + return results; + } + + public string[] GetConfiguration(MethodBase methodBase) + { + string[] results; + MethodBaseName mbn = GetMethodBaseName(methodBase); + FileInfo fileInfo = new(mbn.FileFullName); + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName); + if (string.IsNullOrEmpty(mbn.Ticks) && fileConnectorConfigurationTuple.Item2?.FileScanningIntervalInSeconds is not null) + { + string fileScanningIntervalInSecondsLine; + string versionDirectory = Path.GetDirectoryName(fileInfo.DirectoryName); + if (fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value < 0) + fileScanningIntervalInSecondsLine = $"-\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:0000}\t{Path.GetFileName(fileInfo.DirectoryName)}"; + else + fileScanningIntervalInSecondsLine = $"+\t{fileConnectorConfigurationTuple.Item2.FileScanningIntervalInSeconds.Value:+0000}\t{Path.GetFileName(fileInfo.DirectoryName)}"; + File.AppendAllLines(Path.Combine(versionDirectory, "FileScanningIntervalInSeconds.txt"), new string[] { fileScanningIntervalInSecondsLine }); + } + Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName); + Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); + Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); + Tuple equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4); + Tuple>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple); + Dictionary objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber); + 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; + MethodBaseName mbn = GetMethodBaseName(methodBase); + FileInfo fileInfo = new(mbn.FileFullName); + Dictionary fileParameter = new(); + if (!string.IsNullOrEmpty(mbn.CellInstanceConnectionName) && !Directory.Exists(fileInfo.DirectoryName)) + _ = Directory.CreateDirectory(fileInfo.Directory.FullName); + Dictionary> dummyRuns = new(); + Dictionary> staticRuns = new(); + Tuple cellInstanceVersionTuple = GetCellInstanceVersionTuple(mbn.CellInstanceName, mbn.CellInstanceVersionName); + Tuple fileConnectorConfigurationTuple = GetFileConnectorConfigurationTuple(cellInstanceVersionTuple, mbn.CellInstanceConnectionName); + Tuple equipmentTypeVersionTuple = GetEquipmentTypeVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName); + Tuple parameterizedModelObjectDefinitionTypeTuple = GetParameterizedModelObjectDefinitionTypeTuple(equipmentTypeVersionTuple); + Tuple> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple); + Tuple equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.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(); + } + if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract))) + { + try + { + if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation)) + { + if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation)) + _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation); + } + if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.SourceFileLocation)) + { + if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.SourceFileLocation)) + _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.SourceFileLocation); + } + if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.TargetFileLocation)) + { + if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.TargetFileLocation)) + _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.TargetFileLocation); + } + if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder)) + { + if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0])) + _ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0]); + } + } + catch (IOException ex) + { + if (!ex.Message.Contains("SMB1")) + throw; + } + } + result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, connectionCount: cellInstanceVersionTuple.Item2.EquipmentConnections.Length); + return result; + } + + public string[] GetVariables(MethodBase methodBase, string check, bool validatePDSF = true) + { + string[] results; + string[] lines; + string ipdsfFile; + string[] segments; + string fileNameWithoutExtension; + string searchPattern = "*.ipdsf"; + string methodBaseNameWithActualCICN; + string sourceFileFilter = string.Empty; + string sourceFileLocation = string.Empty; + MethodBaseName mbn = GetMethodBaseName(methodBase); + string[] textFiles = GetTextFiles(mbn); + if (textFiles.Length == 0) + { + if (_HasWaitForProperty) + throw new Exception("Set text file!"); + sourceFileLocation = mbn.DummyDirectory; + } + 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)) + { + methodBaseNameWithActualCICN = GetMethodBaseNameWithActualCICN(methodBase.Name, mbn.RawCellInstanceName, mbn.CellInstanceConnectionNameFromMethodBaseName, mbn.CellInstanceConnectionName, mbn.Ticks); + segments = lines[0].Split(new string[] { mbn.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].Contains(mbn.Ticks)) + throw new Exception("From source file location path should not contain ticks!"); + if (!segments[1].EndsWith(methodBaseNameWithActualCICN.Replace(mbn.Ticks, string.Empty))) + throw new Exception("Method name missing from source file location!"); + sourceFileLocation = lines[0]; + } + } + FileInfo fileInfo = new(mbn.FileFullName); + 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 (!validatePDSF) + ipdsfFile = string.Empty; + else + { + if (string.IsNullOrEmpty(sourceFileLocation)) + ipdsfFile = searchPattern; + else + { + string ipdsfDirectory = Path.Combine(sourceFileLocation, "ipdsf"); + if (!Directory.Exists(ipdsfDirectory)) + ipdsfFile = searchPattern; + else + { + string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (files.Length != 0) + ipdsfFile = files[0]; + else + ipdsfFile = searchPattern; + } + } + if (ipdsfFile == searchPattern) + throw new Exception(); + } + results = new string[] { fileInfo.FullName, json, fileConnectorConfiguration.SourceFileLocation, fileConnectorConfiguration.SourceFileFilter, ipdsfFile, mbn.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 (validatePDSF && string.IsNullOrEmpty(results[4])) + throw new Exception(); + if (string.IsNullOrEmpty(results[5])) + throw new Exception(); + return results; + } + + 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 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.Length == 0) + _ = Process.Start("explorer.exe", searchDirectory); + Assert.IsTrue(pdsfFiles.Length != 0, "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[] { System.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[] GetItem3(Tuple pdsf, Tuple pdsfNew) + { + string joinOld = string.Join(System.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(System.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); } + catch (Exception) { } + string ticksDirectory = Path.GetDirectoryName(searchDirectory); + try + { Directory.SetLastWriteTime(ticksDirectory, dateTime); } + catch (Exception) { } + string[] directories = Directory.GetDirectories(searchDirectory, "*", SearchOption.TopDirectoryOnly); + foreach (string directory in directories) + { + try + { Directory.SetLastWriteTime(directory, dateTime); } + catch (Exception) { } + } + } + + internal static string GetFileName(MethodBase methodBase) + { + string result; + string connectionName; + string separator = "__"; + string connectionNameAndTicks; + string[] segments = methodBase.Name.Split(new string[] { separator }, 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, separator, rawVersionName, separator, equipmentTypeDirectory, separator); + string after = methodBase.Name.Substring(before.Length); + if (after.Length < ticks.Length) + { + connectionName = after; + } + 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; + } + + internal static void CompareSaveTSV(string textFileDirectory, string[] join) + { + 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]); + } + } + + internal static void CompareSaveJSON(string textFileDirectory, string[] json) + { + 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]); + } + } + + 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); + } + } + + internal static IFileRead GetWriteConfigurationGetFileRead(MethodBase methodBase, string check, AdaptationTesting adaptationTesting) + { + IFileRead result; + string[] fileNameAndJson = adaptationTesting.GetConfiguration(methodBase); + Assert.IsTrue(fileNameAndJson[1].Contains(check)); + File.WriteAllText(fileNameAndJson[0], fileNameAndJson[1]); + result = adaptationTesting.Get(methodBase, sourceFileLocation: string.Empty, sourceFileFilter: string.Empty, useCyclicalForDescription: false); + Assert.IsFalse(string.IsNullOrEmpty(result.CellInstanceConnectionName)); + return result; + } + + internal static string ReExtractCompareUpdatePassDirectory(string[] variables, IFileRead fileRead, Logistics logistics, bool validatePDSF = true) + { + string result; + Tuple> extractResult = fileRead.ReExtract(); + if (extractResult is null) + throw new Exception($"Using pattern {variables[4]} no file was found <{variables[2]}>"); + if (!fileRead.IsDuplicator) + { + Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1)); + Assert.IsNotNull(extractResult.Item3); + Assert.IsNotNull(extractResult.Item4); + if (!validatePDSF) + _ = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, new(string.Empty, Array.Empty(), Array.Empty())); + else + { + Assert.IsTrue(extractResult.Item3.Length > 0, "extractResult Array Length check!"); + Tuple pdsf = GetLogisticsColumnsAndBody(variables[2], variables[4]); + Tuple pdsfNew = GetLogisticsColumnsAndBody(fileRead, logistics, extractResult, pdsf); + CompareSave(variables[5], pdsf, pdsfNew); + Assert.IsTrue(pdsf.Item1 == pdsfNew.Item1, "Item1 check!"); + string[] json = GetItem2(pdsf, pdsfNew); + CompareSaveJSON(variables[5], json); + Assert.IsTrue(json[0] == json[1], "Item2 check!"); + string[] join = GetItem3(pdsf, pdsfNew); + CompareSaveTSV(variables[5], join); + Assert.IsTrue(join[0] == join[1], "Item3 (Join) check!"); + } + UpdatePassDirectory(variables[2]); + } + result = extractResult.Item1; + return result; + } + +} +// namespace Adaptation._Tests.Helpers { public class AdaptationTesting { } } +// 2022-08-05 -> AdaptationTesting \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs new file mode 100644 index 0000000..bc6f20e --- /dev/null +++ b/Adaptation/_Tests/Shared/EAFLoggingUnitTesting.cs @@ -0,0 +1,28 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; + +namespace Adaptation._Tests.Shared; + +public class EAFLoggingUnitTesting : LoggingUnitTesting, IDisposable +{ + + protected readonly AdaptationTesting _AdaptationTesting; + + public AdaptationTesting AdaptationTesting => _AdaptationTesting; + + public EAFLoggingUnitTesting(string dummyRoot, TestContext testContext, Type declaringType, bool skipEquipmentDictionary) : + base(testContext, declaringType) + { + if (testContext is null || declaringType is null) + _AdaptationTesting = null; + else + _AdaptationTesting = new AdaptationTesting(dummyRoot, testContext, skipEquipmentDictionary, _TestContextPropertiesAsJson, _HasWaitForProperty); + } + + public new void Dispose() + { + base.Dispose(); + GC.SuppressFinalize(this); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/IsEnvironment.cs b/Adaptation/_Tests/Shared/IsEnvironment.cs new file mode 100644 index 0000000..fee5113 --- /dev/null +++ b/Adaptation/_Tests/Shared/IsEnvironment.cs @@ -0,0 +1,168 @@ +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; + +namespace Adaptation._Tests.Shared; + +public class IsEnvironment +{ + + public enum Name + { + 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; + 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 + { + 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(); + 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(Windows); + else if (isEnvironment.Linux) + result = nameof(Linux); + else if (isEnvironment.OSX) + result = nameof(OSX); + else + throw new Exception(); + return result; + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/ConsoleLogger.cs b/Adaptation/_Tests/Shared/Log/ConsoleLogger.cs new file mode 100644 index 0000000..8ea4d19 --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/ConsoleLogger.cs @@ -0,0 +1,36 @@ +using Microsoft.Extensions.Logging; +using System; + +namespace Adaptation._Tests.Shared.Log; + +public class ConsoleLogger : ILogger +{ + + public int EventId { get; set; } + + private readonly string _Name; + private readonly LogLevel _LogLevel; + + public ConsoleLogger(LogLevel logLevel, string name) + { + _Name = name; + EventId = 0; + _LogLevel = logLevel; + if (string.IsNullOrEmpty(_Name)) + { } + } + + public IDisposable BeginScope(TState state) => null; + + public bool IsEnabled(LogLevel logLevel) => logLevel >= _LogLevel; + + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + { + if (IsEnabled(logLevel) && (EventId == 0 || EventId == eventId.Id)) + { + string message = formatter(state, null); + Console.WriteLine(message); + } + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/ConsoleProvider.cs b/Adaptation/_Tests/Shared/Log/ConsoleProvider.cs new file mode 100644 index 0000000..94cad4d --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/ConsoleProvider.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Concurrent; + +namespace Adaptation._Tests.Shared.Log; + +public class ConsoleProvider : ILoggerProvider +{ + + private readonly LogLevel _LogLevel; + private readonly ConcurrentDictionary _Loggers; + + public ConsoleProvider(LogLevel logLevel) + { + _LogLevel = logLevel; + _Loggers = new ConcurrentDictionary(); + } + + public ILogger CreateLogger(string categoryName) => _Loggers.GetOrAdd(categoryName, name => new ConsoleLogger(_LogLevel, name)); + + public void Dispose() + { + _Loggers.Clear(); + GC.SuppressFinalize(this); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/DebugLogger.cs b/Adaptation/_Tests/Shared/Log/DebugLogger.cs new file mode 100644 index 0000000..87e312d --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/DebugLogger.cs @@ -0,0 +1,36 @@ +using Microsoft.Extensions.Logging; +using System; + +namespace Adaptation._Tests.Shared.Log; + +public class DebugLogger : ILogger +{ + + public int EventId { get; set; } + + private readonly string _Name; + private readonly LogLevel _LogLevel; + + public DebugLogger(LogLevel logLevel, string name) + { + _Name = name; + EventId = 0; + _LogLevel = logLevel; + if (string.IsNullOrEmpty(_Name)) + { } + } + + public IDisposable BeginScope(TState state) => null; + + public bool IsEnabled(LogLevel logLevel) => logLevel >= _LogLevel; + + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + { + if (IsEnabled(logLevel) && (EventId == 0 || EventId == eventId.Id)) + { + string message = formatter(state, null); + System.Diagnostics.Debug.Print(message); + } + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/DebugProvider.cs b/Adaptation/_Tests/Shared/Log/DebugProvider.cs new file mode 100644 index 0000000..0511f67 --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/DebugProvider.cs @@ -0,0 +1,27 @@ +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Concurrent; + +namespace Adaptation._Tests.Shared.Log; + +public class DebugProvider : ILoggerProvider +{ + + private readonly LogLevel _LogLevel; + private readonly ConcurrentDictionary _Loggers; + + public DebugProvider(LogLevel logLevel) + { + _LogLevel = logLevel; + _Loggers = new ConcurrentDictionary(); + } + + public ILogger CreateLogger(string categoryName) => _Loggers.GetOrAdd(categoryName, name => new DebugLogger(_LogLevel, name)); + + public void Dispose() + { + _Loggers.Clear(); + GC.SuppressFinalize(this); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/FeedbackLogger.cs b/Adaptation/_Tests/Shared/Log/FeedbackLogger.cs new file mode 100644 index 0000000..5a6cabf --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/FeedbackLogger.cs @@ -0,0 +1,49 @@ +using Microsoft.Extensions.Logging; +using System; + +namespace Adaptation._Tests.Shared.Log; + +public class FeedbackLogger : ILogger +{ + + public int EventId { get; set; } + + private readonly string _Name; + private readonly LogLevel _LogLevel; + private readonly IFeedback _Feedback; + + public FeedbackLogger(LogLevel logLevel, IFeedback feedback, string name) + { + _Feedback = feedback; + _Name = name; + EventId = 0; + _LogLevel = logLevel; + if (string.IsNullOrEmpty(_Name)) + { } + } + + public IDisposable BeginScope(TState state) => null; + + public bool IsEnabled(LogLevel logLevel) => logLevel >= _LogLevel; + + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + { + if (IsEnabled(logLevel) && (EventId == 0 || EventId == eventId.Id)) + { + string message = formatter(state, null); + int color = logLevel switch + { + LogLevel.Trace => -1, + LogLevel.Debug => -1, + LogLevel.Information => -16776961, + LogLevel.Warning => -65281, + LogLevel.Error => -65536, + LogLevel.Critical => -65536, + LogLevel.None => -1, + _ => throw new Exception(), + }; + _Feedback.Print(message, color); + } + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/FeedbackProvider.cs b/Adaptation/_Tests/Shared/Log/FeedbackProvider.cs new file mode 100644 index 0000000..f207b9b --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/FeedbackProvider.cs @@ -0,0 +1,29 @@ +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Concurrent; + +namespace Adaptation._Tests.Shared.Log; + +public class FeedbackProvider : ILoggerProvider +{ + + private readonly LogLevel _LogLevel; + private readonly IFeedback _Feedback; + private readonly ConcurrentDictionary _Loggers; + + public FeedbackProvider(LogLevel logLevel, IFeedback feedback) + { + _LogLevel = logLevel; + _Feedback = feedback; + _Loggers = new ConcurrentDictionary(); + } + + public ILogger CreateLogger(string categoryName) => _Loggers.GetOrAdd(categoryName, name => new FeedbackLogger(_LogLevel, _Feedback, name)); + + public void Dispose() + { + _Loggers.Clear(); + GC.SuppressFinalize(this); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/IFeedback.cs b/Adaptation/_Tests/Shared/Log/IFeedback.cs new file mode 100644 index 0000000..9cd7e79 --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/IFeedback.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace Adaptation._Tests.Shared.Log; + +public interface IFeedback +{ + + List Messages { get; } + void Print(string message, int color); + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/Log/Log.cs b/Adaptation/_Tests/Shared/Log/Log.cs new file mode 100644 index 0000000..8a57ac6 --- /dev/null +++ b/Adaptation/_Tests/Shared/Log/Log.cs @@ -0,0 +1,139 @@ +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.IO; + +namespace Adaptation._Tests.Shared.Log; + +public class Log +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private readonly ILogger _Logger; + + public Log(ILogger logger) => _Logger = logger; + + public void Black(object message) => _Logger.LogInformation(message.ToString()); + public void Blue(object message) => _Logger.LogInformation(message.ToString()); + public void Gray(object message) => _Logger.LogInformation(message.ToString()); + public void Green(object message) => _Logger.LogInformation(message.ToString()); + public void Magenta(string message, Exception exception) => _Logger.LogWarning(message, exception); + public void Red(string message, Exception exception) => _Logger.LogError(message, exception); + public void White(object message) => _Logger.LogInformation(message.ToString()); + public void Yellow(string message, Exception exception) => _Logger.LogWarning(message, exception); + + // + + public void DoLog(LogLevel logLevel, EventId eventId, Exception exception, string message, params object[] args) => _Logger.Log(logLevel, eventId, exception, message, args); + public void DoLog(LogLevel logLevel, EventId eventId, string message, params object[] args) => _Logger.Log(logLevel, eventId, message, args); + public void DoLog(LogLevel logLevel, Exception exception, string message, params object[] args) => _Logger.Log(logLevel, exception, message, args); + public void DoLog(LogLevel logLevel, string message, params object[] args) => _Logger.Log(logLevel, message, args); + public void LogCritical(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogCritical(eventId, exception, message, args); + public void LogCritical(EventId eventId, string message, params object[] args) => _Logger.LogCritical(eventId, message, args); + public void LogCritical(Exception exception, string message, params object[] args) => _Logger.LogCritical(exception, message, args); + public void LogCritical(string message, params object[] args) => _Logger.LogCritical(message, args); + public void LogDebug(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogDebug(eventId, exception, message, args); + public void LogDebug(EventId eventId, string message, params object[] args) => _Logger.LogDebug(eventId, message, args); + public void LogDebug(Exception exception, string message, params object[] args) => _Logger.LogDebug(exception, message, args); + public void LogDebug(string message, params object[] args) => _Logger.LogDebug(message, args); + public void LogError(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogError(eventId, exception, message, args); + public void LogError(EventId eventId, string message, params object[] args) => _Logger.LogError(eventId, message, args); + public void LogError(Exception exception, string message, params object[] args) => _Logger.LogError(message, args); + public void LogError(string message, params object[] args) => _Logger.LogError(message, args); + public void LogInformation(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogInformation(eventId, exception, message, args); + public void LogInformation(EventId eventId, string message, params object[] args) => _Logger.LogInformation(eventId, message, args); + public void LogInformation(Exception exception, string message, params object[] args) => _Logger.LogInformation(exception, message, args); + public void LogInformation(string message, params object[] args) => _Logger.LogInformation(message, args); + public void LogTrace(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogTrace(eventId, exception, message, args); + public void LogTrace(EventId eventId, string message, params object[] args) => _Logger.LogTrace(eventId, message, args); + public void LogTrace(Exception exception, string message, params object[] args) => _Logger.LogTrace(exception, message, args); + public void LogTrace(string message, params object[] args) => _Logger.LogTrace(message, args); + public void LogWarning(EventId eventId, Exception exception, string message, params object[] args) => _Logger.LogWarning(eventId, exception, message, args); + public void LogWarning(EventId eventId, string message, params object[] args) => _Logger.LogWarning(eventId, message, args); + public void LogWarning(Exception exception, string message, params object[] args) => _Logger.LogWarning(exception, message, args); + public void LogWarning(string message, params object[] args) => _Logger.LogWarning(message, args); + + // + + public void Debug() => _Logger.LogDebug(string.Empty); + public void Debug(object message) => _Logger.LogDebug(message.ToString()); + public void Debug(string message, Exception exception) => _Logger.LogDebug(exception, message); + public void DebugFormat(IFormatProvider provider, string format, params object[] args) => _Logger.LogDebug(string.Format(provider, format, args)); + public void DebugFormat(string format, object arg0, object arg1, object arg2) => _Logger.LogDebug(string.Format(format, arg0, arg1, arg2)); + public void DebugFormat(string format, object arg0, object arg1) => _Logger.LogDebug(string.Format(format, arg0, arg1)); + public void DebugFormat(string format, object arg0) => _Logger.LogDebug(string.Format(format, arg0)); + public void DebugFormat(string format, params object[] args) => _Logger.LogDebug(string.Format(format, args)); + public void Error(object message) => _Logger.LogError(message.ToString()); + public void Error(string message, Exception exception) => _Logger.LogError(exception, message.ToString()); + public void ErrorFormat(IFormatProvider provider, string format, params object[] args) => _Logger.LogError(string.Format(provider, format, args)); + public void ErrorFormat(string format, object arg0, object arg1, object arg2) => _Logger.LogError(string.Format(format, arg0, arg1, arg2)); + public void ErrorFormat(string format, object arg0, object arg1) => _Logger.LogError(string.Format(format, arg0, arg1)); + public void ErrorFormat(string format, object arg0) => _Logger.LogError(string.Format(format, arg0)); + public void ErrorFormat(string format, params object[] args) => _Logger.LogError(string.Format(format, args)); + public void Fatal(object message) => _Logger.LogCritical(message.ToString()); + public void Fatal(string message, Exception exception) => _Logger.LogCritical(exception, message.ToString()); + public void FatalFormat(IFormatProvider provider, string format, params object[] args) => _Logger.LogCritical(string.Format(provider, format, args)); + public void FatalFormat(string format, object arg0, object arg1, object arg2) => _Logger.LogCritical(string.Format(format, arg0, arg1, arg2)); + public void FatalFormat(string format, object arg0, object arg1) => _Logger.LogCritical(string.Format(format, arg0, arg1)); + public void FatalFormat(string format, object arg0) => _Logger.LogCritical(string.Format(format, arg0)); + public void FatalFormat(string format, params object[] args) => _Logger.LogCritical(string.Format(format, args)); + public void Info(object message) => _Logger.LogInformation(message.ToString()); + public void Info(string message, Exception exception) => _Logger.LogInformation(exception, message.ToString()); + public void InfoFormat(IFormatProvider provider, string format, params object[] args) => _Logger.LogInformation(string.Format(provider, format, args)); + public void InfoFormat(string format, object arg0, object arg1, object arg2) => _Logger.LogInformation(string.Format(format, arg0, arg1, arg2)); + public void InfoFormat(string format, object arg0, object arg1) => _Logger.LogInformation(string.Format(format, arg0, arg1)); + public void InfoFormat(string format, object arg0) => _Logger.LogInformation(string.Format(format, arg0)); + public void InfoFormat(string format, params object[] args) => _Logger.LogInformation(string.Format(format, args)); + public void Warn(object message) => _Logger.LogWarning(message.ToString()); + public void Warn(string message, Exception exception) => _Logger.LogWarning(exception, message.ToString()); + public void WarnFormat(IFormatProvider provider, string format, params object[] args) => _Logger.LogWarning(string.Format(provider, format, args)); + public void WarnFormat(string format, object arg0, object arg1, object arg2) => _Logger.LogWarning(string.Format(format, arg0, arg1, arg2)); + public void WarnFormat(string format, object arg0, object arg1) => _Logger.LogWarning(string.Format(format, arg0, arg1)); + public void WarnFormat(string format, object arg0) => _Logger.LogWarning(string.Format(format, arg0)); + public void WarnFormat(string format, params object[] args) => _Logger.LogWarning(string.Format(format, args)); + + public static string GetWorkingDirectory(string executingAssemblyName, string subDirectoryName) + { + 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(Path.Combine(Environment.GetFolderPath(specialFolder), subDirectoryName, executingAssemblyName)); + foreach (string directory in directories) + { + for (int i = 1; i < 3; i++) + { + if (i == 1) + result = directory; + else + result = string.Concat("D", directory[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; + } + if (string.IsNullOrEmpty(result)) + throw new Exception("Unable to set working directory!"); + return result; + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/LoggingUnitTesting.cs b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs new file mode 100644 index 0000000..9628850 --- /dev/null +++ b/Adaptation/_Tests/Shared/LoggingUnitTesting.cs @@ -0,0 +1,112 @@ +using Adaptation._Tests.Shared.Log; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.IO; + +namespace Adaptation._Tests.Shared; + +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) + { + _LoggerFactory = new LoggerFactory(); + if (testContext is null || declaringType is null || _IsEnvironment is null) + { + _ConfigurationRoot = null; + _DefaultLogLevel = null; + _Log4netProviderLogLevel = null; + } + else + { + 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() + { + _LoggerFactory.Dispose(); + GC.SuppressFinalize(this); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Shared/MethodBaseName.cs b/Adaptation/_Tests/Shared/MethodBaseName.cs new file mode 100644 index 0000000..b14c1f5 --- /dev/null +++ b/Adaptation/_Tests/Shared/MethodBaseName.cs @@ -0,0 +1,45 @@ +namespace Adaptation._Tests.Shared; + +public class MethodBaseName +{ + + public string After { get; private set; } + public string Before { get; private set; } + public string CellInstanceConnectionName { get; private set; } + public string CellInstanceConnectionNameFromMethodBaseName { get; private set; } + public string CellInstanceName { get; private set; } + public string CellInstanceVersionName { get; private set; } + public string Comment { get; private set; } + public string DummyDirectory { get; private set; } + public string FileFullName { get; private set; } + public string RawCellInstanceName { get; private set; } + public string RawVersionName { get; private set; } + public string Separator { get; private set; } + public string TestResultsDirectory { get; private set; } + public string TextFileDirectory { get; private set; } + public string Ticks { get; private set; } + public string VersionDirectory { get; private set; } + public string WithActualCICN { get; private set; } + + public MethodBaseName(string after, string before, string cellInstanceConnectionName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceName, string cellInstanceVersionName, string comment, string dummyDirectory, string fileFullName, string rawCellInstanceName, string rawVersionName, string separator, string testResultsDirectory, string textFileDirectory, string ticks, string versionDirectory, string withActualCICN) + { + After = after; + Before = before; + CellInstanceConnectionName = cellInstanceConnectionName; + CellInstanceConnectionNameFromMethodBaseName = cellInstanceConnectionNameFromMethodBaseName; + CellInstanceName = cellInstanceName; + CellInstanceVersionName = cellInstanceVersionName; + Comment = comment; + DummyDirectory = dummyDirectory; + FileFullName = fileFullName; + RawCellInstanceName = rawCellInstanceName; + RawVersionName = rawVersionName; + Separator = separator; + TestResultsDirectory = testResultsDirectory; + TextFileDirectory = textFileDirectory; + Ticks = ticks; + VersionDirectory = versionDirectory; + WithActualCICN = withActualCICN; + } + +} \ 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 new file mode 100644 index 0000000..77ac5ab --- /dev/null +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/CellInstance.cs @@ -0,0 +1,3058 @@ +using System; + +namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.CellInstance; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] +public partial class CellInstanceVersion +{ + +#pragma warning disable IDE1006 // Naming Styles + + private string createdByField; + + private DateTime creationDateField; + + private object descriptionField; + + private ExtensionsVersionExtension[] extensionsField; + + private DateTime freezeDateField; + + private string frozenByField; + + private long idField; + + private bool isFrozenField; + + private bool isRetiredField; + + private 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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string CreatedBy + { + get => this.createdByField; + set => this.createdByField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime CreationDate + { + get => this.creationDateField; + set => this.creationDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + [System.Xml.Serialization.XmlArrayItem("VersionExtension", IsNullable = false)] + public ExtensionsVersionExtension[] Extensions + { + get => this.extensionsField; + set => this.extensionsField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime FreezeDate + { + get => this.freezeDateField; + set => this.freezeDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime RetireDate + { + get => this.retireDateField; + set => this.retireDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlArrayItem("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt", IsNullable = false)] + public SelectedDeploymentPackage[] DeploymentPackages + { + get => this.deploymentPackagesField; + set => this.deploymentPackagesField = value; + } + + /// + public CellInstanceVersionEdaConnection EdaConnection + { + get => this.edaConnectionField; + set => this.edaConnectionField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItem("EquipmentConnectionSettings", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] + public EquipmentConnectionSettings[] EquipmentConnections + { + get => this.equipmentConnectionsField; + set => this.equipmentConnectionsField = value; + } + + /// + 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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt")] +[System.Xml.Serialization.XmlRoot(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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRoot(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] + public CellType CellType + { + get => this.cellTypeField; + set => this.cellTypeField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances", IsNullable = false)] +public partial class CellType +{ + + private long idField; + + private string nameField; + + private string versionField; + + private string id1Field; + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] + [System.Xml.Serialization.XmlArrayItem("CellComponent", IsNullable = false)] + public ComponentsCellComponent[] Components + { + get => this.componentsField; + set => this.componentsField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +public partial class ComponentsCellComponent +{ + + private ComponentsCellComponentCellComponent[] childrenField; + + private ComponentsCellComponentEquipment equipmentField; + + private object equipmentObjectTypeField; + + private string nameField; + + private ComponentsCellComponentComponentParameter[] parametersField; + + private string typeField; + + private string idField; + + /// + [System.Xml.Serialization.XmlArrayItem("CellComponent", IsNullable = false)] + public ComponentsCellComponentCellComponent[] Children + { + get => this.childrenField; + set => this.childrenField = value; + } + + /// + 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.XmlArrayItem("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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlArrayItem("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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlIgnore()] + public bool DeviceIdSpecified + { + get => this.deviceIdFieldSpecified; + set => this.deviceIdFieldSpecified = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(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.XmlElement(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.XmlIgnore()] + public bool PortSpecified + { + get => this.portFieldSpecified; + set => this.portFieldSpecified = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public CellEquipmentDictionaryReference CellEquipmentDictionaryReference + { + get => this.cellEquipmentDictionaryReferenceField; + set => this.cellEquipmentDictionaryReferenceField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRoot(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute(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.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int CheckInterval + { + get => this.checkIntervalField; + set => this.checkIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int ConnectionTimeout + { + get => this.connectionTimeoutField; + set => this.connectionTimeoutField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long MaxLostPings + { + get => this.maxLostPingsField; + set => this.maxLostPingsField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public string PortName + { + get => this.portNameField; + set => this.portNameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public int PortNumber + { + get => this.portNumberField; + set => this.portNumberField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public string SSLEnabled + { + get => this.sSLEnabledField; + set => this.sSLEnabledField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(IsNullable = true)] + public object TargetHost + { + get => this.targetHostField; + set => this.targetHostField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long MaxParameterCollectionTimeDelta + { + get => this.maxParameterCollectionTimeDeltaField; + set => this.maxParameterCollectionTimeDeltaField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public object MergeStrategyParameters + { + get => this.mergeStrategyParametersField; + set => this.mergeStrategyParametersField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + public long TraceCleanupDaemonInterval + { + get => this.traceCleanupDaemonIntervalField; + set => this.traceCleanupDaemonIntervalField = value; + } + + /// + [System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] + [System.Xml.Serialization.XmlArrayItem("Connection", IsNullable = false)] + public TraceSourcePrimaryPrioritiesConnection[] TraceSourcePrimaryPriorities + { + get => this.traceSourcePrimaryPrioritiesField; + set => this.traceSourcePrimaryPrioritiesField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRoot(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public long Id + { + get => this.idField; + set => this.idField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] + public string Version + { + get => this.versionField; + set => this.versionField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = false)] +public partial class Extensions +{ + + private ExtensionsVersionExtension[] versionExtensionField; + + /// + [System.Xml.Serialization.XmlElement("VersionExtension")] + public ExtensionsVersionExtension[] VersionExtension + { + get => this.versionExtensionField; + set => this.versionExtensionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities.CellInstances")] +[System.Xml.Serialization.XmlRoot(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.XmlElement("CellComponent")] + public ComponentsCellComponent[] CellComponent + { + get => this.cellComponentField; + set => this.cellComponentField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.EDA", IsNullable = false)] +public partial class TraceSourcePrimaryPriorities +{ + + private TraceSourcePrimaryPrioritiesConnection[] connectionField; + + /// + [System.Xml.Serialization.XmlElement("Connection")] + public TraceSourcePrimaryPrioritiesConnection[] Connection + { + get => this.connectionField; + set => this.connectionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.CellInstances")] +[System.Xml.Serialization.XmlRoot(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.XmlElement("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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Ifx.ManagementInterfaceIfx.Common.Connect" + + "ionSettings")] +[System.Xml.Serialization.XmlRoot(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 new file mode 100644 index 0000000..6fe43f6 --- /dev/null +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/ConfigurationData.cs @@ -0,0 +1,23 @@ +using System.Xml.Serialization; + +namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.ConfigurationData; + +[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; } +} \ 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 new file mode 100644 index 0000000..040401c --- /dev/null +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentDictionary.cs @@ -0,0 +1,1302 @@ +using System; + +namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentDictionary; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization", IsNullable = false)] +public partial class EquipmentDictionaryVersion +{ + +#pragma warning disable IDE1006 // Naming Styles + + private EquipmentDictionaryVersionAlarms alarmsField; + + private string createdByField; + + private DateTime creationDateField; + + private EquipmentDictionaryVersionDataItems dataItemsField; + + private string descriptionField; + + private string dictionaryNameField; + + private EquipmentDictionaryVersionEquipmentSettings equipmentSettingsField; + + private EquipmentDictionaryVersionEvents eventsField; + + private DateTime freezeDateField; + + private object frozenByField; + + private bool isFrozenField; + + private bool isRetiredField; + + private string nameField; + + private EquipmentDictionaryVersionObjectTypes objectTypesField; + + private EquipmentDictionaryVersionReports reportsField; + + private DateTime retireDateField; + + private object retiredByField; + + private string schemaVersionField; + + private EquipmentDictionaryVersionValidityMapDataItemToEvent validityMapDataItemToEventField; + + private string idField; + + /// + public EquipmentDictionaryVersionAlarms Alarms + { + get => this.alarmsField; + set => this.alarmsField = value; + } + + /// + public string CreatedBy + { + get => this.createdByField; + set => this.createdByField = value; + } + + /// + public DateTime CreationDate + { + get => this.creationDateField; + set => this.creationDateField = value; + } + + /// + public EquipmentDictionaryVersionDataItems DataItems + { + get => this.dataItemsField; + set => this.dataItemsField = value; + } + + /// + public string Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + public string DictionaryName + { + get => this.dictionaryNameField; + set => this.dictionaryNameField = value; + } + + /// + public EquipmentDictionaryVersionEquipmentSettings EquipmentSettings + { + get => this.equipmentSettingsField; + set => this.equipmentSettingsField = value; + } + + /// + public EquipmentDictionaryVersionEvents Events + { + get => this.eventsField; + set => this.eventsField = value; + } + + /// + public DateTime FreezeDate + { + get => this.freezeDateField; + set => this.freezeDateField = value; + } + + /// + public object FrozenBy + { + get => this.frozenByField; + set => this.frozenByField = value; + } + + /// + public bool IsFrozen + { + get => this.isFrozenField; + set => this.isFrozenField = value; + } + + /// + public bool IsRetired + { + get => this.isRetiredField; + set => this.isRetiredField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public EquipmentDictionaryVersionObjectTypes ObjectTypes + { + get => this.objectTypesField; + set => this.objectTypesField = value; + } + + /// + public EquipmentDictionaryVersionReports Reports + { + get => this.reportsField; + set => this.reportsField = value; + } + + /// + public DateTime RetireDate + { + get => this.retireDateField; + set => this.retireDateField = value; + } + + /// + public object RetiredBy + { + get => this.retiredByField; + set => this.retiredByField = value; + } + + /// + public string SchemaVersion + { + get => this.schemaVersionField; + set => this.schemaVersionField = value; + } + + /// + public EquipmentDictionaryVersionValidityMapDataItemToEvent ValidityMapDataItemToEvent + { + get => this.validityMapDataItemToEventField; + set => this.validityMapDataItemToEventField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionAlarms +{ + + private EquipmentDictionaryVersionAlarmsAlarm[] alarmField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElement("Alarm")] + public EquipmentDictionaryVersionAlarmsAlarm[] Alarm + { + get => this.alarmField; + set => this.alarmField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionAlarmsAlarm +{ + + 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; + } + + /// + public string Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + public bool IsEnabled + { + get => this.isEnabledField; + set => this.isEnabledField = value; + } + + /// + public bool IsVirtual + { + get => this.isVirtualField; + set => this.isVirtualField = value; + } + + /// + [System.Xml.Serialization.XmlIgnore()] + public bool IsVirtualSpecified + { + get => this.isVirtualFieldSpecified; + set => this.isVirtualFieldSpecified = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public object Severity + { + get => this.severityField; + set => this.severityField = value; + } + + /// + public int SourceID + { + get => this.sourceIDField; + set => this.sourceIDField = value; + } + + /// + public object Text + { + get => this.textField; + set => this.textField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionDataItems +{ + + private EquipmentDictionaryVersionDataItemsItem[] itemField; + + private string idField; + + /// + [System.Xml.Serialization.XmlElement("Item")] + public EquipmentDictionaryVersionDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Setting")] + public EquipmentDictionaryVersionEquipmentSettingsSetting[] Setting + { + get => this.settingField; + set => this.settingField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Event")] + public EquipmentDictionaryVersionEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionEventsEventValidDataItems +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Type")] + public EquipmentDictionaryVersionObjectTypesType[] Type + { + get => this.typeField; + set => this.typeField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeAlarms +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Item")] + public EquipmentDictionaryVersionObjectTypesTypeDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Item")] + public EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeDataItemsItemEquipmentDataItemsItem +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Event")] + public EquipmentDictionaryVersionObjectTypesTypeEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeEventsEventEquipmentEventsEvent +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionObjectTypesTypeSettings +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Report")] + public EquipmentDictionaryVersionReportsReport[] Report + { + get => this.reportField; + set => this.reportField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Item")] + public EquipmentDictionaryVersionReportsReportDataItemsItem[] Item + { + get => this.itemField; + set => this.itemField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportDataItemsItem +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement("Event")] + public EquipmentDictionaryVersionReportsReportLinkEventsEvent[] Event + { + get => this.eventField; + set => this.eventField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportLinkEventsEvent +{ + + private string refField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Ref + { + get => this.refField; + set => this.refField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Equipmen" + + "tCharacterization")] +public partial class EquipmentDictionaryVersionReportsReportPreLinkedEvents +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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 new file mode 100644 index 0000000..ae223c9 --- /dev/null +++ b/Adaptation/_Tests/Shared/PasteSpecialXml/EAF XML API/EquipmentType.cs @@ -0,0 +1,964 @@ +using System; + +namespace Adaptation._Tests.Shared.PasteSpecialXml.EAF.XML.API.EquipmentType; + +// NOTE: Generated code may require at least .NET Framework 4.5 or .NET Core/Standard 2.0. +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.FactoryEntities", IsNullable = false)] +public partial class EquipmentTypeVersion +{ + +#pragma warning disable IDE1006 // Naming Styles + + private string createdByField; + + private DateTime creationDateField; + + private object descriptionField; + + private ExtensionsVersionExtension[] extensionsField; + + private DateTime freezeDateField; + + private string frozenByField; + + private byte idField; + + private bool isFrozenField; + + private bool isRetiredField; + + private 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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public string CreatedBy + { + get => this.createdByField; + set => this.createdByField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime CreationDate + { + get => this.creationDateField; + set => this.creationDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + [System.Xml.Serialization.XmlArrayItem("VersionExtension", IsNullable = false)] + public ExtensionsVersionExtension[] Extensions + { + get => this.extensionsField; + set => this.extensionsField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime FreezeDate + { + get => this.freezeDateField; + set => this.freezeDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] + public DateTime RetireDate + { + get => this.retireDateField; + set => this.retireDateField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlArrayItem("SelectedDeploymentPackage", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt", IsNullable = false)] + public SelectedDeploymentPackage[] DeploymentPackages + { + get => this.deploymentPackagesField; + set => this.deploymentPackagesField = value; + } + + /// + public EquipmentTypeVersionDictionaries Dictionaries + { + get => this.dictionariesField; + set => this.dictionariesField = value; + } + + /// + public string Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + public EquipmentTypeVersionParentType ParentType + { + get => this.parentTypeField; + set => this.parentTypeField = value; + } + + /// + [System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + [System.Xml.Serialization.XmlArrayItem("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] + public ParameterizedModelObjectDefinition[] EquipmentComponents + { + get => this.equipmentComponentsField; + set => this.equipmentComponentsField = value; + } + + /// + [System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + [System.Xml.Serialization.XmlArrayItem("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] + public EventActionSequenceDefinition[] EventActionSequences + { + get => this.eventActionSequencesField; + set => this.eventActionSequencesField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + public object FileCommunicatorObjectTypes + { + get => this.fileCommunicatorObjectTypesField; + set => this.fileCommunicatorObjectTypesField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + public FileConfiguration FileConfiguration + { + get => this.fileConfigurationField; + set => this.fileConfigurationField = value; + } + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + public FileHandlerObjectTypes FileHandlerObjectTypes + { + get => this.fileHandlerObjectTypesField; + set => this.fileHandlerObjectTypesField = value; + } + + /// + [System.Xml.Serialization.XmlArray(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] + [System.Xml.Serialization.XmlArrayItem("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation", IsNullable = false)] + public ParameterizedModelObjectDefinition[] TransientEquipmentObjectTypes + { + get => this.transientEquipmentObjectTypesField; + set => this.transientEquipmentObjectTypesField = value; + } + + /// + [System.Xml.Serialization.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.Deployme" + + "nt")] +[System.Xml.Serialization.XmlRoot(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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlElement(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.XmlElement(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.XmlAttribute("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.XmlAttribute()] + public string i___type + { + get => this.i___typeField; + set => this.i___typeField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +[System.Xml.Serialization.XmlRoot(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.XmlArrayItem("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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] +[System.Xml.Serialization.XmlRoot(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.XmlArrayItem("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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public class FileConfiguration +{ + + private string idField; + + /// + [System.Xml.Serialization.XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Namespace = "http://schemas.microsoft.com/2003/10/Serialization/")] + public string Id + { + get => this.idField; + set => this.idField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public class FileHandlerObjectTypes +{ + + private ParameterizedModelObjectDefinition parameterizedModelObjectDefinitionField; + + /// + [System.Xml.Serialization.XmlElement(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public ParameterizedModelObjectDefinition ParameterizedModelObjectDefinition + { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.FactoryE" + + "ntities", IsNullable = false)] +public partial class Extensions +{ + + private ExtensionsVersionExtension[] versionExtensionField; + + /// + [System.Xml.Serialization.XmlElement("VersionExtension")] + public ExtensionsVersionExtension[] VersionExtension + { + get => this.versionExtensionField; + set => this.versionExtensionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class EquipmentComponents +{ + + private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; + + /// + [System.Xml.Serialization.XmlElement("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition + { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class EventActionSequences +{ + + private EventActionSequenceDefinition[] eventActionSequenceDefinitionField; + + /// + [System.Xml.Serialization.XmlElement("EventActionSequenceDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public EventActionSequenceDefinition[] EventActionSequenceDefinition + { + get => this.eventActionSequenceDefinitionField; + set => this.eventActionSequenceDefinitionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(AnonymousType = true, Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes")] +[System.Xml.Serialization.XmlRoot(Namespace = "http://schemas.datacontract.org/2004/07/EafRuntimeIfx.ManagementInterfaceIfx.File" + + "Connector.EquipmentTypes", IsNullable = false)] +public partial class TransientEquipmentObjectTypes +{ + + private ParameterizedModelObjectDefinition[] parameterizedModelObjectDefinitionField; + + /// + [System.Xml.Serialization.XmlElement("ParameterizedModelObjectDefinition", Namespace = "http://schemas.datacontract.org/2004/07/Eaf.Management.ConfigurationData.CellAuto" + + "mation")] + public ParameterizedModelObjectDefinition[] ParameterizedModelObjectDefinition + { + get => this.parameterizedModelObjectDefinitionField; + set => this.parameterizedModelObjectDefinitionField = value; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.Xml.Serialization.XmlElement(IsNullable = true)] + public object Name + { + get => this.nameField; + set => this.nameField = value; + } + + /// + [System.Xml.Serialization.XmlArrayItem("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.XmlAttribute("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; + } +} + +/// +[Serializable()] +[System.ComponentModel.DesignerCategory("code")] +[System.Xml.Serialization.XmlType(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.XmlElement(IsNullable = true)] + public object Category + { + get => this.categoryField; + set => this.categoryField = value; + } + + /// + [System.Xml.Serialization.XmlElement(IsNullable = true)] + public object Description + { + get => this.descriptionField; + set => this.descriptionField = value; + } + + /// + [System.Xml.Serialization.XmlElement(IsNullable = true)] + public object DisplayName + { + get => this.displayNameField; + set => this.displayNameField = value; + } + + /// + [System.Xml.Serialization.XmlElement(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.XmlAttribute("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 new file mode 100644 index 0000000..e4ef794 --- /dev/null +++ b/Adaptation/_Tests/Shared/UnitTesting.cs @@ -0,0 +1,100 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Text; +using System.Text.Json; +using System.Threading; + +namespace Adaptation._Tests.Shared; + +public class UnitTesting +{ + + protected readonly bool _HasWaitForProperty; + protected readonly IsEnvironment _IsEnvironment; + protected readonly string _TestContextPropertiesAsJson; + + public IsEnvironment IsEnvironment => _IsEnvironment; + public bool HasWaitForProperty => _HasWaitForProperty; + public string TestContextPropertiesAsJson => _TestContextPropertiesAsJson; + + public UnitTesting(TestContext testContext, Type declaringType) + { + if (testContext is null || declaringType is null) + _IsEnvironment = null; + else + { + string waitFor = "\"WaitFor\":"; + string projectDirectory = GetProjectDirectory(testContext); + if (string.IsNullOrEmpty(projectDirectory)) + _IsEnvironment = null; + else + { + _TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true }); + _HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor); + string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode"); + if (!Directory.Exists(vsCodeDirectory)) + _ = Directory.CreateDirectory(vsCodeDirectory); + string launchText = GetLaunchText(); + File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText); + if (_HasWaitForProperty) + { + for (int i = 0; i < int.MaxValue; i++) + { + if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached) + break; + Thread.Sleep(500); + } + } + 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); + } + } + _IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached); + } + } + } + + internal static string GetProjectDirectory(TestContext testContext) + { + string result; + string[] checkFiles; + result = Path.GetDirectoryName(testContext.DeploymentDirectory); + for (int i = 0; i < int.MaxValue; i++) + { + if (string.IsNullOrEmpty(result)) + break; + checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly); + if (checkFiles.Length != 0) + break; + result = Path.GetDirectoryName(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\": {Environment.ProcessId}"). + AppendLine(" }"). + AppendLine(" ]"). + AppendLine("}"); + return result.ToString(); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/DEP08SIASM.cs b/Adaptation/_Tests/Static/DEP08SIASM.cs new file mode 100644 index 0000000..5f77159 --- /dev/null +++ b/Adaptation/_Tests/Static/DEP08SIASM.cs @@ -0,0 +1,104 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class DEP08SIASM : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static DEP08SIASM LoggingUnitTesting { get; private set; } + + public DEP08SIASM() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08SIASM(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new DEP08SIASM(testContext); + + [ClassCleanup()] + public static void ClassCleanup() + { + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Dispose(); + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + + [TestMethod] + public void TestDateTime() + { + DateTime dateTime = DateTime.Now; + Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString()); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production() + { + MethodBase methodBase = new StackFrame().GetMethod(); + StringBuilder results = new(); + (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] + { + new("DEP08SIASM", "v2.59.0"), + }; + string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; + Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + foreach ((string cellInstanceName, string cellInstanceVersionName) in collection) + { + cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration"); + _ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}"); + } + string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; + if (!Directory.Exists(sourceDirectory)) + _ = Directory.CreateDirectory(sourceDirectory); + File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString()); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void CellInstanceVersionEdaConnectionPortNumber() + { + MethodBase methodBase = new StackFrame().GetMethod(); + string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; + if (Directory.Exists(sourceDirectory)) + { + string destinationDirectory = Path.Combine(sourceDirectory, "All"); + if (!Directory.Exists(destinationDirectory)) + _ = Directory.CreateDirectory(destinationDirectory); + List lines = new(); + string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly); + foreach (string file in files) + lines.AddRange(File.ReadAllLines(file)); + File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l)); + } + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/EAF.cs b/Adaptation/_Tests/Static/EAF.cs new file mode 100644 index 0000000..69f0190 --- /dev/null +++ b/Adaptation/_Tests/Static/EAF.cs @@ -0,0 +1,210 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Reflection; +using System.Threading.Tasks; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class EAF : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static EAF LoggingUnitTesting { get; private set; } + + internal static AdaptationTesting AdaptationTesting { get; private set; } + + public EAF() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public EAF(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + LoggingUnitTesting ??= new EAF(testContext); + string dummyRoot = string.Empty; + bool skipEquipmentDictionary = true; + AdaptationTesting = new(dummyRoot, testContext, skipEquipmentDictionary, LoggingUnitTesting.TestContextPropertiesAsJson, LoggingUnitTesting.HasWaitForProperty); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Dispose(); + } + + [TestMethod] + public void Production() + { + string testName; + Task task; + string[] segments; + HttpClient httpClient = new(); + MethodBase methodBase = new StackFrame().GetMethod(); + string currentActiveVersionTag = "CurrentActiveVersion>"; + string managementSite = "http://messa08ec.infineon.com:9003/CellInstances/entity/"; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string[] cellInstances = new string[] + { + "BACKLOG-EQPT", + "BACKLOG", + "BIORAD2-EDA", + "BIORAD2", + "BIORAD3-EDA", + "BIORAD3", + "BIORAD4-EDA", + "BIORAD4", + "BIORAD5-EDA", + "BIORAD5", + "CDE2-EDA", + "CDE2", + "CDE3-EDA", + "CDE3-EQPT", + "CDE3", + "CDE4-EDA", + "CDE4-EQPT", + "CDE4", + "CDE5-EDA", + "CDE5-EQPT", + "CDE5", + "CDE6-EDA", + "CDE6-EQPT", + "CDE6", + "DEP08SIASM", + "DEP08SIHTRPLC", + "EC", + "HGCV1-EDA", + "HGCV1-EQPT", + "HGCV1", + "HGCV2-EDA", + "HGCV2-EQPT", + "HGCV2", + "HGCV3-EDA", + "HGCV3-EQPT", + "HGCV3", + "MET08ANLYSDIFAAST230", + "MET08DDUPSFS6420", + "MET08DDUPSP1TBI", + "MET08RESIHGCV", + "MET08RESIMAPCDE", + "MET08RESISRP2100", + "MET08THFTIRQS408M", + "MET08THFTIRSTRATUS", + "R34-EDA", + "R34-EQPT", + "R34", + "R47-PLC-EDA", + "R47-PLC", + "R53-EDA", + "R53-EQPT", + "R53", + "R55-EDA", + "R55-EQPT", + "R55", + "R70-PLC-EDA", + "R70-PLC", + "R72-PLC-EDA", + "R72-PLC", + "R73-PLC-EDA", + "R73-PLC", + "R74-PLC-EDA", + "R74-PLC", + "SP101-EDA", + "SP101-EQPT", + "SP101", + "SPV01-EDA", + "SPV01", + "SRP-EDA", + "SRP-EQPT", + "SRP", + "T21", + "T27-EDA", + "T27", + "TENCOR1-EDA", + "TENCOR1", + "TENCOR2-EDA", + "TENCOR2", + "TENCOR3-EDA", + "TENCOR3", + }; + foreach (string cellInstance in cellInstances.OrderBy(l => l)) + { + if (!cellInstance.Contains('-')) + continue; + task = httpClient.GetStringAsync($"{managementSite}{cellInstance}"); + task.Wait(); + if (task.Result is not string response) + continue; + segments = response.Split(currentActiveVersionTag); + if (segments.Length < 2) + continue; + testName = string.Concat("Production__v", segments[1].Split('<')[0].Replace('.', '_'), "__", cellInstance.Replace('-', '_'), "__"); + (string i, string v, string c, string n, int p, string f) = AdaptationTesting.GetCellInstanceVersionCore(testName); + LoggingUnitTesting.Logger.LogInformation($"{p},{v},{i},{c},{n},{f}"); + } + Assert.IsTrue(true); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} + +// Production - Getting configuration +// 8500,v4.16.0,BIORAD2-EDA,,,messa010ec +// 8501,v4.16.0,BIORAD3-EDA,,,messa010ec +// 8510,v4.16.0,BIORAD4-EDA,,,messa010ec +// 8511,v4.16.0,BIORAD5-EDA,,,messa010ec +// 8520,v4.16.0,CDE2-EDA,,,messa010ec +// 8524,v4.16.0,CDE3-EDA,,,messa010ec +// 8526,v2.49.2,CDE3-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec +// 8524,v4.16.0,CDE4-EDA,,,messa010ec +// 8526,v2.49.2,CDE4-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec +// 8521,v4.16.0,CDE5-EDA,,,messa010ec +// 7589,v2.49.2,CDE5-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec +// 8522,v4.16.0,CDE6-EDA,,,messa010ec +// 7590,v2.49.2,CDE6-EQPT,DownloadRsMFile.Communicating,DownloadRsMFile.NotCommunicating,mestsa06ec +// 8530,v4.16.0,HGCV1-EDA,,,messa010ec +// 8536,v2.12.3,HGCV1-EQPT,,,messa010ec +// 8531,v4.16.0,HGCV2-EDA,,,messa010ec +// 8537,v2.12.3,HGCV2-EQPT,,,messa010ec +// 8532,v4.16.0,HGCV3-EDA,,,messa010ec +// 8538,v2.12.3,HGCV3-EQPT,,,messa010ec +// 8134,v4.16.0,R34-EDA,,,messa010ec +// 8034,v2.43.4,R34-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec +// 553,v2.19.0,R47-PLC,,,messtec102 +// 553,v2.19.0,R47-PLC-EDA,,,messtec102 +// 8153,v4.16.0,R53-EDA,,,messa010ec +// 8653,v2.43.4,R53-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec +// 8155,v4.16.0,R55-EDA,,,messa010ec +// 8655,v2.43.4,R55-EQPT,DownloadJpegFile.Communicating,DownloadJpegFile.NotCommunicating,messa010ec +// 8770,v2.19.0,R70-PLC,,,messtec102 +// 8770,v1.0.1,R70-PLC-EDA,,,messtec102 +// 8772,v2.19.0,R72-PLC,,,messtec102 +// 8772,v1.0.1,R72-PLC-EDA,,,messtec102 +// 8773,v2.19.0,R73-PLC,,,messtec102 +// 8773,v1.0.1,R73-PLC-EDA,,,messtec102 +// 8774,v2.19.0,R74-PLC,,,messtec102 +// 8774,v1.0.1,R74-PLC-EDA,,,messtec102 +// 8550,v4.16.0,SP101-EDA,,,messa010ec +// 8555,v2.49.3,SP101-EQPT,MoveAllFiles.Communicating,MoveAllFiles.NotCommunicating, +// 8569,v4.16.0,SPV01-EDA,,,messa010ec +// 8574,v4.16.0,SRP-EDA,,,messa010ec +// 8572,v2.49.2,SRP-EQPT,csv.Communicating,csv.NotCommunicating,mestsa06ec +// 7627,v4.16.0,T27-EDA,,,messa010ec +// 8540,v4.16.0,TENCOR1-EDA,,,messa010ec +// 8541,v4.16.0,TENCOR2-EDA,,,messa010ec +// 8542,v4.16.0,TENCOR3-EDA,,,messa010ec +// Production - Exit +// Cleanup \ No newline at end of file diff --git a/Adaptation/_Tests/Static/jpeg.cs b/Adaptation/_Tests/Static/jpeg.cs new file mode 100644 index 0000000..2e4e02f --- /dev/null +++ b/Adaptation/_Tests/Static/jpeg.cs @@ -0,0 +1,131 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class JPEG : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static JPEG LoggingUnitTesting { get; private set; } + + public JPEG() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public JPEG(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new JPEG(testContext); + + [ClassCleanup()] + public static void ClassCleanup() + { + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Dispose(); + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void TestDescriptor() + { + MethodBase methodBase = new StackFrame().GetMethod(); + string fileName = "D:/Tmp/phares/R53-EQPT_638005905604624544 - Run Wafer.jpeg"; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + // (float pageMeanConfidence, string text, List blocks) = FileHandlers.jpeg.ProcessData.Parse(fileName, new(), 0, 0, 0, 0, 0, 0); + List<(float pageMeanConfidence, string text, List blocks)> collection = FileHandlers.jpeg.ProcessData.Parse(fileName); + Assert.IsTrue(collection.Count != 0); + foreach ((float pageMeanConfidence, string text, List blocks) in collection) + { + Assert.IsTrue(pageMeanConfidence > 0); + Assert.IsTrue(!string.IsNullOrEmpty(text)); + Assert.IsTrue(blocks.Count != 0); + // Normal images + // "RECIPE:\nte end\nte a ee)\nAcne\n" + // Grayscale + // "RECIPE:\nEee en\nRECIPE e943\n\ncera ke\n" + // Grayscale Inverted + // "RECIPE:\nOT6_10PH. 60.3.0\nRECIPE e943\nASgMe\n" + // BW + // "RECIPE\nCTG.}0PH. 60.3.0\nRECIPE #943\nAGM e\n" + } + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +#if DEBUG + [Ignore] +#endif + [TestMethod] + public void Production() + { + MethodBase methodBase = new StackFrame().GetMethod(); + StringBuilder results = new(); + (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] + { + new("R34", "v2.59.0"), + new("R53", "v2.59.0"), + new("R55", "v2.59.0"), + new("R34-EQPT", "v2.59.0"), + new("R53-EQPT", "v2.59.0"), + new("R55-EQPT", "v2.59.0"), + }; + string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; + Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + foreach ((string cellInstanceName, string cellInstanceVersionName) in collection) + { + cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration"); + _ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}"); + } + string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; + if (!Directory.Exists(sourceDirectory)) + _ = Directory.CreateDirectory(sourceDirectory); + File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString()); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [TestMethod] + public void CellInstanceVersionEdaConnectionPortNumber() + { + MethodBase methodBase = new StackFrame().GetMethod(); + string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber"; + if (Directory.Exists(sourceDirectory)) + { + string destinationDirectory = Path.Combine(sourceDirectory, "All"); + if (!Directory.Exists(destinationDirectory)) + _ = Directory.CreateDirectory(destinationDirectory); + List lines = new(); + string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly); + foreach (string file in files) + lines.AddRange(File.ReadAllLines(file)); + File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l)); + } + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + NonThrowTryCatch(); + } + +} \ No newline at end of file diff --git a/Adaptation/_Tests/Static/xml.cs b/Adaptation/_Tests/Static/xml.cs new file mode 100644 index 0000000..750fc29 --- /dev/null +++ b/Adaptation/_Tests/Static/xml.cs @@ -0,0 +1,68 @@ +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; +using System.Text; + +namespace Adaptation._Tests.Static; + +[TestClass] +public class XML : LoggingUnitTesting, IDisposable +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static XML LoggingUnitTesting { get; private set; } + + public XML() : base(testContext: null, declaringType: null) + { + if (LoggingUnitTesting is null) + throw new Exception(); + } + + public XML(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType) + { } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new XML(testContext); + + [ClassCleanup()] + public static void ClassCleanup() + { + LoggingUnitTesting?.Logger?.LogInformation("Cleanup"); + LoggingUnitTesting?.Dispose(); + } + + [TestMethod] + public void TestXmlBuild() + { + MethodBase methodBase = new StackFrame().GetMethod(); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + string key; + string value; + int counter = 500; + StringBuilder stringBuilder = new(); + string a = "0CellInstance.R"; + string f = ""; + string h = "String"; + int[] reactors = new int[] { 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 70, 72, 73, 74, 75, 77, 79 }; + foreach (int reactor in reactors) + { + for (int i = 1; i < 4; i++) + { + counter += 1; + key = i switch { 1 => ".Alias", 2 => "-EQPT.Alias", 3 => "-EQPT.StaticFileServer", _ => throw new Exception() }; + value = i switch { 1 or 2 => $"R{reactor}", 3 => "10.95.154.##", _ => throw new Exception() }; + _ = stringBuilder.Append(a).Append(counter).Append(c).Append(reactor).Append(key).Append(f).Append(value).AppendLine(h); + } + } + System.IO.File.WriteAllText(@"D:\Tmp\Phares\a.xml", stringBuilder.ToString()); + Assert.IsTrue(true); + LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} \ No newline at end of file diff --git a/Adaptation/appsettings.Development.json b/Adaptation/appsettings.Development.json new file mode 100644 index 0000000..8630239 --- /dev/null +++ b/Adaptation/appsettings.Development.json @@ -0,0 +1,139 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "Microsoft": "Warning", + "Log4netProvider": "Debug", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Company": "Infineon Technologies Americas Corp.", + "Drives": [ + { + "Use": false, + "Letter": "a", + "Share": "Floppy Disk", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "c", + "Share": "SYSTEM", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "d", + "Share": "DATA", + "User": "", + "Password": "" + }, + { + "Use": true, + "Letter": "g", + "Share": "\\\\10.95.154.12\\testdata", + "User": "10.95.154.12\\Manager", + "Password": "D6QDJ5g6vjqnNyyRbfbj+g==" + }, + { + "Use": false, + "Letter": "h", + "Share": "\\\\10.95.154.13\\COM 5", + "User": "10.95.154.13\\user", + "Password": "tVyC7uPHtScZR8NLInSaxQ==" + }, + { + "Use": false, + "Letter": "i", + "Share": "\\\\messdv002.na.infineon.com\\Candela", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "j", + "Share": "\\\\messdv002.na.infineon.com\\Characterization", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "k", + "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "l", + "Share": "TFS", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "m", + "Share": "\\\\messdv002.na.infineon.com\\MOCVD", + "User": "EC\\ECMESEAF", + "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" + }, + { + "Use": false, + "Letter": "n", + "Share": "\\\\10.95.154.22\\C", + "User": "10.95.154.22\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "o", + "Share": "\\\\10.95.154.16\\Aixtron", + "User": "10.95.154.16\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "p", + "Share": "\\\\10.95.154.15\\Aixtron", + "User": "10.95.154.15\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "q", + "Share": "\\\\10.95.154.21\\Data", + "User": "10.95.154.21\\XRD04Admin", + "Password": "v1NOsEOCvbnhzKabspPcCQ==" + }, + { + "Use": false, + "Letter": "r", + "Share": "\\\\10.95.154.23\\Data", + "User": "\"10.95.154.23\\infineon us\"", + "Password": "rzXkXdHKetDfsukhZKW0yA==" + }, + { + "Use": false, + "Letter": "s", + "Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository", + "User": "EC\\ECMESEAF", + "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" + }, + { + "Use": false, + "Letter": "t", + "Share": "\\\\messv02ecc1.ec.local\\EC_EDA", + "User": "EC\\ECEDASvc", + "Password": "IKsJmRVUH3xlv+RRELRbwoXYKwLvF4Re7k1Rigzpwf4=" + }, + { + "Use": false, + "Letter": "z", + "Share": "DVD Drive", + "User": "", + "Password": "" + } + ] +} \ No newline at end of file diff --git a/Adaptation/appsettings.json b/Adaptation/appsettings.json new file mode 100644 index 0000000..842b156 --- /dev/null +++ b/Adaptation/appsettings.json @@ -0,0 +1,139 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Log4netProvider": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Company": "Infineon Technologies Americas Corp.", + "Drives": [ + { + "Use": false, + "Letter": "a", + "Share": "Floppy Disk", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "c", + "Share": "SYSTEM", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "d", + "Share": "DATA", + "User": "", + "Password": "" + }, + { + "Use": true, + "Letter": "g", + "Share": "\\\\10.95.154.12\\testdata", + "User": "10.95.154.12\\Manager", + "Password": "D6QDJ5g6vjqnNyyRbfbj+g==" + }, + { + "Use": false, + "Letter": "h", + "Share": "\\\\10.95.154.13\\COM 5", + "User": "10.95.154.13\\user", + "Password": "tVyC7uPHtScZR8NLInSaxQ==" + }, + { + "Use": false, + "Letter": "i", + "Share": "\\\\messdv002.na.infineon.com\\Candela", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "j", + "Share": "\\\\messdv002.na.infineon.com\\Characterization", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "k", + "Share": "\\\\messdv002.na.infineon.com\\GaN_NEC\\Characterization", + "User": "INFINEON\\MESGaNEAF", + "Password": "tLIPgqM6R9hVQOteRnTHwPqIg3Zxv8CohTjFkjkFz8k=" + }, + { + "Use": false, + "Letter": "l", + "Share": "TFS", + "User": "", + "Password": "" + }, + { + "Use": false, + "Letter": "m", + "Share": "\\\\messdv002.na.infineon.com\\MOCVD", + "User": "EC\\ECMESEAF", + "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" + }, + { + "Use": false, + "Letter": "n", + "Share": "\\\\10.95.154.22\\C", + "User": "10.95.154.22\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "o", + "Share": "\\\\10.95.154.16\\Aixtron", + "User": "10.95.154.16\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "p", + "Share": "\\\\10.95.154.15\\Aixtron", + "User": "10.95.154.15\\Aixtron", + "Password": "DYVBOr2HJdB7KOhd/IFhLA==" + }, + { + "Use": false, + "Letter": "q", + "Share": "\\\\10.95.154.21\\Data", + "User": "10.95.154.21\\XRD04Admin", + "Password": "v1NOsEOCvbnhzKabspPcCQ==" + }, + { + "Use": false, + "Letter": "r", + "Share": "\\\\10.95.154.23\\Data", + "User": "\"10.95.154.23\\infineon us\"", + "Password": "rzXkXdHKetDfsukhZKW0yA==" + }, + { + "Use": false, + "Letter": "s", + "Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository", + "User": "EC\\ECMESEAF", + "Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00=" + }, + { + "Use": false, + "Letter": "t", + "Share": "\\\\messv02ecc1.ec.local\\EC_EDA", + "User": "EC\\ECEDASvc", + "Password": "IKsJmRVUH3xlv+RRELRbwoXYKwLvF4Re7k1Rigzpwf4=" + }, + { + "Use": false, + "Letter": "z", + "Share": "DVD Drive", + "User": "", + "Password": "" + } + ] +} \ No newline at end of file diff --git a/Adaptation/package.json b/Adaptation/package.json new file mode 100644 index 0000000..925f772 --- /dev/null +++ b/Adaptation/package.json @@ -0,0 +1,17 @@ +{ + "scripts": { + "AA-CreateSelfDescription.Staging.v2_43_4-R34_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~R34_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "AB-CreateSelfDescription.Staging.v2_43_4-R36_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~R36_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BA-CreateSelfDescription.Staging.v2_43_4-R34": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~R34\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "BB-CreateSelfDescription.Staging.v2_43_4-R36": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~R36\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "CA-CreateSelfDescription.Staging.v2_43_4-DEP08SIASM": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4 & ClassName~DEP08SIASM\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "DA-CreateSelfDescription.Staging.v2_43_4": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_4\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "EA-Extract.Staging.v2_43_4-R34_EQPT-Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34_EQPT & Name~Staging__v2_43_4__R34_EQPT__DownloadJpegFile637812143477007703__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "FA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__R34__jpeg638000598531758005__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~R34 & Name~Staging__v2_43_4__R34__jpeg638000598531758005__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "GA-Extract.Staging.v2_43_4-R34-Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_4 & ClassName~DEP08SIASM & Name~Staging__v2_43_4__DEP08SIASM__DEP08SIASM__637825304581476827__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", + "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "kanbn.board": "kanbn board", + "kanbn.board.json": "kanbn board -j > .kanbn/board.json", + "garbage-collect": "git gc" + } +} \ No newline at end of file diff --git a/Adaptation/tessdata/pdf.ttf b/Adaptation/tessdata/pdf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8affa23180a49f38ab66b095fabce1c299a7ee93 GIT binary patch literal 572 zcmZvZy-&hW6vatL3k^UTBN(viM>`eg?ePlGw&*=+_-+Ro zRLNtqb>6->Tix6*lJCfCP0u||S6UC;-*8l$bY%5ND!y|Rn|^=5m8M;CO18s>i>%^X zVc#8eU?RbIifje0?|pvcU&+tpgHG7%L*oa1UE;EnalbKkj+b`7%mtAFPuEc(>&wtO zl+}dtFGCliQIo=C5<|qesuW{9t5cY7P9t*CycraY<*xr*g2KNd$*tAvHS8&srtZMR zk;2(DFVv@na{MP^IV9t*%?^+rDvf$6v+Tl3!9*0l+rT#CqD>(GlgWLCWI!_)r+x<> ey6B;W5CJUMD530l-CipUEW1?x-KF_kvhX*R@Hw6U literal 0 HcmV?d00001 diff --git a/DEP08SIASM.csproj b/DEP08SIASM.csproj new file mode 100644 index 0000000..abc05b1 --- /dev/null +++ b/DEP08SIASM.csproj @@ -0,0 +1,172 @@ + + + + + Debug + AnyCPU + {435F7498-2A8A-4D9C-A932-8437C87F7220} + 10.0 + Library + Properties + DEP08SIASM + DEP08SIASM + v4.8 + win-x86 + win + 512 + + + SAK + SAK + SAK + SAK + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + NETFRAMEWORK;NET20;NET35;NET40;NET45;NET451;NET452;NET46;NET461;NET462;NET47;NET471;NET472;NET48;$(DefineConstants) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Component + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4.7.0 + + + 2.59.0 + + + 1.6.1 + + + 8.0.3 + + + 4.1.1 + + + + \ No newline at end of file diff --git a/FileHandlers/FileRead.cs b/FileHandlers/FileRead.cs new file mode 100644 index 0000000..0fad30a --- /dev/null +++ b/FileHandlers/FileRead.cs @@ -0,0 +1,355 @@ +using Adaptation.Eaf.Management.ConfigurationData.CellAutomation; +using Adaptation.FileHandlers; +using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Eaf.Core; +using Eaf.Core.Smtp; +using Eaf.EquipmentCore.DataCollection.Reporting; +using Eaf.EquipmentCore.SelfDescription.ElementDescription; +using Eaf.EquipmentCore.SelfDescription.EquipmentStructure; +using Eaf.EquipmentCore.SelfDescription.ParameterTypes; +using Ifx.Eaf.EquipmentConnector.File.Component.Reader; +using Ifx.Eaf.EquipmentConnector.File.SelfDescription; +using log4net; +using Shared; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading; + +namespace DEP08SIASM.FileHandlers; + +public partial class FileRead : FileReaderHandler, ISMTP +{ + + private readonly ILog _Log; + private IFileRead _FileRead; + private EquipmentEvent _EquipmentEvent; + private readonly bool _UseCyclicalForDescription; + private FilePathGenerator _FilePathGeneratorForError; + private FilePathGenerator _FilePathGeneratorForTarget; + private readonly List _EquipmentParameters; + private static readonly Dictionary> _DummyRuns; + private static readonly Dictionary> _StaticRuns; + + static FileRead() + { + _DummyRuns = new(); + _StaticRuns = new(); + } + + public FileRead() + { + if (FileParameter is null) + FileParameter = new Dictionary(); + _FileRead = null; + _UseCyclicalForDescription = false; + _Log = LogManager.GetLogger(typeof(FileRead)); + _EquipmentParameters = new List(); + } + + public override void CreateSelfDescription() + { + MethodBase methodBase = new StackFrame().GetMethod(); + _Log.Debug(string.Concat(methodBase.Name, " - Entry")); + try + { + if (Equipment is null) + throw new Exception(); + CreateSelfDescription(methodBase); + _Log.Debug(string.Concat(methodBase.Name, " - Try - Exit")); + } + catch (Exception ex) + { + _Log.Error(string.Concat(methodBase.Name, " - Catch - Entry {", ex.Message, "}", Environment.NewLine, Environment.NewLine, ex.StackTrace)); + long breakAfter = DateTime.Now.AddSeconds(30).Ticks; + for (short i = 0; i < short.MaxValue; i++) + { + if (DateTime.Now.Ticks > breakAfter) + break; + Thread.Sleep(500); + } + throw; + } + } + + public override bool Extract(string reportFullPath, string eventName) + { + MethodBase methodBase = new StackFrame().GetMethod(); + _Log.Debug(string.Concat(methodBase.Name, " - Entry - {", reportFullPath, "}")); + Tuple> extractResults = null; + try + { + extractResults = _FileRead.GetExtractResult(reportFullPath, eventName); + TriggerEvents(extractResults); + _FileRead.Move(extractResults); + FilePathGeneratorInfoMove(extractResults); + _FileRead.WaitForThread(); + _Log.Debug(string.Concat(methodBase.Name, " - Try - Exit")); + return true; + } + catch (Exception ex) + { + _Log.Error(string.Concat(methodBase.Name, " - Catch - Entry {", ex.Message, "}", Environment.NewLine, Environment.NewLine, ex.StackTrace)); + _FileRead.Move(extractResults, exception: ex); + FilePathGeneratorInfoMove(extractResults, exception: ex); + return false; + } + } + + private void Send(EmailMessage emailMessage) + { + ISmtp smtp = Backbone.Instance.GetBackboneComponentsOfType().SingleOrDefault(); + if (smtp is not null) + smtp.Send(emailMessage); + } + + void ISMTP.SendLowPriorityEmailMessage(string subject, string body) + { + EmailMessage emailMessage = new(subject, body, MailPriority.Low); + Send(emailMessage); + } + + void ISMTP.SendHighPriorityEmailMessage(string subject, string body) + { + EmailMessage emailMessage = new(subject, body, MailPriority.High); + Send(emailMessage); + } + + void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) + { + EmailMessage emailMessage = new(subject, body, MailPriority.Normal); + Send(emailMessage); + } + + private void AddParameterRangeAndEvent() + { + string description; + bool allowNull = false; + EquipmentParameter equipmentParameter; + JsonProperty[] jsonProperties = _FileRead.GetDefault(); + Dictionary keyValuePairs = _FileRead.GetDisplayNamesJsonElement(); + Dictionary parameterTypeDefinitions = new(); + FileConnectorParameterTypeDefinitionProvider fileConnectorParameterTypeDefinitionProvider = new(); + foreach (ParameterTypeDefinition parameterTypeDefinition in fileConnectorParameterTypeDefinitionProvider.GetAllParameterTypeDefinition()) + { + switch (parameterTypeDefinition.Name) + { + case nameof(String): + parameterTypeDefinitions.Add(JsonValueKind.String, parameterTypeDefinition); + break; + case nameof(Double): + parameterTypeDefinitions.Add(JsonValueKind.Number, parameterTypeDefinition); + break; + case nameof(Boolean): + parameterTypeDefinitions.Add(JsonValueKind.True, parameterTypeDefinition); + parameterTypeDefinitions.Add(JsonValueKind.False, parameterTypeDefinition); + break; + default: + break; + } + } + foreach (JsonProperty jsonProperty in jsonProperties) + { + if (jsonProperty.Value.ValueKind == JsonValueKind.Object && !parameterTypeDefinitions.ContainsKey(JsonValueKind.Object)) + { + StructuredType structuredType = new(nameof(StructuredType), string.Empty, new List()); + parameterTypeDefinitions.Add(JsonValueKind.Object, structuredType); + Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType); + } + if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind)) + throw new Exception(string.Concat('<', jsonProperty.Name, "> {", jsonProperty.Value.ValueKind, "} is not mapped!")); + } + foreach (JsonProperty jsonProperty in jsonProperties) + { + if (jsonProperty.Value.ValueKind == JsonValueKind.Null && !allowNull) + throw new Exception(); + if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name)) + description = string.Empty; + else + description = keyValuePairs[jsonProperty.Name].Split('|')[0]; + equipmentParameter = new EquipmentParameter(jsonProperty.Name, parameterTypeDefinitions[jsonProperty.Value.ValueKind], description); + _EquipmentParameters.Add(equipmentParameter); + } + _ = Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddParameterRange(_EquipmentParameters); + _EquipmentEvent = new EquipmentEvent(_FileRead.EventName, _FileRead.GetEventDescription(), _EquipmentParameters); + _ = Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.AddEvent(_EquipmentEvent); + } + + private void CreateSelfDescription(MethodBase methodBase) + { + string cellInstanceName; + string equipmentTypeName = string.Empty; + string equipmentDictionaryName = string.Empty; + EquipmentElement equipmentElement = Equipment.SelfDescriptionBuilder.RootEquipmentElementBuilder.Item; + if (Backbone.Instance?.CellName is null) + cellInstanceName = string.Empty; + else + cellInstanceName = Backbone.Instance.CellName; + string cellInstanceConnectionName = equipmentElement.Name; + FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration); + string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName; + IList modelObjectParameters = Mapper.Map(ConfiguredParameters); + _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null); + if (_FileRead.IsEvent) + AddParameterRangeAndEvent(); + } + + private object GetFilePathGeneratorInfo(string reportFullPath, bool isErrorFile) + { + FilePathGeneratorInfo result; + FilePathGenerator filePathGeneratorOriginal; + if (Configuration is null) + result = null; + else + { + if (isErrorFile) + { + if (_FilePathGeneratorForError is null) + _FilePathGeneratorForError = new FilePathGenerator(Configuration, reportFullPath, isErrorFile: true); + filePathGeneratorOriginal = _FilePathGeneratorForError; + } + else + { + if (_FilePathGeneratorForTarget is null) + _FilePathGeneratorForTarget = new FilePathGenerator(Configuration, reportFullPath, isErrorFile: false); + filePathGeneratorOriginal = _FilePathGeneratorForTarget; + } + result = new FilePathGeneratorInfo(filePathGeneratorOriginal, reportFullPath, isErrorFile, FileParameter); + } + return result; + } + + private void FilePathGeneratorInfoMove(Tuple> extractResults, Exception exception = null) + { + bool isErrorFile = exception is not null; + object filePathGeneratorInfo = GetFilePathGeneratorInfo(_FileRead.ReportFullPath, isErrorFile); + if (filePathGeneratorInfo is not null and FilePathGeneratorInfo filePathGenerator) + { + string[] exceptionLines = _FileRead.Move(extractResults, filePathGenerator.To, filePathGenerator.From, filePathGenerator.ResolvedFileLocation, exception); + if (isErrorFile) + { + try + { + StringBuilder stringBuilder = new(); + foreach (string item in exceptionLines) + _ = stringBuilder.Append("<").Append(item).AppendLine(">"); + ISmtp smtp = Backbone.Instance.GetBackboneComponentsOfType().SingleOrDefault(); + EmailMessage emailMessage = new(_FileRead.ExceptionSubject, stringBuilder.ToString(), MailPriority.High); + smtp.Send(emailMessage); + } + catch (Exception) { } + } + } + } + + private List GetParameterValues(List headerNames, JsonElement[] jsonElements, int i) + { + List results = new(); + if (_UseCyclicalForDescription && i > 0) + throw new Exception(); + object value; + List list; + JsonProperty[] jsonProperties = jsonElements[i].EnumerateObject().ToArray(); + if (jsonProperties.Length != _EquipmentParameters.Count) + throw new Exception(); + for (int p = 0; p < jsonProperties.Length; p++) + { + if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperties[p].Name)) + value = jsonProperties[p].Value.ToString(); + else + { + list = new List(); + for (int z = 0; z < jsonElements.Length; z++) + list.Add(new object[] { z, jsonElements[z].GetProperty(jsonProperties[p].Name).ToString() }); + value = list; + } + results.Add(new ParameterValue(_EquipmentParameters[p], value, DateTime.Now)); + } + return results; + } + + private void TriggerEvents(Tuple> extractResults) + { + List headerNames; + List parameters; + if (!_UseCyclicalForDescription) + headerNames = null; + else + headerNames = _FileRead.GetHeaderNames(); + for (int i = 0; i < extractResults.Item3.Length; i++) + { + if (_EquipmentEvent is not null) + { + _Log.Debug(string.Concat("TriggerEvent - {", _FileRead.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length)); + parameters = GetParameterValues(headerNames, extractResults.Item3, i); + if (_EquipmentEvent is not null) + Equipment.DataCollection.TriggerEvent(_EquipmentEvent, parameters); + if (_UseCyclicalForDescription) + break; + } + } + } + + public Tuple> ReExtract(string json) + { + Tuple> results; + string cellInstanceName; + if (!json.Contains(nameof(cellInstanceName))) + throw new Exception(); + string equipmentTypeName; + if (!json.Contains(nameof(equipmentTypeName))) + throw new Exception(); + string equipmentDictionaryName; + if (!json.Contains(nameof(equipmentDictionaryName))) + throw new Exception(); + string cellInstanceConnectionName; + if (!json.Contains(nameof(cellInstanceConnectionName))) + throw new Exception(); + if (!json.Contains(nameof(FileConnectorConfiguration))) + throw new Exception(); + if (!json.Contains(nameof(IList))) + throw new Exception(); + string parameterizedModelObjectDefinitionType; + if (!json.Contains(nameof(parameterizedModelObjectDefinitionType))) + throw new Exception(); + Dictionary> dummyRuns = new(); + Dictionary fileParameter = new(); + MethodBase methodBase = new StackFrame().GetMethod(); + JsonElement jsonElement = JsonSerializer.Deserialize(json); + cellInstanceName = jsonElement.GetProperty(nameof(cellInstanceName)).ToString(); + equipmentTypeName = jsonElement.GetProperty(nameof(equipmentTypeName)).ToString(); + equipmentDictionaryName = jsonElement.GetProperty(nameof(equipmentDictionaryName)).ToString(); + cellInstanceConnectionName = jsonElement.GetProperty(nameof(cellInstanceConnectionName)).ToString(); + JsonElement fileConnectorConfigurationJsonElement = jsonElement.GetProperty(nameof(FileConnectorConfiguration)); + parameterizedModelObjectDefinitionType = jsonElement.GetProperty(nameof(parameterizedModelObjectDefinitionType)).ToString(); + if (fileConnectorConfigurationJsonElement.ValueKind != JsonValueKind.Object) + throw new Exception(); + JsonSerializerOptions jsonSerializerOptions = new() { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; + FileConnectorConfiguration fileConnectorConfiguration = JsonSerializer.Deserialize(fileConnectorConfigurationJsonElement.ToString(), jsonSerializerOptions); + JsonElement modelObjectParameterDefinitionJsonElement = jsonElement.GetProperty(nameof(IList)); + if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array) + throw new Exception(); + IList modelObjectParameters = JsonSerializer.Deserialize>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions); + _FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null); + results = _FileRead.ReExtract(); + if (results?.Item2 is null) + throw new Exception(); + else + { + TriggerEvents(results); + _FileRead.Move(results); + FilePathGeneratorInfoMove(results); + } + return results; + } + +} +// 2022-02-15 -> FileRead \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..dd38ed1 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DEP08SIASM")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Infineon Technologies")] +[assembly: AssemblyProduct("DEP08SIASM")] +[assembly: AssemblyCopyright("Copyright © Infineon Technologies 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("435f7498-2a8a-4d9c-a932-8437c87f7220")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.59.0.0")] +[assembly: AssemblyFileVersion("2.59.0.0")] diff --git a/README.md b/README.md index 0ca446a..39aede4 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # Introduction -TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. +DEP08SIASM EAF adaptation # Getting Started -TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: -1. Installation process -2. Software dependencies -3. Latest releases -4. API references +1. Framework - DEP08SIASM.csproj +2. dotnet core - Adaptation\DEP08SIASM.Tests.csproj +3. https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json +4. https://packagemanagement.eu.infineon.com:4430/packages # Build and Test -TODO: Describe and show how to build your code and run the tests. +See Adaptation\_Tests for dotnet core tests -# Contribute -TODO: Explain how other users and developers can contribute to make your code better. +# TFS +$/MIT_EAF_Adaptations/Trunk/DEP08SIASM/06_SourceCode -If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: -- [ASP.NET Core](https://github.com/aspnet/Home) -- [Visual Studio Code](https://github.com/Microsoft/vscode) -- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file +# Last TFS Changeset +N/A + +# Git +git@tfs.intra.infineon.com:22/tfs/ManufacturingIT/Mesa_FI/_git/DEP08SIASM diff --git a/Shared/FilePathGenerator.cs b/Shared/FilePathGenerator.cs new file mode 100644 index 0000000..490ca8c --- /dev/null +++ b/Shared/FilePathGenerator.cs @@ -0,0 +1,20 @@ +using Ifx.Eaf.EquipmentConnector.File.Component; +using Ifx.Eaf.EquipmentConnector.File.Configuration; +using System.Collections.Generic; + +namespace Shared; + +public class FilePathGenerator : Ifx.Eaf.EquipmentConnector.File.Component.FilePathGenerator +{ + + public FileConnectorConfiguration FileConnectorConfiguration { get; private set; } + + public FilePathGenerator(FileConnectorConfiguration config, Dictionary customPattern = null) : base(config, customPattern) => FileConnectorConfiguration = config; + + public FilePathGenerator(FileConnectorConfiguration config, File file, bool isErrorFile = false, Dictionary customPattern = null) : base(config, file, isErrorFile, customPattern) => FileConnectorConfiguration = config; + + public FilePathGenerator(FileConnectorConfiguration config, string sourceFilePath, bool isErrorFile = false, Dictionary customPattern = null) : base(config, sourceFilePath, isErrorFile, customPattern) => FileConnectorConfiguration = config; + + public string GetSubFolderPath() => SubFolderPath; + +} diff --git a/Shared/FilePathGeneratorInfo.cs b/Shared/FilePathGeneratorInfo.cs new file mode 100644 index 0000000..bb6393e --- /dev/null +++ b/Shared/FilePathGeneratorInfo.cs @@ -0,0 +1,63 @@ +using System.IO; + +namespace Shared; + +public class FilePathGeneratorInfo +{ + + public string To { get; protected set; } + public string From { get; protected set; } + public bool IsErrorFile { get; protected set; } + public string SubFolderPath { get; protected set; } + public string FirstDirectory { get; protected set; } + public string ReportFullPath { get; protected set; } + public string ResolvedFileLocation { get; protected set; } + + public FilePathGeneratorInfo(object originalFilePathGenerator, string reportFullPath, bool isErrorFile, System.Collections.Generic.Dictionary fileParameter) + { + ReportFullPath = reportFullPath; + IsErrorFile = isErrorFile; + if (originalFilePathGenerator is null || originalFilePathGenerator is not FilePathGenerator original) + { + FirstDirectory = string.Empty; + ResolvedFileLocation = string.Empty; + To = string.Empty; + From = string.Empty; + } + else + { + string directorySeparatorChar = Path.DirectorySeparatorChar.ToString(); + FilePathGenerator filePathGenerator = new(original.FileConnectorConfiguration, reportFullPath, isErrorFile); + SubFolderPath = filePathGenerator.GetSubFolderPath(); + if (string.IsNullOrEmpty(SubFolderPath)) + FirstDirectory = SubFolderPath; + else + FirstDirectory = SubFolderPath.Split(Path.DirectorySeparatorChar)[0]; + ResolvedFileLocation = filePathGenerator.GetTargetFolder(); + if (string.IsNullOrEmpty(ResolvedFileLocation) && string.IsNullOrEmpty(SubFolderPath)) + To = string.Empty; + else if (string.IsNullOrEmpty(SubFolderPath)) + To = ResolvedFileLocation; + else + To = string.Concat(ResolvedFileLocation.Replace(SubFolderPath, string.Empty), Path.DirectorySeparatorChar, FirstDirectory); +#if (true) + if (string.IsNullOrEmpty(original.FileConnectorConfiguration.DefaultPlaceHolderValue)) + original.FileConnectorConfiguration.DefaultPlaceHolderValue = "NA"; + if (fileParameter is not null && fileParameter.Count == 1 && To.Contains(original.FileConnectorConfiguration.DefaultPlaceHolderValue)) + { + foreach (System.Collections.Generic.KeyValuePair keyValuePair in fileParameter) + To = To.Replace(string.Concat(original.FileConnectorConfiguration.DefaultPlaceHolderValue), keyValuePair.Value); + } +#endif + if (original.FileConnectorConfiguration.SourceFileLocation.EndsWith(directorySeparatorChar)) + From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, FirstDirectory); + else + From = string.Concat(original.FileConnectorConfiguration.SourceFileLocation, Path.DirectorySeparatorChar, FirstDirectory); + if (From.EndsWith(directorySeparatorChar) && !To.EndsWith(directorySeparatorChar)) + To = string.Concat(To, Path.DirectorySeparatorChar); + else if (To.EndsWith(directorySeparatorChar) && !From.EndsWith(directorySeparatorChar)) + To = To.Remove(To.Length - 1, 1); + } + } + +} diff --git a/Shared/Mapper.cs b/Shared/Mapper.cs new file mode 100644 index 0000000..7b06a06 --- /dev/null +++ b/Shared/Mapper.cs @@ -0,0 +1,74 @@ +using Eaf.Management.ConfigurationData.CellAutomation; +using Ifx.Eaf.EquipmentConnector.File.Configuration; +using System.Collections.Generic; + +namespace Shared; + +public static class Mapper +{ + + internal static Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration Map(FileConnectorConfiguration configuration) + { + Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration result = new() + { + AlternateTargetFolder = configuration.AlternateTargetFolder, + ConnectionRetryInterval = configuration.ConnectionRetryInterval, + ConnectionSettings = new List(), + CopySourceFolderStructure = configuration.CopySourceFolderStructure, + DefaultPlaceHolderValue = configuration.DefaultPlaceHolderValue, + //DeleteAbandonedEmptySourceSubFolders = configuration.DeleteAbandonedEmptySourceSubFolders, + DeleteEmptySourceSubFolders = configuration.DeleteEmptySourceSubFolders, + ErrorPostProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PostProcessingModeEnum)configuration.ErrorPostProcessingMode, + ErrorTargetFileLocation = configuration.ErrorTargetFileLocation, + ErrorTargetFileName = configuration.ErrorTargetFileName, + FileAgeFilterMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.FileAgeFilterEnum)configuration.FileAgeFilterMode, + FileAgeThreshold = configuration.FileAgeThreshold, + //FileHandlers = configuration.FileHandlers, + FileHandleTimeout = (long)configuration.FileHandleTimeout, + FileHandleWaitTime = configuration.FileHandleWaitTime, + FileScanningIntervalInSeconds = configuration.FileScanningIntervalInSeconds, + FileScanningOption = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.FileScanningOptionEnum)configuration.FileScanningOption, + FolderAgeCheckIndividualSubFolders = configuration.FolderAgeCheckIndividualSubFolders, + FolderAgeThreshold = configuration.FolderAgeThreshold, + //FolderOperationsSubFolderLevel = configuration.FolderOperationsSubFolderLevel, + IdleEventWaitTimeInSeconds = (long)configuration.IdleEventWaitTimeInSeconds, + IfFileExistAction = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.IfFileExistEnum)configuration.IfFileExistAction, + IfPostProcessingFailsAction = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.IfPostProcessingFailsEnum)configuration.IfPostProcessingFailsAction, + IncludeSubDirectories = configuration.IncludeSubDirectories, + PostProcessingRetries = configuration.PostProcessingRetries, + PreProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PreProcessingModeEnum)configuration.PreProcessingMode, + PostProcessingMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.PostProcessingModeEnum)configuration.PostProcessingMode, + SourceDirectoryCloaking = configuration.SourceDirectoryCloaking, + SourceFileFilter = configuration.SourceFileFilter, + SourceFileFilters = configuration.SourceFileFilters, + SourceFileLocation = configuration.SourceFileLocation, + TargetFileLocation = configuration.TargetFileLocation, + TargetFileName = configuration.TargetFileName, + TriggerOnChanged = configuration.TriggerOnChanged, + TriggerOnCreated = configuration.TriggerOnCreated, + UseZip64Mode = configuration.UseZip64Mode, + ZipErrorTargetFileName = configuration.ZipErrorTargetFileName, + ZipFileAmount = configuration.ZipFileAmount, + ZipFileSubFolderLevel = configuration.ZipFileSubFolderLevel, + ZipFileTime = configuration.ZipFileTime, + ZipMode = (Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration.FileConnectorConfiguration.ZipModeEnum)configuration.ZipMode, + ZipTargetFileName = configuration.ZipTargetFileName, + }; + foreach (Ifx.Eaf.Common.Configuration.ConnectionSetting connectionSetting in configuration.ConnectionSettings) + result.ConnectionSettings.Add(new Adaptation.Ifx.Eaf.Common.Configuration.ConnectionSetting(connectionSetting.Name, connectionSetting.Value)); + return result; + } + + internal static IList Map(IList configuredParameters) + { + List results = new(); + Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterType modelObjectParameterType; + for (int i = 0; i < configuredParameters.Count; i++) + { + modelObjectParameterType = (Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterType)configuredParameters[i].ValueType; + results.Add(new Adaptation.Eaf.Management.ConfigurationData.CellAutomation.ModelObjectParameterDefinition() { Id = i, Name = configuredParameters[i].Name, Value = configuredParameters[i].Value, ValueType = modelObjectParameterType, EnumType = modelObjectParameterType.ToString() }); + } + return results; + } + +}