diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig
index 69ecc38..d117dc5 100644
--- a/Adaptation/.editorconfig
+++ b/Adaptation/.editorconfig
@@ -121,6 +121,7 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs
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.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods
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
diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json
index 8ca87d5..7b6c0ce 100644
--- a/Adaptation/.vscode/tasks.json
+++ b/Adaptation/.vscode/tasks.json
@@ -82,6 +82,26 @@
"command": "code ../MET08RESISRP2100.csproj",
"problemMatcher": []
},
+ {
+ "label": "Readme",
+ "type": "shell",
+ "command": "code ../README.md",
+ "problemMatcher": []
+ },
+ {
+ "label": "File-Folder-Helper AOT s X Day-Helper-2025-03-20",
+ "type": "shell",
+ "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe",
+ "args": [
+ "s",
+ "X",
+ "L:/DevOps/EAF-Mesa-Integration/MET08RESISRP2100",
+ "Day-Helper-2025-03-20",
+ "false",
+ "4"
+ ],
+ "problemMatcher": []
+ },
{
"label": "Git Config",
"type": "shell",
diff --git a/Adaptation/MET08RESISRP2100-Development.yml b/Adaptation/MET08RESISRP2100-Development.yml
index 0d8f7c3..bd0cb64 100644
--- a/Adaptation/MET08RESISRP2100-Development.yml
+++ b/Adaptation/MET08RESISRP2100-Development.yml
@@ -1,190 +1 @@
-trigger:
- branches:
- include:
- - Development
- paths:
- include:
- - "Adaptation/*"
-
-pool:
- name: eaf
- demands: MET08RESISRP2100-Development
-
-steps:
- - script: |
- set coreVersion=net7.0
- echo %coreVersion%
- echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
- echo $(CoreVersion)
- displayName: CoreVersion
-
- - script: |
- set configuration=Debug
- echo %configuration%
- echo ##vso[task.setvariable variable=Configuration;]%configuration%
- echo $(Configuration)
- displayName: Configuration
-
- - script: |
- set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget
- echo %nugetSource%
- echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
- echo $(NugetSource)
- displayName: NugetSource
-
- - script: |
- set gitCommit=$(Build.SourceVersion)
- set gitCommitSeven=%gitCommit:~0,7%
- echo %gitCommitSeven%
- echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
- echo $(GitCommitSeven)
- displayName: GitCommitSeven
-
- - script: |
- echo $(Build.BuildId)
- echo $(Build.Reason)
- echo $(Build.Repository.Id)
- echo $(Build.Repository.Name)
- echo $(Build.SourceVersion)
- echo $(CoreVersion)
- echo $(Configuration)
- echo $(NugetSource)
- echo $(GitCommitSeven)
- REM echo $(pipelinePassword)
- displayName: "Echo Check"
-
- - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
- displayName: "Nuget Clear"
- enabled: false
-
- - script: |
- "C:\program files\dotnet\dotnet.exe" user-secrets init
- "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
- "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
- "C:\program files\dotnet\dotnet.exe" user-secrets list
- workingDirectory: Adaptation
- displayName: "Safe storage of app secrets - Adaptation"
-
- - task: CopyFiles@2
- displayName: "Copy Files to: - GhostPCL"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
- enabled: false
-
- - task: CopyFiles@2
- displayName: "Copy Files to: - LincPDFC"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
- enabled: false
-
- - task: CopyFiles@2
- displayName: "Copy Files to: - PDF-Text-Stripper"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
- enabled: false
-
- - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
- workingDirectory: Adaptation
- displayName: "Core Build - Adaptation"
-
- - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
- workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
- displayName: "PowerShell Script"
- continueOnError: true
-
- - script: "dotnet test --configuration $(Configuration)"
- workingDirectory: Adaptation
- displayName: "Core Test"
-
- - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
- displayName: "Move Results"
-
- - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
- workingDirectory: Adaptation
- displayName: "Tool Restore"
- enabled: false
-
- - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
- workingDirectory: Adaptation
- displayName: "Report Generator"
- enabled: false
-
- - task: PublishTestResults@2
- displayName: "Publish Test Results **/*.trx"
- inputs:
- testResultsFormat: VSTest
- testResultsFiles: "**/*.trx"
- testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
- searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
-
- - task: PublishTestResults@2
- displayName: "Publish Test Results */coverage.cobertura.xml"
- inputs:
- testResultsFormat: VSTest
- testResultsFiles: "*/coverage.cobertura.xml"
- testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
- searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
-
- - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
- displayName: "Create work item"
- inputs:
- teamProject: "Mesa_FI"
- workItemType: Bug
- title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
- assignedTo: "$(Build.RequestedForId)"
- enabled: false
-
- - script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
- workingDirectory: Adaptation
- displayName: "Core Publish"
- enabled: false
-
- - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"'
- displayName: "MSBuild Restore"
-
- - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
- displayName: MSBuild
-
- - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
- displayName: "Commit Id"
-
- - task: CopyFiles@2
- displayName: 'Copy Files to: D:\Framework4.8'
- inputs:
- Contents: "*$(Build.Repository.Name)*"
- SourceFolder: 'bin\$(Configuration)'
- TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
- OverWrite: true
- enabled: false
-
- - task: CopyFiles@2
- displayName: 'Copy Files to: Local D EAF Deployment Storage'
- inputs:
- Contents: "*$(Build.Repository.Name)*"
- SourceFolder: 'bin\$(Configuration)'
- TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
- OverWrite: true
- enabled: false
-
- - script: |
- "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
- workingDirectory: Adaptation
- displayName: "Core Clean - Tests"
-
- - script: |
- "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
- workingDirectory: Adaptation
- displayName: "Core Clean - Adaptation"
-
- - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
- displayName: "Force Fail"
- enabled: false
+# dotnet nuget push --source https://tfs.intra.infineon.com/tfs/FactoryIntegration/fccf8303-9cf7-4788-a9e0-4042541503fa/_packaging/EAF-Mesa-Integration/nuget/v3/index.json --api-key az D:\vsts-agent-win-x64-2.210.1-eaf\nuget\infineon.mesa.pdf.text.stripper.4.8.0.1.nupkg
\ No newline at end of file
diff --git a/Adaptation/MET08RESISRP2100.Tests.csproj b/Adaptation/MET08RESISRP2100.Tests.csproj
index 16a3872..f895edc 100644
--- a/Adaptation/MET08RESISRP2100.Tests.csproj
+++ b/Adaptation/MET08RESISRP2100.Tests.csproj
@@ -69,7 +69,7 @@
- NU1701
+ NU1701
diff --git a/Adaptation/MET08RESISRP2100.yml b/Adaptation/MET08RESISRP2100.yml
index 8e16254..1e480b1 100644
--- a/Adaptation/MET08RESISRP2100.yml
+++ b/Adaptation/MET08RESISRP2100.yml
@@ -1,3 +1,9 @@
+# D:
+# cd D:\EAF-Mesa-Integration
+# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa003-meseafsvc --work _work --runAsService --auth negotiate --userName infineon\phares
+# D:
+# cd D:\EAF-Mesa-Integration
+# config --url https://tfs.intra.infineon.com/tfs/FactoryIntegration --pool "EAF Mesa Integration" --agent mestsa07ec-ecmeseaf --work _work --runAsService --auth negotiate --userName infineon\phares
trigger:
branches:
include:
@@ -6,180 +12,273 @@ trigger:
include:
- "Adaptation/*"
-pool:
- name: eaf
- demands: MET08RESISRP2100
+stages:
+ - stage: DevServer
+ displayName: DevServer
-steps:
- - script: |
- set coreVersion=net7.0
- echo %coreVersion%
- echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
- echo $(CoreVersion)
- displayName: CoreVersion
+ pool:
+ name: EAF Mesa Integration
+ demands: MET08RESISRP2100-Development
- - script: |
- set configuration=Release
- echo %configuration%
- echo ##vso[task.setvariable variable=Configuration;]%configuration%
- echo $(Configuration)
- displayName: Configuration
+ variables:
+ coreVersion: "net8.0"
+ nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
- - script: |
- set nugetSource=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/index.json;D:/vsts-agent-win-x64-2.210.1-eaf/nuget
- echo %nugetSource%
- echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
- echo $(NugetSource)
- displayName: NugetSource
+ jobs:
+ - job: SetupEnvironment
+ steps:
+ - script: |
+ echo $(Build.BuildId)
+ echo $(Build.Reason)
+ echo $(Build.Repository.Id)
+ echo $(Build.Repository.Name)
+ echo $(Build.SourceVersion)
+ echo $(CoreVersion)
+ echo $(NugetSource)
+ displayName: "Echo Check"
- - script: |
- set gitCommit=$(Build.SourceVersion)
- set gitCommitSeven=%gitCommit:~0,7%
- echo %gitCommitSeven%
- echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
- echo $(GitCommitSeven)
- displayName: GitCommitSeven
+ - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
+ displayName: "Nuget Clear"
+ enabled: false
- - script: |
- echo $(Build.BuildId)
- echo $(Build.Reason)
- echo $(Build.Repository.Id)
- echo $(Build.Repository.Name)
- echo $(Build.SourceVersion)
- echo $(CoreVersion)
- echo $(Configuration)
- echo $(NugetSource)
- echo $(GitCommitSeven)
- REM echo $(pipelinePassword)
- displayName: "Echo Check"
+ - script: |
+ "C:\program files\dotnet\dotnet.exe" user-secrets init
+ "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
+ "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
+ "C:\program files\dotnet\dotnet.exe" user-secrets list
+ workingDirectory: Adaptation
+ displayName: "Safe storage of app secrets - Adaptation"
- - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
- displayName: "Nuget Clear"
- enabled: false
+ - job: BuildDebug
+ dependsOn:
+ - SetupEnvironment
+ steps:
+ - script: |
+ set configuration=Debug
+ echo %configuration%
+ echo ##vso[task.setvariable variable=Configuration;]%configuration%
+ echo $(Configuration)
+ displayName: Configuration
- - script: |
- "C:\program files\dotnet\dotnet.exe" user-secrets init
- "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
- "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
- "C:\program files\dotnet\dotnet.exe" user-secrets list
- workingDirectory: Adaptation
- displayName: "Safe storage of app secrets - Adaptation"
+ - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
+ workingDirectory: Adaptation
+ displayName: "Core Build - Adaptation"
- - task: CopyFiles@2
- displayName: "Copy Files to: - GhostPCL"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
+ - job: BuildRelease
+ dependsOn:
+ - SetupEnvironment
+ steps:
+ - script: |
+ set configuration=Release
+ echo %configuration%
+ echo ##vso[task.setvariable variable=Configuration;]%configuration%
+ echo $(Configuration)
+ displayName: Configuration
- - task: CopyFiles@2
- displayName: "Copy Files to: - LincPDFC"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
+ - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
+ displayName: "MSBuild Restore"
- - task: CopyFiles@2
- displayName: "Copy Files to: - PDF-Text-Stripper"
- inputs:
- Contents: '*'
- SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
- TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
- OverWrite: true
+ - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
+ displayName: MSBuild
- - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
- workingDirectory: Adaptation
- displayName: "Core Build - Adaptation"
+ - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
+ displayName: MSBuild
- - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
- workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
- displayName: "PowerShell Script"
- continueOnError: true
+ - script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
+ displayName: "Commit Id"
- - script: "dotnet test --configuration $(Configuration)"
- workingDirectory: Adaptation
- displayName: "Core Test"
+ - task: CopyFiles@2
+ displayName: 'Copy Files to: D:\EAF'
+ inputs:
+ Contents: "*$(Build.Repository.Name)*"
+ SourceFolder: 'bin\$(Configuration)'
+ TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
+ OverWrite: true
+ enabled: true
- - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
- displayName: "Move Results"
+ - job: TestDebug
+ dependsOn:
+ - SetupEnvironment
+ - BuildDebug
+ - BuildRelease
+ steps:
+ - script: |
+ set configuration=Debug
+ echo %configuration%
+ echo ##vso[task.setvariable variable=Configuration;]%configuration%
+ echo $(Configuration)
+ displayName: Configuration
- - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
- workingDirectory: Adaptation
- displayName: "Tool Restore"
- enabled: false
+ - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
+ workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
+ displayName: "PowerShell Script"
+ continueOnError: true
- - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
- workingDirectory: Adaptation
- displayName: "Report Generator"
- enabled: false
+ - script: "dotnet test --configuration $(Configuration)"
+ workingDirectory: Adaptation
+ displayName: "Core Test"
- - task: PublishTestResults@2
- displayName: "Publish Test Results **/*.trx"
- inputs:
- testResultsFormat: VSTest
- testResultsFiles: "**/*.trx"
- testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
- searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
+ - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
+ displayName: "Move Results"
- - task: PublishTestResults@2
- displayName: "Publish Test Results */coverage.cobertura.xml"
- inputs:
- testResultsFormat: VSTest
- testResultsFiles: "*/coverage.cobertura.xml"
- testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
- searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
+ - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
+ workingDirectory: Adaptation
+ displayName: "Tool Restore"
+ enabled: false
- - task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
- displayName: "Create work item"
- inputs:
- teamProject: "Mesa_FI"
- workItemType: Bug
- title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
- assignedTo: "$(Build.RequestedForId)"
- enabled: false
+ - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
+ workingDirectory: Adaptation
+ displayName: "Report Generator"
+ enabled: false
- - script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
- workingDirectory: Adaptation
- displayName: "Core Publish"
- enabled: false
+ - task: PublishTestResults@2
+ displayName: "Publish Test Results **/*.trx"
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: "**/*.trx"
+ testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
+ searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources="$(NugetSource)"'
- displayName: "MSBuild Restore"
+ - task: PublishTestResults@2
+ displayName: "Publish Test Results */coverage.cobertura.xml"
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: "*/coverage.cobertura.xml"
+ testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
+ searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
- displayName: MSBuild
+ - script: |
+ "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
+ workingDirectory: Adaptation
+ displayName: "Core Clean - Adaptation"
- - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
- displayName: "Commit Id"
+ - script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
+ displayName: "Force Fail"
+ enabled: false
- - task: CopyFiles@2
- displayName: 'Copy Files to: D:\Framework4.8'
- inputs:
- Contents: "*$(Build.Repository.Name)*"
- SourceFolder: 'bin\$(Configuration)'
- TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
- OverWrite: true
+ - stage: ProductionServer
+ displayName: ProductionServer
- - task: CopyFiles@2
- displayName: 'Copy Files to: Local D EAF Deployment Storage'
- inputs:
- Contents: "*$(Build.Repository.Name)*"
- SourceFolder: 'bin\$(Configuration)'
- TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
- OverWrite: true
+ pool:
+ name: EAF Mesa Integration
+ demands: MET08RESISRP2100
- - script: |
- "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
- workingDirectory: Adaptation
- displayName: "Core Clean - Tests"
+ variables:
+ coreVersion: "net8.0"
+ nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
- - script: |
- "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
- workingDirectory: Adaptation
- displayName: "Core Clean - Adaptation"
+ jobs:
+ - job: SetupEnvironment
+ steps:
+ - script: |
+ echo $(Build.BuildId)
+ echo $(Build.Reason)
+ echo $(Build.Repository.Id)
+ echo $(Build.Repository.Name)
+ echo $(Build.SourceVersion)
+ echo $(CoreVersion)
+ echo $(NugetSource)
+ displayName: "Echo Check"
- - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
- displayName: "Force Fail"
- enabled: false
+ - script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
+ displayName: "Nuget Clear"
+ enabled: false
+
+ - script: |
+ "C:\program files\dotnet\dotnet.exe" user-secrets init
+ "C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
+ "C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
+ "C:\program files\dotnet\dotnet.exe" user-secrets list
+ workingDirectory: Adaptation
+ displayName: "Safe storage of app secrets - Adaptation"
+
+ - job: BuildRelease
+ dependsOn:
+ - SetupEnvironment
+ steps:
+ - script: |
+ set configuration=Release
+ echo %configuration%
+ echo ##vso[task.setvariable variable=Configuration;]%configuration%
+ echo $(Configuration)
+ displayName: Configuration
+
+ - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
+ displayName: "MSBuild Restore"
+
+ - script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
+ displayName: MSBuild
+
+ - script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
+ displayName: "Commit Id"
+
+ - task: CopyFiles@2
+ displayName: 'Copy Files to: D:\EAF'
+ inputs:
+ Contents: "*$(Build.Repository.Name)*"
+ SourceFolder: 'bin\$(Configuration)'
+ TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
+ OverWrite: true
+
+ - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
+ workingDirectory: Adaptation
+ displayName: "Core Build - Adaptation"
+
+ - job: TestRelease
+ dependsOn:
+ - SetupEnvironment
+ - BuildRelease
+ steps:
+ - script: |
+ set configuration=Release
+ echo %configuration%
+ echo ##vso[task.setvariable variable=Configuration;]%configuration%
+ echo $(Configuration)
+ displayName: Configuration
+
+ - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
+ workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
+ displayName: "PowerShell Script"
+ continueOnError: true
+
+ - script: "dotnet test --configuration $(Configuration)"
+ workingDirectory: Adaptation
+ displayName: "Core Test"
+
+ - script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
+ displayName: "Move Results"
+
+ - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
+ workingDirectory: Adaptation
+ displayName: "Tool Restore"
+ enabled: false
+
+ - script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
+ workingDirectory: Adaptation
+ displayName: "Report Generator"
+ enabled: false
+
+ - task: PublishTestResults@2
+ displayName: "Publish Test Results **/*.trx"
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: "**/*.trx"
+ testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
+ searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
+
+ - task: PublishTestResults@2
+ displayName: "Publish Test Results */coverage.cobertura.xml"
+ inputs:
+ testResultsFormat: VSTest
+ testResultsFiles: "*/coverage.cobertura.xml"
+ testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
+ searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
+
+ - script: |
+ "C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
+ workingDirectory: Adaptation
+ displayName: "Core Clean - Adaptation"
+
+ - script: 'echo $(Build.BuildId)-$(Build.SourceVersion)-bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
+ displayName: "Force Fail"
+ enabled: true
diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs
index 0bbc72e..0c8551c 100644
--- a/Adaptation/Shared/FileRead.cs
+++ b/Adaptation/Shared/FileRead.cs
@@ -44,9 +44,9 @@ public class FileRead : Properties.IFileRead
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 Dictionary> _StaticRuns;
protected readonly IList _ModelObjectParameterDefinitions;
bool Properties.IFileRead.IsEvent => _IsEvent;
@@ -63,7 +63,7 @@ public class FileRead : Properties.IFileRead
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)
+ 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;
@@ -491,7 +491,7 @@ public class FileRead : Properties.IFileRead
protected static void NestExistingFiles(FileConnectorConfiguration fileConnectorConfiguration)
{
- if (!fileConnectorConfiguration.IncludeSubDirectories.Value)
+ if (!fileConnectorConfiguration.IncludeSubDirectories.Value && fileConnectorConfiguration.TriggerOnCreated is not null && fileConnectorConfiguration.TriggerOnCreated.Value)
{
string[] matches = GetMatches(fileConnectorConfiguration);
if (matches is not null && matches.Length > 0)
@@ -591,6 +591,9 @@ public class FileRead : Properties.IFileRead
case FileConnectorConfiguration.PostProcessingModeEnum.Delete:
File.Delete(sourceFile.FullName);
break;
+ case FileConnectorConfiguration.PostProcessingModeEnum.None:
+ File.Move(sourceFile.FullName, itemFile);
+ break;
default:
throw new Exception();
}
@@ -760,17 +763,25 @@ public class FileRead : Properties.IFileRead
internal string[] GetInProcessDirectory(string jobIdDirectory)
{
- string[] results;
+ List results = new();
if (!_IsEAFHosted)
- results = new string[] { jobIdDirectory };
+ results = new string[] { jobIdDirectory }.ToList();
else
{
+ string[] files;
string logisticsSequence = _Logistics.Sequence.ToString();
- results = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
+ string[] directories = Directory.GetDirectories(jobIdDirectory, $"*{logisticsSequence}*", SearchOption.TopDirectoryOnly);
+ foreach (string directory in directories)
+ {
+ files = Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly);
+ if (files.Length == 0)
+ continue;
+ results.Add(directory);
+ }
}
- if ((results is null) || results.Length != 1)
+ if ((results is null) || results.Count != 1)
throw new Exception("Didn't find directory by logistics sequence");
- return results;
+ return results.ToArray();
}
internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath)
diff --git a/Adaptation/Shared/Logistics.cs b/Adaptation/Shared/Logistics.cs
index cb1f805..4f187f8 100644
--- a/Adaptation/Shared/Logistics.cs
+++ b/Adaptation/Shared/Logistics.cs
@@ -35,6 +35,9 @@ public class Logistics : ILogistics
public long Sequence => _Sequence;
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
+ private static string DefaultMesEntity(DateTime dateTime) =>
+ string.Concat(dateTime.Ticks, "_MES_ENTITY");
+
public Logistics(IFileRead fileRead)
{
DateTime dateTime = DateTime.Now;
@@ -84,13 +87,13 @@ public class Logistics : ILogistics
_Logistics2 = new List();
}
- public Logistics(string reportFullPath, string logistics)
+ internal Logistics(string reportFullPath, ProcessDataStandardFormat processDataStandardFormat)
{
string key;
DateTime dateTime;
string[] segments;
_FileInfo = new(reportFullPath);
- _Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
+ _Logistics1 = processDataStandardFormat.Logistics.ToList();
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
{
_NullData = null;
@@ -190,8 +193,6 @@ public class Logistics : ILogistics
}
}
- private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
-
internal void Update(string mid, string processJobID)
{
_MID = mid;
diff --git a/Adaptation/Shared/Metrology/WS.Attachment.cs b/Adaptation/Shared/Metrology/WS.Attachment.cs
index 8edb116..0a7950e 100644
--- a/Adaptation/Shared/Metrology/WS.Attachment.cs
+++ b/Adaptation/Shared/Metrology/WS.Attachment.cs
@@ -6,23 +6,25 @@ 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; }
+#nullable enable
- public Attachment(string subGroupId, long headerId, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
+ public long HeaderId { get; set; }
+ public string UniqueId { get; set; }
+ public string SubGroupId { get; set; }
+ public string AttachmentId { get; set; }
+ public string SourceFileName { get; set; }
+ public string HeaderIdDirectory { get; set; }
+ public string DestinationFileName { get; set; }
+
+ public Attachment(Results? results, string headerIdDirectory, string uniqueId, string destinationFileName, string sourceFileName)
{
- SubGroupId = subGroupId;
- HeaderId = headerId;
- HeaderIdDirectory = headerIdDirectory;
UniqueId = uniqueId;
- DestinationFileName = destinationFileName;
SourceFileName = sourceFileName;
+ HeaderIdDirectory = headerIdDirectory;
+ DestinationFileName = destinationFileName;
AttachmentId = System.Guid.NewGuid().ToString();
+ HeaderId = results?.HeaderId is null ? -1 : results.HeaderId.Value;
+ SubGroupId = results?.SubgroupId is null ? string.Empty : results.SubgroupId.Value.ToString();
}
}
diff --git a/Adaptation/Shared/Metrology/WS.Results.cs b/Adaptation/Shared/Metrology/WS.Results.cs
index 2d1c603..07685a3 100644
--- a/Adaptation/Shared/Metrology/WS.Results.cs
+++ b/Adaptation/Shared/Metrology/WS.Results.cs
@@ -1,27 +1,75 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Text.Json;
+using System.Text.Json.Serialization;
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; }
+#nullable enable
- // if false, this collection will contain a list of errors
- public List Errors { get; set; }
+ [JsonConstructor]
+ public Results(List? errors,
+ long? headerId,
+ long? subgroupId,
+ bool? success,
+ List? warnings)
+ {
+ Errors = errors;
+ Success = success;
+ HeaderId = headerId;
+ Warnings = warnings;
+ SubgroupId = subgroupId;
+ }
- // this collection will contain a list of warnings, they will not prevent data from being saved
- public List Warnings { get; set; }
+ [JsonPropertyName("errors")] public List? Errors { get; set; }
+ [JsonPropertyName("headerID")] public long? HeaderId { get; set; }
+ [JsonPropertyName("subgroupId")] public long? SubgroupId { get; set; }
+ [JsonPropertyName("success")] public bool? Success { get; set; }
+ [JsonPropertyName("warnings")] public List? Warnings { get; set; }
+
+ public override string ToString()
+ {
+ string result = JsonSerializer.Serialize(this, ResultsSourceGenerationContext.Default.Results);
+ return result;
+ }
+
+ internal static Results Get(Results results, long? subgroupId) =>
+ new(results.Errors, results.HeaderId, subgroupId, results.Success, results.Warnings);
+
+ internal static Results Get(string resultsJson, Exception e)
+ {
+ Results results;
+ Exception? exception = e;
+ List errors = new();
+ StringBuilder stringBuilder = new();
+ while (exception is not null)
+ {
+ _ = stringBuilder.AppendLine(exception.Message);
+ exception = exception.InnerException;
+ }
+ errors.Add(resultsJson);
+ errors.Add(stringBuilder.ToString());
+ results = new(errors: errors,
+ headerId: null,
+ subgroupId: null,
+ success: false,
+ warnings: new());
+ return results;
+ }
- // this is just a helper function to make displaying the results easier
- public override string ToString() => JsonSerializer.Serialize(this, GetType());
}
+}
+
+[JsonSourceGenerationOptions(WriteIndented = true)]
+[JsonSerializable(typeof(WS.Results))]
+internal partial class ResultsSourceGenerationContext : JsonSerializerContext
+{
}
\ No newline at end of file
diff --git a/Adaptation/Shared/Metrology/WS.cs b/Adaptation/Shared/Metrology/WS.cs
index c49e61d..b7666db 100644
--- a/Adaptation/Shared/Metrology/WS.cs
+++ b/Adaptation/Shared/Metrology/WS.cs
@@ -10,9 +10,11 @@ namespace Adaptation.Shared.Metrology;
public partial class WS
{
+#nullable enable
+
public static (string, Results) SendData(string url, long sequence, string directory, object payload, int timeoutSeconds = 120)
{
- Results results = new();
+ Results? wsResults = null;
string resultsJson = string.Empty;
try
{
@@ -30,29 +32,20 @@ public partial class WS
};
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}");
+ wsResults = JsonSerializer.Deserialize(resultsJson, ResultsSourceGenerationContext.Default.Results);
+ if (wsResults is null)
+ throw new NullReferenceException(nameof(wsResults));
+ string checkDirectory = Path.Combine(directory, $"-{wsResults.HeaderId}");
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
File.WriteAllText(Path.Combine(checkDirectory, $"{sequence}.json"), json);
}
- if (!results.Success)
- results.Errors.Add(results.ToString());
+ if (wsResults.Success is null || !wsResults.Success.Value)
+ wsResults.Errors?.Add(wsResults.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);
+ { wsResults ??= Results.Get(resultsJson, e); }
+ return new(resultsJson, wsResults);
}
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
@@ -69,16 +62,20 @@ public partial class WS
}
}
- public static void AttachFiles(string url, List headerAttachments = null, List dataAttachments = null)
+ public static void AttachFiles(string url, List? headerAttachments = null, List? dataAttachments = null)
{
string directory;
try
{
+ string? directoryName;
if (headerAttachments is not null)
{
foreach (Attachment attachment in headerAttachments)
{
- directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory), attachment.AttachmentId) ?? throw new Exception();
+ directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory);
+ if (string.IsNullOrEmpty(directoryName))
+ continue;
+ directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
@@ -88,7 +85,10 @@ public partial class WS
{
foreach (Attachment attachment in dataAttachments)
{
- directory = Path.Combine(Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data")), attachment.AttachmentId) ?? throw new Exception();
+ directoryName = Path.GetDirectoryName(attachment.HeaderIdDirectory.Replace("Header", "Data"));
+ if (string.IsNullOrEmpty(directoryName))
+ continue;
+ directory = Path.Combine(directoryName, attachment.AttachmentId) ?? throw new Exception();
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
File.Copy(attachment.SourceFileName, Path.Combine(directory, attachment.DestinationFileName), overwrite: true);
@@ -108,7 +108,7 @@ public partial class WS
}
catch (Exception e)
{
- Exception exception = e;
+ Exception? exception = e;
StringBuilder stringBuilder = new();
while (exception is not null)
{
diff --git a/Adaptation/Shared/ProcessDataStandardFormat.cs b/Adaptation/Shared/ProcessDataStandardFormat.cs
index 136ccae..a86241d 100644
--- a/Adaptation/Shared/ProcessDataStandardFormat.cs
+++ b/Adaptation/Shared/ProcessDataStandardFormat.cs
@@ -1,18 +1,22 @@
using Adaptation.Shared.Methods;
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.Json;
+using System.Text.Json.Serialization;
namespace Adaptation.Shared;
-public class ProcessDataStandardFormat
+#nullable enable
+
+internal class ProcessDataStandardFormat
{
- public enum SearchFor
+ internal enum SearchFor
{
EquipmentIntegration = 1,
BusinessIntegration = 2,
@@ -20,322 +24,47 @@ public class ProcessDataStandardFormat
Archive = 4
}
- public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
+ internal long? Sequence { get; private set; }
+ internal ReadOnlyCollection Body { get; private set; }
+ internal ReadOnlyCollection Footer { get; private set; }
+ internal ReadOnlyCollection Header { get; private set; }
+ internal ReadOnlyCollection Columns { get; private set; }
+ internal ProcessDataStandardFormat? InputPDSF { get; private set; }
+ internal ReadOnlyCollection Logistics { get; private set; }
+
+ internal ProcessDataStandardFormat(ReadOnlyCollection body,
+ ReadOnlyCollection columns,
+ ReadOnlyCollection footer,
+ ReadOnlyCollection header,
+ ProcessDataStandardFormat? inputPDSF,
+ ReadOnlyCollection logistics,
+ long? sequence)
{
- 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;
+ Body = body;
+ Columns = columns;
+ Footer = footer;
+ Header = header;
+ InputPDSF = inputPDSF;
+ Logistics = logistics;
+ Sequence = sequence;
}
- 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());
- }
+ internal static string EquipmentIntegration(bool addSpaces = true, char separator = ' ') =>
+ GetString(SearchFor.EquipmentIntegration, addSpaces, separator);
- 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;
- StringBuilder stringBuilder = new();
- foreach (string bodyLine in bodyLines)
- {
- _ = stringBuilder.Append('{');
- segments = bodyLine.Trim().Split('\t');
- if (!lookForNumbers)
- {
- for (int c = 1; c < segments.Length; c++)
- {
- value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
- _ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
- }
- }
- else
- {
- for (int c = 1; c < segments.Length; c++)
- {
- value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
- if (string.IsNullOrEmpty(value))
- _ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append("null,");
- else if (value.All(char.IsDigit))
- _ = stringBuilder.Append('"').Append(columns[c]).Append("\":").Append(value).Append(',');
- else
- _ = stringBuilder.Append('"').Append(columns[c]).Append("\":\"").Append(value).Append("\",");
- }
- }
- _ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
- _ = stringBuilder.AppendLine("},");
- }
- _ = stringBuilder.Remove(stringBuilder.Length - 3, 3);
- results = JsonSerializer.Deserialize(string.Concat("[", stringBuilder, "]"));
- }
- return results;
- }
+ internal static string BusinessIntegration(bool addSpaces = true, char separator = ' ') =>
+ GetString(SearchFor.BusinessIntegration, addSpaces, separator);
- public static Dictionary> GetDictionary(Tuple pdsf)
- {
- Dictionary> results = new();
- string[] segments;
- string[] columns = pdsf.Item2;
- string[] bodyLines = pdsf.Item3;
- foreach (string column in columns)
- results.Add(column, new List());
- foreach (string bodyLine in bodyLines)
- {
- 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;
- }
+ internal static string SystemExport(bool addSpaces = true, char separator = ' ') =>
+ GetString(SearchFor.SystemExport, addSpaces, separator);
- 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);
- }
+ internal static string Archive(bool addSpaces = true, char separator = ' ') =>
+ GetString(SearchFor.Archive, addSpaces, separator);
- 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")));
- }
+ internal static ProcessDataStandardFormat GetEmpty(Logistics logistics) =>
+ new(new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), new(Array.Empty()), null, new(logistics.Logistics1), null);
- 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)
+ internal static List PDSFToFixedWidth(string reportFullPath)
{
List results = new();
if (!File.Exists(reportFullPath))
@@ -404,4 +133,634 @@ public class ProcessDataStandardFormat
return results;
}
+ internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, string[]? lines = null, int columnsLine = 6)
+ {
+ ProcessDataStandardFormat result;
+ string segment;
+ string[] segments;
+ bool addToFooter = false;
+ List body = new();
+ List header = new();
+ List footer = new();
+ List columns = new();
+ ReadOnlyCollection logistics;
+ lines ??= File.ReadAllLines(reportFullPath);
+ if (lines.Length < columnsLine + 1)
+ segments = Array.Empty();
+ else
+ {
+ segments = lines[columnsLine].Trim().Split('\t');
+ for (int i = 0; i < columnsLine; i++)
+ header.Add(lines[i]);
+ }
+ 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;
+ }
+ }
+ }
+ }
+ for (int r = columnsLine + 1; r < lines.Length; r++)
+ {
+ if (lines[r].StartsWith("NUM_DATA_ROWS"))
+ addToFooter = true;
+ if (!addToFooter)
+ body.Add(lines[r]);
+ else
+ {
+ footer.Add(lines[r]);
+ if (lines[r].StartsWith("END_HEADER"))
+ break;
+ }
+ }
+ string? linesOne = lines.Length > 0 && body.Count == 0 && columns.Count == 0 ? lines[1] : null;
+ logistics = GetLogistics(footer, linesOne: linesOne);
+ result = new(body: body.AsReadOnly(),
+ columns: columns.AsReadOnly(),
+ footer: footer.AsReadOnly(),
+ header: header.AsReadOnly(),
+ inputPDSF: null,
+ logistics: logistics,
+ sequence: null);
+ return result;
+ }
+
+ private static ReadOnlyCollection GetLogistics(List footer, string? linesOne)
+ {
+ List results = new();
+ bool foundLogistics1 = false;
+ foreach (string line in footer)
+ {
+ if (line.StartsWith("END_HEADER"))
+ break;
+ if (line.StartsWith("LOGISTICS_1"))
+ foundLogistics1 = true;
+ if (foundLogistics1 && line.StartsWith("LOGISTICS_"))
+ results.Add(line);
+ }
+ if (!string.IsNullOrEmpty(linesOne) && results.Count == 0)
+ results.Add(linesOne);
+ return results.AsReadOnly();
+ }
+
+ internal static ProcessDataStandardFormat GetProcessDataStandardFormat(string reportFullPath, ProcessDataStandardFormatMapping pdsfMapping)
+ {
+ ProcessDataStandardFormat result;
+ const int columnsLine = 6;
+ FileInfo fileInfo = new(reportFullPath);
+ ProcessDataStandardFormat processDataStandardFormat = GetProcessDataStandardFormat(fileInfo.LastWriteTime, columnsLine, fileInfo.FullName, lines: null);
+ JsonElement[]? jsonElements = pdsfMapping.OldColumnNames.Count != pdsfMapping.ColumnIndices.Count ? null : GetFullArray(processDataStandardFormat);
+ JsonProperty[]? jsonProperties = jsonElements is null || jsonElements.Length == 0 ? null : jsonElements[0].EnumerateObject().ToArray();
+ if (jsonElements is null || jsonProperties is null || jsonProperties.Length != pdsfMapping.NewColumnNames.Count)
+ result = processDataStandardFormat;
+ else
+ {
+ result = GetProcessDataStandardFormat(pdsfMapping, jsonElements, processDataStandardFormat);
+ if (result.Sequence is null || result.Columns.Count == 0 || result.Body.Count == 0 || result.Logistics.Count == 0)
+ result = processDataStandardFormat;
+ }
+ return result;
+ }
+
+ private static ProcessDataStandardFormat GetProcessDataStandardFormat(DateTime lastWriteTime, int columnsLine, string path, string[]? lines)
+ {
+ ProcessDataStandardFormat result;
+ long sequence;
+ string[] segments;
+ bool addToFooter = false;
+ List body = new();
+ List header = new();
+ List footer = new();
+ ReadOnlyCollection logistics;
+ lines ??= File.ReadAllLines(path);
+ if (lines.Length <= columnsLine)
+ segments = Array.Empty();
+ else
+ {
+ segments = lines[columnsLine].Split('\t');
+ for (int i = 0; i < columnsLine; i++)
+ header.Add(lines[i]);
+ }
+ string[] columns = segments.Select(l => l.Trim('"')).ToArray();
+ for (int r = columnsLine + 1; r < lines.Length; r++)
+ {
+ if (lines[r].StartsWith("NUM_DATA_ROWS"))
+ addToFooter = true;
+ if (!addToFooter)
+ body.Add(lines[r]);
+ else
+ {
+ footer.Add(lines[r]);
+ if (lines[r].StartsWith("END_HEADER"))
+ break;
+ }
+ }
+ logistics = GetLogistics(footer, linesOne: null);
+ if (logistics.Count == 0)
+ sequence = lastWriteTime.Ticks;
+ else
+ {
+ segments = logistics[0].Split(new string[] { "SEQUENCE=" }, StringSplitOptions.None);
+ sequence = segments.Length < 2 || !long.TryParse(segments[1].Split(';')[0], out long s) ? lastWriteTime.Ticks : s;
+ }
+ result = new(body: body.AsReadOnly(),
+ columns: new(columns),
+ footer: footer.AsReadOnly(),
+ header: header.AsReadOnly(),
+ inputPDSF: null,
+ logistics: logistics,
+ sequence: sequence);
+ return result;
+ }
+
+ private static JsonElement[]? GetFullArray(ProcessDataStandardFormat processDataStandardFormat)
+ {
+ JsonElement[]? results;
+ if (processDataStandardFormat.Body.Count == 0 || !processDataStandardFormat.Body[0].Contains('\t'))
+ results = JsonSerializer.Deserialize("[]", JsonElementCollectionSourceGenerationContext.Default.JsonElementArray) ?? throw new Exception();
+ else
+ {
+ string value;
+ List segments;
+ List lines = new();
+ StringBuilder stringBuilder = new();
+ foreach (string bodyLine in processDataStandardFormat.Body)
+ {
+ _ = stringBuilder.Clear();
+ _ = stringBuilder.Append('{');
+ segments = bodyLine.Split('\t').ToList();
+ for (int c = 0; c < segments.Count; c++)
+ {
+ value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
+ _ = stringBuilder.Append('"').Append(processDataStandardFormat.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, JsonElementCollectionSourceGenerationContext.Default.JsonElementArray);
+ }
+ return results;
+ }
+
+ private static ProcessDataStandardFormat GetProcessDataStandardFormat(ProcessDataStandardFormatMapping processDataStandardFormatMapping, JsonElement[] jsonElements, ProcessDataStandardFormat processDataStandardFormat)
+ {
+ ProcessDataStandardFormat result;
+ int column;
+ string value;
+ JsonProperty jsonProperty;
+ List values = new();
+ List results = new();
+ JsonProperty[] jsonProperties;
+ List unknownColumns = new();
+ for (int i = 0; i < jsonElements.Length; i++)
+ {
+ values.Clear();
+ if (jsonElements[i].ValueKind != JsonValueKind.Object)
+ {
+ unknownColumns.Add(string.Empty);
+ break;
+ }
+ jsonProperties = jsonElements[i].EnumerateObject().ToArray();
+ if (jsonProperties.Length != processDataStandardFormatMapping.NewColumnNames.Count)
+ continue;
+ for (int c = 0; c < processDataStandardFormatMapping.ColumnIndices.Count; c++)
+ {
+ column = processDataStandardFormatMapping.ColumnIndices[c];
+ if (column == -1)
+ value = processDataStandardFormatMapping.OldColumnNames[c];
+ else
+ {
+ jsonProperty = jsonProperties[column];
+ value = jsonProperty.Value.ToString();
+ }
+ values.Add(value);
+ }
+ results.Add(string.Join("\t", values));
+ }
+ result = new(body: new(results),
+ columns: processDataStandardFormatMapping.OldColumnNames,
+ footer: processDataStandardFormat.Footer,
+ header: processDataStandardFormat.Header,
+ inputPDSF: processDataStandardFormat,
+ logistics: processDataStandardFormat.Logistics,
+ sequence: processDataStandardFormat.Sequence);
+ return result;
+ }
+
+ private static string GetJson(ProcessDataStandardFormat processDataStandardFormat)
+ {
+ if (processDataStandardFormat.InputPDSF is null)
+ throw new NullReferenceException(nameof(processDataStandardFormat.InputPDSF));
+#pragma warning disable CA1845, IDE0057
+ string result;
+ string line;
+ string value;
+ string[] segments;
+ List lines = new();
+ for (int i = 0; i < processDataStandardFormat.InputPDSF.Body.Count; i++)
+ {
+ line = "{";
+ segments = processDataStandardFormat.InputPDSF.Body[i].Trim().Split('\t');
+ if (segments.Length != processDataStandardFormat.InputPDSF.Columns.Count)
+ break;
+ for (int c = 0; c < segments.Length; c++)
+ {
+ value = segments[c].Replace("\"", "\\\"").Replace("\\", "\\\\");
+ line += string.Concat('"', processDataStandardFormat.InputPDSF.Columns[c].Trim('"'), '"', ':', '"', value, '"', ',');
+ }
+ line = string.Concat(line.Substring(0, line.Length - 1), '}');
+ lines.Add(line);
+ }
+ result = string.Concat(
+ '{',
+ Environment.NewLine,
+ '"',
+ "Count",
+ '"',
+ ": ",
+ processDataStandardFormat.Body.Count,
+ ',',
+ Environment.NewLine,
+ '"',
+ "Records",
+ '"',
+ ": ",
+ Environment.NewLine,
+ '[',
+ Environment.NewLine,
+ string.Join($",{Environment.NewLine}", lines),
+ Environment.NewLine,
+ ']',
+ ',',
+ Environment.NewLine,
+ '"',
+ "Sequence",
+ '"',
+ ": ",
+ processDataStandardFormat.Sequence,
+ Environment.NewLine,
+ '}');
+ return result;
+#pragma warning restore CA1845, IDE0057
+ }
+
+ internal static void Write(string path, ProcessDataStandardFormat processDataStandardFormat, List? wsResults)
+ {
+ List results = new();
+ if (processDataStandardFormat.Sequence is null)
+ throw new NullReferenceException(nameof(processDataStandardFormat.Sequence));
+ string endOffset = "E#######T";
+ string dataOffset = "D#######T";
+ string headerOffset = "H#######T";
+ string format = "MM/dd/yyyy HH:mm:ss";
+ string startTime = new DateTime(processDataStandardFormat.Sequence.Value).ToString(format);
+ results.Add("HEADER_TAG\tHEADER_VALUE");
+ results.Add("FORMAT\t2.00");
+ results.Add("NUMBER_PASSES\t0001");
+ results.Add($"HEADER_OFFSET\t{headerOffset}");
+ results.Add($"DATA_OFFSET\t{dataOffset}");
+ results.Add($"END_OFFSET\t{endOffset}");
+ results.Add($"\"{string.Join("\"\t\"", processDataStandardFormat.Columns)}\"");
+ results.AddRange(processDataStandardFormat.Body);
+ results.Add($"NUM_DATA_ROWS\t{processDataStandardFormat.Body.Count.ToString().PadLeft(9, '0')}");
+ results.Add($"NUM_DATA_COLUMNS\t{processDataStandardFormat.Columns.Count.ToString().PadLeft(9, '0')}");
+ results.Add("DELIMITER\t;");
+ results.Add($"START_TIME_FORMAT\t{format}");
+ results.Add($"START_TIME\t{startTime}");
+ results.Add("LOGISTICS_COLUMN\tA_LOGISTICS");
+ results.Add("LOGISTICS_COLUMN\tB_LOGISTICS");
+ if (wsResults is null || wsResults.Count != 1)
+ results.AddRange(processDataStandardFormat.Logistics);
+ else
+ {
+ string[] segments;
+ foreach (string logistics in processDataStandardFormat.Logistics)
+ {
+ segments = logistics.Split(new string[] { "\t" }, StringSplitOptions.None);
+ if (segments.Length != 2 || string.IsNullOrEmpty(segments[1]))
+ results.Add(logistics);
+ else
+ results.Add($"{segments[0]}\t{segments[1][0]}_HeaderId={wsResults[0].HeaderId};{segments[1][0]}_SubgroupId={wsResults[0].SubgroupId};{segments[1]}");
+ }
+ }
+ results.Add("END_HEADER");
+ if (processDataStandardFormat.InputPDSF is not null)
+ {
+ results.Add(string.Empty);
+ List hyphens = new();
+ results.AddRange(processDataStandardFormat.InputPDSF.Header.Select(l => l.Replace('\t', '|')));
+ results.Add(string.Empty);
+ results.Add($"|{string.Join("|", processDataStandardFormat.InputPDSF.Columns)}|");
+ for (int i = 0; i < processDataStandardFormat.InputPDSF.Columns.Count; i++)
+ hyphens.Add('-');
+ results.Add($"|{string.Join("|", hyphens)}|");
+ results.AddRange(processDataStandardFormat.InputPDSF.Body.Select(l => l.Replace('\t', '|')));
+ results.Add(string.Empty);
+ results.AddRange(processDataStandardFormat.InputPDSF.Footer.Select(l => l.Replace('\t', '|')));
+ results.Add(string.Empty);
+ results.Add("EOF");
+ results.Add(string.Empty);
+ string json = GetJson(processDataStandardFormat);
+ results.Add(json);
+ }
+ File.WriteAllText(path, string.Join(Environment.NewLine, results));
+ }
+
+ internal static Dictionary> GetDictionary(ProcessDataStandardFormat processDataStandardFormat)
+ {
+ Dictionary> results = new();
+ string[] segments;
+ foreach (string column in processDataStandardFormat.Columns)
+ results.Add(column, new List());
+ foreach (string bodyLine in processDataStandardFormat.Body)
+ {
+ segments = bodyLine.Split('\t');
+ for (int c = 1; c < segments.Length; c++)
+ {
+ if (c >= processDataStandardFormat.Columns.Count)
+ continue;
+ results[processDataStandardFormat.Columns[c]].Add(segments[c]);
+ }
+ }
+ return results;
+ }
+
+ internal static JsonElement[] GetArray(ProcessDataStandardFormat processDataStandardFormat, bool lookForNumbers = false)
+ {
+ JsonElement[] results;
+ if (processDataStandardFormat.Body.Count == 0 || !processDataStandardFormat.Body[0].Contains('\t'))
+ results = JsonSerializer.Deserialize("[]", JsonElementCollectionSourceGenerationContext.Default.JsonElementArray) ?? throw new Exception();
+ else
+ {
+ string value;
+ string[] segments;
+ List lines = new();
+ StringBuilder stringBuilder = new();
+ foreach (string bodyLine in processDataStandardFormat.Body)
+ {
+ _ = 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(processDataStandardFormat.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(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append("null,");
+ else if (value.All(char.IsDigit))
+ _ = stringBuilder.Append('"').Append(processDataStandardFormat.Columns[c]).Append("\":").Append(value).Append(',');
+ else
+ _ = stringBuilder.Append('"').Append(processDataStandardFormat.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) ?? throw new Exception();
+ }
+ return results;
+ }
+
+ internal 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;
+ }
+
+ internal static Tuple>>> GetTestDictionary(ProcessDataStandardFormat processDataStandardFormat)
+ {
+ Dictionary>> results = new();
+ List? collection;
+ string testColumn = nameof(Test);
+ Dictionary> keyValuePairs = GetDictionary(processDataStandardFormat);
+ 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>>>(processDataStandardFormat.Logistics[0], results);
+ }
+
+ internal 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();
+ }
+
+ 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")));
+ }
+
+ private static int? TryGetPropertyIndex(JsonProperty[] jsonProperties, string propertyName)
+ {
+ int? result = null;
+ for (int i = 0; i < jsonProperties.Length; i++)
+ {
+ if (jsonProperties[i].Name != propertyName)
+ continue;
+ result = i;
+ break;
+ }
+ if (result is null)
+ {
+ for (int i = 0; i < jsonProperties.Length; i++)
+ {
+ if (jsonProperties[i].Name[0] != propertyName[0])
+ continue;
+ if (jsonProperties[i].Name.Length != propertyName.Length)
+ continue;
+ if (jsonProperties[i].Name != propertyName)
+ continue;
+ result = i;
+ break;
+ }
+ }
+ return result;
+ }
+
+}
+
+[JsonSourceGenerationOptions(WriteIndented = true)]
+[JsonSerializable(typeof(JsonElement[]))]
+internal partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext
+{
}
\ No newline at end of file
diff --git a/Adaptation/Shared/ProcessDataStandardFormatMapping.cs b/Adaptation/Shared/ProcessDataStandardFormatMapping.cs
new file mode 100644
index 0000000..c5a75ec
--- /dev/null
+++ b/Adaptation/Shared/ProcessDataStandardFormatMapping.cs
@@ -0,0 +1,33 @@
+using System.Collections.ObjectModel;
+
+namespace Adaptation.Shared;
+
+public class ProcessDataStandardFormatMapping
+{
+
+ public ReadOnlyCollection BackfillColumns { get; private set; }
+ public ReadOnlyCollection ColumnIndices { get; private set; }
+ public ReadOnlyCollection IgnoreColumns { get; private set; }
+ public ReadOnlyCollection IndexOnlyColumns { get; private set; }
+ public ReadOnlyDictionary KeyValuePairs { get; private set; }
+ public ReadOnlyCollection NewColumnNames { get; private set; }
+ public ReadOnlyCollection OldColumnNames { get; private set; }
+
+ public ProcessDataStandardFormatMapping(ReadOnlyCollection backfillColumns,
+ ReadOnlyCollection columnIndices,
+ ReadOnlyCollection ignoreColumns,
+ ReadOnlyCollection indexOnlyColumns,
+ ReadOnlyDictionary keyValuePairs,
+ ReadOnlyCollection newColumnNames,
+ ReadOnlyCollection oldColumnNames)
+ {
+ BackfillColumns = backfillColumns;
+ ColumnIndices = columnIndices;
+ IgnoreColumns = ignoreColumns;
+ IndexOnlyColumns = indexOnlyColumns;
+ KeyValuePairs = keyValuePairs;
+ NewColumnNames = newColumnNames;
+ OldColumnNames = oldColumnNames;
+ }
+
+}
\ No newline at end of file
diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/MET08RESISRP2100.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/MET08RESISRP2100.cs
index 28a8018..615d23b 100644
--- a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/MET08RESISRP2100.cs
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/MET08RESISRP2100.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
-namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_59_0;
+namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class MET08RESISRP2100 : EAFLoggingUnitTesting
@@ -52,7 +52,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__MoveMatchingFiles()
+ public void Production__v2_59_0__MET08RESISRP2100__MoveMatchingFiles()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -65,7 +65,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -78,7 +78,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__IQSSi()
+ public void Production__v2_59_0__MET08RESISRP2100__IQSSi()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -91,7 +91,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsight()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsight()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -104,7 +104,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -117,7 +117,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__APC()
+ public void Production__v2_59_0__MET08RESISRP2100__APC()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -130,7 +130,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__SPaCe()
+ public void Production__v2_59_0__MET08RESISRP2100__SPaCe()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -143,7 +143,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Processed()
+ public void Production__v2_59_0__MET08RESISRP2100__Processed()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -156,7 +156,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Archive()
+ public void Production__v2_59_0__MET08RESISRP2100__Archive()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
@@ -169,7 +169,7 @@ public class MET08RESISRP2100 : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Dummy()
+ public void Production__v2_59_0__MET08RESISRP2100__Dummy()
{
string check = "638191594841489860.zip";
MethodBase methodBase = new StackFrame().GetMethod();
diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP-EQPT.cs
index ceef620..40730e4 100644
--- a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP-EQPT.cs
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP-EQPT.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
-namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_59_0;
+namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class SRP_EQPT : EAFLoggingUnitTesting
@@ -52,7 +52,7 @@ public class SRP_EQPT : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__SRP_EQPT__csv()
+ public void Production__v2_59_0__SRP_EQPT__csv()
{
string check = "*.csv";
MethodBase methodBase = new StackFrame().GetMethod();
diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP.cs
index 52b73f1..64b2b28 100644
--- a/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP.cs
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.59.0/SRP.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
-namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_59_0;
+namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
[TestClass]
public class SRP : EAFLoggingUnitTesting
@@ -52,7 +52,7 @@ public class SRP : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__SRP__json()
+ public void Production__v2_59_0__SRP__json()
{
string check = "*.json";
MethodBase methodBase = new StackFrame().GetMethod();
diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/MET08RESISRP2100.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/MET08RESISRP2100.cs
new file mode 100644
index 0000000..60b0348
--- /dev/null
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/MET08RESISRP2100.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_60_0;
+
+[TestClass]
+public class MET08RESISRP2100 : EAFLoggingUnitTesting
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ internal static string DummyRoot { get; private set; }
+ internal static MET08RESISRP2100 EAFLoggingUnitTesting { get; private set; }
+
+ static MET08RESISRP2100() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
+
+ public MET08RESISRP2100() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
+ {
+ if (EAFLoggingUnitTesting is null)
+ throw new Exception();
+ }
+
+ public MET08RESISRP2100(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
+ {
+ }
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ EAFLoggingUnitTesting ??= new MET08RESISRP2100(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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__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_60_0__MET08RESISRP2100__Dummy()
+ {
+ string check = "638191594841489860.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.60.0/SRP-EQPT.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/SRP-EQPT.cs
new file mode 100644
index 0000000..c6b0def
--- /dev/null
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/SRP-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_60_0;
+
+[TestClass]
+public class SRP_EQPT : EAFLoggingUnitTesting
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ internal static string DummyRoot { get; private set; }
+ internal static SRP_EQPT EAFLoggingUnitTesting { get; private set; }
+
+ static SRP_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
+
+ public SRP_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
+ {
+ if (EAFLoggingUnitTesting is null)
+ throw new Exception();
+ }
+
+ public SRP_EQPT(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
+ {
+ }
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ EAFLoggingUnitTesting ??= new SRP_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_60_0__SRP_EQPT__csv()
+ {
+ string check = "*.csv";
+ 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.60.0/SRP.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/SRP.cs
new file mode 100644
index 0000000..010d667
--- /dev/null
+++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.60.0/SRP.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_60_0;
+
+[TestClass]
+public class SRP : EAFLoggingUnitTesting
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ internal static string DummyRoot { get; private set; }
+ internal static SRP EAFLoggingUnitTesting { get; private set; }
+
+ static SRP() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
+
+ public SRP() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
+ {
+ if (EAFLoggingUnitTesting is null)
+ throw new Exception();
+ }
+
+ public SRP(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
+ {
+ }
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ EAFLoggingUnitTesting ??= new SRP(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_60_0__SRP__json()
+ {
+ string check = "*.json";
+ 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/MET08RESISRP2100.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/MET08RESISRP2100.cs
index 9b36b6b..c777e0e 100644
--- a/Adaptation/_Tests/Extract/Production/v2.59.0/MET08RESISRP2100.cs
+++ b/Adaptation/_Tests/Extract/Production/v2.59.0/MET08RESISRP2100.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -6,7 +6,7 @@ using System;
using System.Diagnostics;
using System.Reflection;
-namespace Adaptation._Tests.Extract.Staging.v2_59_0;
+namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class MET08RESISRP2100
@@ -15,13 +15,13 @@ public class MET08RESISRP2100
#pragma warning disable CA2254
#pragma warning disable IDE0060
- private static CreateSelfDescription.Staging.v2_59_0.MET08RESISRP2100 _MET08RESISRP2100;
+ private static CreateSelfDescription.Production.v2_59_0.MET08RESISRP2100 _MET08RESISRP2100;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
- CreateSelfDescription.Staging.v2_59_0.MET08RESISRP2100.ClassInitialize(testContext);
- _MET08RESISRP2100 = CreateSelfDescription.Staging.v2_59_0.MET08RESISRP2100.EAFLoggingUnitTesting;
+ CreateSelfDescription.Production.v2_59_0.MET08RESISRP2100.ClassInitialize(testContext);
+ _MET08RESISRP2100 = CreateSelfDescription.Production.v2_59_0.MET08RESISRP2100.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@@ -35,23 +35,23 @@ public class MET08RESISRP2100
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__MoveMatchingFiles() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__MoveMatchingFiles();
+ public void Production__v2_59_0__MET08RESISRP2100__MoveMatchingFiles() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__MoveMatchingFiles();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer638191594841489860__First()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer638191594841489860__First()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
- _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
+ _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@@ -63,17 +63,17 @@ public class MET08RESISRP2100
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__IQSSi() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__IQSSi();
+ public void Production__v2_59_0__MET08RESISRP2100__IQSSi() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__IQSSi();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__IQSSi638191594841489860__First()
+ public void Production__v2_59_0__MET08RESISRP2100__IQSSi638191594841489860__First()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
- _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__IQSSi();
+ _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__IQSSi();
string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@@ -85,17 +85,17 @@ public class MET08RESISRP2100
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsight() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsight();
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsight() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsight();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsight638191594841489860__First()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsight638191594841489860__First()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
- _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsight();
+ _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsight();
string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@@ -107,17 +107,17 @@ public class MET08RESISRP2100
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments638191594841489860__First()
+ public void Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments638191594841489860__First()
{
string check = "*.pdsf";
MethodBase methodBase = new StackFrame().GetMethod();
- _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
+ _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
@@ -129,31 +129,31 @@ public class MET08RESISRP2100
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__APC() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__APC();
+ public void Production__v2_59_0__MET08RESISRP2100__APC() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__APC();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__SPaCe() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__SPaCe();
+ public void Production__v2_59_0__MET08RESISRP2100__SPaCe() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__SPaCe();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Processed() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__Processed();
+ public void Production__v2_59_0__MET08RESISRP2100__Processed() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__Processed();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Archive() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__Archive();
+ public void Production__v2_59_0__MET08RESISRP2100__Archive() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__Archive();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__MET08RESISRP2100__Dummy() => _MET08RESISRP2100.Staging__v2_59_0__MET08RESISRP2100__Dummy();
+ public void Production__v2_59_0__MET08RESISRP2100__Dummy() => _MET08RESISRP2100.Production__v2_59_0__MET08RESISRP2100__Dummy();
}
#endif
\ No newline at end of file
diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/SRP-EQPT.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/SRP-EQPT.cs
index f0b0bfa..410f7c5 100644
--- a/Adaptation/_Tests/Extract/Production/v2.59.0/SRP-EQPT.cs
+++ b/Adaptation/_Tests/Extract/Production/v2.59.0/SRP-EQPT.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -6,7 +6,7 @@ using System;
using System.Diagnostics;
using System.Reflection;
-namespace Adaptation._Tests.Extract.Staging.v2_59_0;
+namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class SRP_EQPT
@@ -15,13 +15,13 @@ public class SRP_EQPT
#pragma warning disable CA2254
#pragma warning disable IDE0060
- private static CreateSelfDescription.Staging.v2_59_0.SRP_EQPT _SRP_EQPT;
+ private static CreateSelfDescription.Production.v2_59_0.SRP_EQPT _SRP_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
- CreateSelfDescription.Staging.v2_59_0.SRP_EQPT.ClassInitialize(testContext);
- _SRP_EQPT = CreateSelfDescription.Staging.v2_59_0.SRP_EQPT.EAFLoggingUnitTesting;
+ CreateSelfDescription.Production.v2_59_0.SRP_EQPT.ClassInitialize(testContext);
+ _SRP_EQPT = CreateSelfDescription.Production.v2_59_0.SRP_EQPT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@@ -35,15 +35,15 @@ public class SRP_EQPT
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__SRP_EQPT__csv() => _SRP_EQPT.Staging__v2_59_0__SRP_EQPT__csv();
+ public void Production__v2_59_0__SRP_EQPT__csv() => _SRP_EQPT.Production__v2_59_0__SRP_EQPT__csv();
[Ignore]
[TestMethod]
- public void Staging__v2_59_0__SRP_EQPT__csv638185594063339969__First()
+ public void Production__v2_59_0__SRP_EQPT__csv638185594063339969__First()
{
string check = "*.csv";
bool validatePDSF = false;
- _SRP_EQPT.Staging__v2_59_0__SRP_EQPT__csv();
+ _SRP_EQPT.Production__v2_59_0__SRP_EQPT__csv();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SRP_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SRP_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
diff --git a/Adaptation/_Tests/Extract/Production/v2.59.0/SRP.cs b/Adaptation/_Tests/Extract/Production/v2.59.0/SRP.cs
index 4608206..5a288d7 100644
--- a/Adaptation/_Tests/Extract/Production/v2.59.0/SRP.cs
+++ b/Adaptation/_Tests/Extract/Production/v2.59.0/SRP.cs
@@ -1,4 +1,4 @@
-#if true
+#if v2_59_0
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -6,7 +6,7 @@ using System;
using System.Diagnostics;
using System.Reflection;
-namespace Adaptation._Tests.Extract.Staging.v2_59_0;
+namespace Adaptation._Tests.Extract.Production.v2_59_0;
[TestClass]
public class SRP
@@ -15,13 +15,13 @@ public class SRP
#pragma warning disable CA2254
#pragma warning disable IDE0060
- private static CreateSelfDescription.Staging.v2_59_0.SRP _SRP;
+ private static CreateSelfDescription.Production.v2_59_0.SRP _SRP;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
- CreateSelfDescription.Staging.v2_59_0.SRP.ClassInitialize(testContext);
- _SRP = CreateSelfDescription.Staging.v2_59_0.SRP.EAFLoggingUnitTesting;
+ CreateSelfDescription.Production.v2_59_0.SRP.ClassInitialize(testContext);
+ _SRP = CreateSelfDescription.Production.v2_59_0.SRP.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@@ -35,17 +35,17 @@ public class SRP
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__SRP__json() => _SRP.Staging__v2_59_0__SRP__json();
+ public void Production__v2_59_0__SRP__json() => _SRP.Production__v2_59_0__SRP__json();
#if DEBUG
[Ignore]
#endif
[TestMethod]
- public void Staging__v2_59_0__SRP__json638185594063339969__First()
+ public void Production__v2_59_0__SRP__json638185594063339969__First()
{
string check = "*.json";
bool validatePDSF = false;
- _SRP.Staging__v2_59_0__SRP__json();
+ _SRP.Production__v2_59_0__SRP__json();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _SRP.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _SRP.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
diff --git a/Adaptation/_Tests/Extract/Production/v2.60.0/MET08RESISRP2100.cs b/Adaptation/_Tests/Extract/Production/v2.60.0/MET08RESISRP2100.cs
new file mode 100644
index 0000000..51f107e
--- /dev/null
+++ b/Adaptation/_Tests/Extract/Production/v2.60.0/MET08RESISRP2100.cs
@@ -0,0 +1,159 @@
+#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_60_0;
+
+[TestClass]
+public class MET08RESISRP2100
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ private static CreateSelfDescription.Production.v2_60_0.MET08RESISRP2100 _MET08RESISRP2100;
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ CreateSelfDescription.Production.v2_60_0.MET08RESISRP2100.ClassInitialize(testContext);
+ _MET08RESISRP2100 = CreateSelfDescription.Production.v2_60_0.MET08RESISRP2100.EAFLoggingUnitTesting;
+ }
+
+ private static void NonThrowTryCatch()
+ {
+ try
+ { throw new Exception(); }
+ catch (Exception) { }
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__MoveMatchingFiles() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__MoveMatchingFiles();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewer() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewer638191594841489860__First()
+ {
+ string check = "*.pdsf";
+ MethodBase methodBase = new StackFrame().GetMethod();
+ _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewer();
+ string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
+ IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
+ NonThrowTryCatch();
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__IQSSi() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__IQSSi();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__IQSSi638191594841489860__First()
+ {
+ string check = "*.pdsf";
+ MethodBase methodBase = new StackFrame().GetMethod();
+ _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__IQSSi();
+ string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
+ IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
+ NonThrowTryCatch();
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsight() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsight();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsight638191594841489860__First()
+ {
+ string check = "*.pdsf";
+ MethodBase methodBase = new StackFrame().GetMethod();
+ _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsight();
+ string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
+ IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
+ NonThrowTryCatch();
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments638191594841489860__First()
+ {
+ string check = "*.pdsf";
+ MethodBase methodBase = new StackFrame().GetMethod();
+ _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__OpenInsightMetrologyViewerAttachments();
+ string[] variables = _MET08RESISRP2100.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
+ IFileRead fileRead = _MET08RESISRP2100.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
+ NonThrowTryCatch();
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__APC() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__APC();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__SPaCe() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__SPaCe();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__Processed() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__Processed();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__Archive() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__Archive();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__MET08RESISRP2100__Dummy() => _MET08RESISRP2100.Production__v2_60_0__MET08RESISRP2100__Dummy();
+
+}
+#endif
\ No newline at end of file
diff --git a/Adaptation/_Tests/Extract/Production/v2.60.0/SRP-EQPT.cs b/Adaptation/_Tests/Extract/Production/v2.60.0/SRP-EQPT.cs
new file mode 100644
index 0000000..331df8b
--- /dev/null
+++ b/Adaptation/_Tests/Extract/Production/v2.60.0/SRP-EQPT.cs
@@ -0,0 +1,56 @@
+#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_60_0;
+
+[TestClass]
+public class SRP_EQPT
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ private static CreateSelfDescription.Production.v2_60_0.SRP_EQPT _SRP_EQPT;
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ CreateSelfDescription.Production.v2_60_0.SRP_EQPT.ClassInitialize(testContext);
+ _SRP_EQPT = CreateSelfDescription.Production.v2_60_0.SRP_EQPT.EAFLoggingUnitTesting;
+ }
+
+ private static void NonThrowTryCatch()
+ {
+ try
+ { throw new Exception(); }
+ catch (Exception) { }
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__SRP_EQPT__csv() => _SRP_EQPT.Production__v2_60_0__SRP_EQPT__csv();
+
+ [Ignore]
+ [TestMethod]
+ public void Production__v2_60_0__SRP_EQPT__csv638185594063339969__First()
+ {
+ string check = "*.csv";
+ bool validatePDSF = false;
+ _SRP_EQPT.Production__v2_60_0__SRP_EQPT__csv();
+ MethodBase methodBase = new StackFrame().GetMethod();
+ string[] variables = _SRP_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
+ IFileRead fileRead = _SRP_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
+ NonThrowTryCatch();
+ }
+
+}
+#endif
\ No newline at end of file
diff --git a/Adaptation/_Tests/Extract/Production/v2.60.0/SRP.cs b/Adaptation/_Tests/Extract/Production/v2.60.0/SRP.cs
new file mode 100644
index 0000000..2e3772c
--- /dev/null
+++ b/Adaptation/_Tests/Extract/Production/v2.60.0/SRP.cs
@@ -0,0 +1,58 @@
+#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_60_0;
+
+[TestClass]
+public class SRP
+{
+
+#pragma warning disable CA2254
+#pragma warning disable IDE0060
+
+ private static CreateSelfDescription.Production.v2_60_0.SRP _SRP;
+
+ [ClassInitialize]
+ public static void ClassInitialize(TestContext testContext)
+ {
+ CreateSelfDescription.Production.v2_60_0.SRP.ClassInitialize(testContext);
+ _SRP = CreateSelfDescription.Production.v2_60_0.SRP.EAFLoggingUnitTesting;
+ }
+
+ private static void NonThrowTryCatch()
+ {
+ try
+ { throw new Exception(); }
+ catch (Exception) { }
+ }
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__SRP__json() => _SRP.Production__v2_60_0__SRP__json();
+
+#if DEBUG
+ [Ignore]
+#endif
+ [TestMethod]
+ public void Production__v2_60_0__SRP__json638185594063339969__First()
+ {
+ string check = "*.json";
+ bool validatePDSF = false;
+ _SRP.Production__v2_60_0__SRP__json();
+ MethodBase methodBase = new StackFrame().GetMethod();
+ string[] variables = _SRP.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
+ IFileRead fileRead = _SRP.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
+ Logistics logistics = new(fileRead);
+ _ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
+ NonThrowTryCatch();
+ }
+
+}
+#endif
\ No newline at end of file
diff --git a/Adaptation/_Tests/Shared/AdaptationTesting.cs b/Adaptation/_Tests/Shared/AdaptationTesting.cs
index 8a341d4..8c0bc93 100644
--- a/Adaptation/_Tests/Shared/AdaptationTesting.cs
+++ b/Adaptation/_Tests/Shared/AdaptationTesting.cs
@@ -56,11 +56,33 @@ public class AdaptationTesting : ISMTP
public Dictionary ParameterizedModelObjectDefinitionTypes => _ParameterizedModelObjectDefinitionTypes;
public Dictionary>> EquipmentDictionaryEventDescriptions => _EquipmentDictionaryEventDescriptions;
- void ISMTP.SendLowPriorityEmailMessage(string subject, string body) => throw new NotImplementedException();
+ void ISMTP.SendLowPriorityEmailMessage(string subject, string body) =>
+ throw new NotImplementedException();
- void ISMTP.SendHighPriorityEmailMessage(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();
+ void ISMTP.SendNormalPriorityEmailMessage(string subject, string body) =>
+ throw new NotImplementedException();
+
+ 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 AdaptationTesting(string dummyRoot, TestContext testContext, bool skipEquipmentDictionary, string testContextPropertiesAsJson, bool hasWaitForProperty)
{
@@ -105,93 +127,6 @@ public class AdaptationTesting : ISMTP
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;
@@ -275,74 +210,58 @@ public class AdaptationTesting : ISMTP
return result;
}
- private MethodBaseName GetMethodBaseName(MethodBase methodBase)
+ protected static string GetCellInstanceConnectionName(string cellInstanceConnectionName)
{
- MethodBaseName result;
- string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
- result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory);
+ 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 string[] GetTextFiles(MethodBaseName mbn)
+ private static string GetMethodBaseNameWithActualCICN(string methodBaseName, string cellInstanceName, string cellInstanceConnectionNameFromMethodBaseName, string cellInstanceConnectionName, string ticks)
{
- 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);
- }
- }
+ string results;
+ if (string.IsNullOrEmpty(cellInstanceConnectionNameFromMethodBaseName) || string.IsNullOrEmpty(cellInstanceConnectionName))
+ results = methodBaseName;
+ else if (cellInstanceConnectionNameFromMethodBaseName.Length != cellInstanceConnectionName.Length)
+ throw new Exception();
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);
- }
+ 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;
}
- 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;
@@ -368,6 +287,54 @@ public class AdaptationTesting : ISMTP
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;
+ }
+
+ 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;
+ }
+
+ private string GetTestResultsDirectory(bool hasWaitForProperty)
+ {
+ string result = GetTestResultsDirectory(_TestContext.TestResultsDirectory, hasWaitForProperty);
+ return result;
+ }
+
protected Tuple GetCellInstanceVersionTuple(string cellInstanceName, string cellInstanceVersionName)
{
Tuple result;
@@ -382,41 +349,6 @@ public class AdaptationTesting : ISMTP
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();
@@ -608,6 +540,62 @@ public class AdaptationTesting : ISMTP
return results.ToArray();
}
+ 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;
+ }
+
+ private MethodBaseName GetMethodBaseName(MethodBase methodBase)
+ {
+ MethodBaseName result;
+ string testResultsDirectory = GetTestResultsDirectory(_HasWaitForProperty);
+ result = GetMethodBaseName(_DummyRoot, _Environment, _HasWaitForProperty, methodBase.Name, testResultsDirectory);
+ 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 FileConnectorConfiguration GetFileConnectorConfiguration(string json, ComponentsCellComponentCellComponent componentsCellComponentCellComponent)
{
FileConnectorConfiguration result;
@@ -640,21 +628,55 @@ public class AdaptationTesting : ISMTP
return result;
}
- protected Tuple GetFileConnectorConfigurationTuple(Tuple cellInstanceVersionTuple, string cellInstanceConnectionName)
+ protected Tuple GetEquipmentTypeVersionTuple(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName)
{
- Tuple result;
- FileConnectorConfiguration fileConnectorConfiguration;
- string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName);
- if (!_FileConnectorConfigurations.TryGetValue(cellInstanceServiceV2With, out fileConnectorConfiguration))
+ 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))
{
- 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);
+ equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2);
+ _EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion);
+ }
+ result = new Tuple(equipmentTypeServiceV2, componentsCellComponentCellComponent.Equipment.EquipmentType.Name, componentsCellComponentCellComponent.Equipment.EquipmentType.Version, equipmentTypeVersion);
+ 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();
}
- result = new Tuple(cellInstanceServiceV2With, fileConnectorConfiguration);
return result;
}
@@ -683,35 +705,6 @@ public class AdaptationTesting : ISMTP
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;
@@ -736,18 +729,38 @@ public class AdaptationTesting : ISMTP
return results;
}
- protected Tuple> GetModelObjectParameters(Tuple equipmentTypeVersionTuple)
+ protected Tuple GetEquipmentDictionaryVersionTuple(CellInstanceVersion cellInstanceVersion, string cellInstanceConnectionName, EquipmentTypeVersion equipmentTypeVersion)
{
- Tuple> result;
- IList modelObjectParameters;
- if (_FileConnectorConfigurations.ContainsKey(equipmentTypeVersionTuple.Item1))
- modelObjectParameters = _ModelObjectParameters[equipmentTypeVersionTuple.Item1];
+ 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
{
- string json = JsonSerializer.Serialize(equipmentTypeVersionTuple.Item4, new JsonSerializerOptions { WriteIndented = true });
- modelObjectParameters = GetModelObjectParameters(json);
+ equipmentDictionaryName = segments[0];
+ equipmentDictionaryVersionName = segments[1];
}
- result = new Tuple>(equipmentTypeVersionTuple.Item1, modelObjectParameters);
+ 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;
}
@@ -802,70 +815,6 @@ public class AdaptationTesting : ISMTP
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()
@@ -886,108 +835,6 @@ public class AdaptationTesting : ISMTP
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;
@@ -1090,80 +937,118 @@ public class AdaptationTesting : ISMTP
return results;
}
- internal static Tuple GetLogisticsColumnsAndBody(string fileFullName)
+ private string[] GetTextFiles(MethodBaseName mbn)
{
- 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);
+ 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
{
- 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]);
+ 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);
+ }
}
- 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)
+ public IFileRead Get(MethodBase methodBase, string sourceFileLocation, string sourceFileFilter, bool useCyclicalForDescription)
{
- 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)
+ 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