Compare commits
13 Commits
36291ae434
...
08-25-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 0afa7b7060 | |||
| c6fafbe6f4 | |||
| 449ee46896 | |||
| 6a7f36b98c | |||
| 16e3389a7d | |||
| 97bff23ca3 | |||
| 6564bb0116 | |||
| 5d16251f28 | |||
| 5c0a3e53d3 | |||
| 4daa40282c | |||
| 751cc3046a | |||
| 8e293f9692 | |||
| 1aa0e9affa |
16
.gitignore
vendored
16
.gitignore
vendored
@ -331,11 +331,15 @@ ASALocalRun/
|
|||||||
##
|
##
|
||||||
## Visual Studio Code
|
## Visual Studio Code
|
||||||
##
|
##
|
||||||
*/!.vscode/extensions.json
|
**/.vscode/*
|
||||||
*/!.vscode/launch.json
|
!**/.vscode/extensions.json
|
||||||
*/!.vscode/settings.json
|
!**/.vscode/format-report.json
|
||||||
*/!.vscode/tasks.json
|
!**/.vscode/launch.json
|
||||||
*/.vscode/*
|
!**/.vscode/settings.json
|
||||||
*/.vscode/ReportGenerator/*
|
!**/.vscode/tasks.json
|
||||||
|
!**/.vscode/mklink.md
|
||||||
|
|
||||||
*.lnk
|
*.lnk
|
||||||
|
|
||||||
|
.kanbn
|
||||||
|
Adaptation/.kanbn
|
||||||
|
|||||||
55
.vscode/settings.json
vendored
Normal file
55
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"files.eol": "\n",
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.wordWrap": "off"
|
||||||
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"PDSF",
|
||||||
|
"Syncthing"
|
||||||
|
],
|
||||||
|
"files.exclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"foam.files.ignore": [
|
||||||
|
".foam/**/*",
|
||||||
|
".stfolder/**/*",
|
||||||
|
"**/_layouts/**/*",
|
||||||
|
"**/_site/**/*",
|
||||||
|
"**/.vscode/**/*",
|
||||||
|
"**/node_modules/**/*"
|
||||||
|
],
|
||||||
|
"kanbn.showBurndownButton": false,
|
||||||
|
"kanbn.showSprintButton": false,
|
||||||
|
"foam.links.hover.enable": false,
|
||||||
|
"foam.placeholders.exclude": [
|
||||||
|
".kanbn/Archive/**/*"
|
||||||
|
],
|
||||||
|
"foam.orphans.exclude": [
|
||||||
|
".journal/**/*"
|
||||||
|
],
|
||||||
|
"foam.graph.style": {
|
||||||
|
"background": "#202020",
|
||||||
|
"node": {
|
||||||
|
"wired": "green",
|
||||||
|
"wireless": "orange",
|
||||||
|
"person": "white",
|
||||||
|
"topic": "#bc2a3c",
|
||||||
|
"kanbn": "#ff7b00",
|
||||||
|
"basic-note": "#773b93",
|
||||||
|
"daily-note": "#ff9d00",
|
||||||
|
"note": "#f2cb1d",
|
||||||
|
"placeholder": "#ff9d00",
|
||||||
|
"tag": "#0494c1",
|
||||||
|
"bug": "#bc2a3c",
|
||||||
|
"epic": "#ff7b00",
|
||||||
|
"feature": "#773b93",
|
||||||
|
"issue": "#ff9d00",
|
||||||
|
"task": "#f2cb1d",
|
||||||
|
"test-case": "#ff9d00",
|
||||||
|
"user-story": "#0494c1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,19 @@
|
|||||||
|
[*.md]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
|
[*.csproj]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
[*.cs]
|
[*.cs]
|
||||||
csharp_indent_block_contents = true
|
csharp_indent_block_contents = true
|
||||||
csharp_indent_braces = false
|
csharp_indent_braces = false
|
||||||
@ -82,13 +98,32 @@ dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property
|
|||||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
||||||
dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
|
dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
|
||||||
|
dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
|
||||||
|
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
||||||
|
dotnet_diagnostic.CA1861.severity = none # CA1861: Prefer 'static readonly' fields over constant array arguments
|
||||||
|
dotnet_diagnostic.CA1862.severity = none # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
|
||||||
|
dotnet_diagnostic.CA1864.severity = none # CA1864: To avoid double lookup, call 'TryAdd' instead of calling 'Add' with a 'ContainsKey' guard
|
||||||
|
dotnet_diagnostic.CA1866.severity = none # CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
|
||||||
|
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
||||||
|
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
||||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
dotnet_diagnostic.IDE0005.severity = none # Using directive is unnecessary
|
||||||
|
dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||||
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
|
||||||
|
dotnet_diagnostic.IDE0200.severity = warning # IDE0200: Lambda expression can be removed
|
||||||
|
dotnet_diagnostic.IDE0270.severity = none # IDE0270: Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
||||||
|
dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.MSTEST0015.severity = none # MSTEST0015: Test method {method} should not be ignored
|
||||||
|
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.severity = warning
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||||
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
||||||
|
|||||||
5
Adaptation/.vscode/mklink.md
vendored
Normal file
5
Adaptation/.vscode/mklink.md
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# mklink
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mklink /J "T:\MET08AWCT\06_SourceCode\MET08AWCT\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\MET08AWCT"
|
||||||
|
```
|
||||||
3
Adaptation/.vscode/settings.json
vendored
3
Adaptation/.vscode/settings.json
vendored
@ -1,4 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.wordWrap": "off"
|
||||||
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"ANLYSDIFAAST",
|
"ANLYSDIFAAST",
|
||||||
"datauniqueid",
|
"datauniqueid",
|
||||||
|
|||||||
235
Adaptation/.vscode/tasks.json
vendored
235
Adaptation/.vscode/tasks.json
vendored
@ -1,42 +1,245 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"default": "Development",
|
||||||
|
"description": "Which ASP Net Core Environment?",
|
||||||
|
"id": "ASPNETCORE_ENVIRONMENT",
|
||||||
|
"options": [
|
||||||
|
"Development",
|
||||||
|
"Production"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{AssemblyTitle}",
|
||||||
|
"description": "What Assembly Title?",
|
||||||
|
"id": "AssemblyTitle",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.BuildId}",
|
||||||
|
"description": "Which Build BuildId?",
|
||||||
|
"id": "Build.BuildId",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Reason}",
|
||||||
|
"description": "Which Build Reason?",
|
||||||
|
"id": "Build.Reason",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Repository.Id}",
|
||||||
|
"description": "Which Build Repository Id?",
|
||||||
|
"id": "Build.Repository.Id",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.Repository.Name}",
|
||||||
|
"description": "Which Build Repository Name?",
|
||||||
|
"id": "Build.Repository.Name",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{Build.SourceVersion}",
|
||||||
|
"description": "Which Build Source Version?",
|
||||||
|
"id": "Build.SourceVersion",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "Debug",
|
||||||
|
"description": "Which Configuration?",
|
||||||
|
"id": "Configuration",
|
||||||
|
"options": [
|
||||||
|
"Debug",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "net8.0",
|
||||||
|
"description": "Which Core Version?",
|
||||||
|
"id": "CoreVersion",
|
||||||
|
"options": [
|
||||||
|
"net8.0"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"description": "Which MS Build?",
|
||||||
|
"id": "MSBuild",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/",
|
||||||
|
"description": "Which Nuget Source?",
|
||||||
|
"id": "NugetSource",
|
||||||
|
"type": "promptString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "win-x64",
|
||||||
|
"description": "Which Runtime?",
|
||||||
|
"id": "Runtime",
|
||||||
|
"options": [
|
||||||
|
"win-x64",
|
||||||
|
"win-x32",
|
||||||
|
"linux-x64",
|
||||||
|
"linux-x32"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "L:/",
|
||||||
|
"description": "Which System DefaultWorkingDirectory?",
|
||||||
|
"id": "System.DefaultWorkingDirectory",
|
||||||
|
"options": [
|
||||||
|
"L:/",
|
||||||
|
"D:/",
|
||||||
|
"C:/"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "v4.8",
|
||||||
|
"description": "Which Core Target Framework Version?",
|
||||||
|
"id": "TargetFrameworkVersion",
|
||||||
|
"options": [
|
||||||
|
"v4.8"
|
||||||
|
],
|
||||||
|
"type": "pickString"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "{UserSecretsId}",
|
||||||
|
"description": "Which Core User Secrets Id?",
|
||||||
|
"id": "UserSecretsId",
|
||||||
|
"type": "promptString"
|
||||||
|
}
|
||||||
|
],
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "build",
|
"label": "Build",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
"build",
|
"build"
|
||||||
"${workspaceFolder}/MET08ANLYSDIFAAST230.Tests.csproj",
|
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "publish",
|
"label": "Test Debug",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
"publish",
|
"test",
|
||||||
"${workspaceFolder}/MET08ANLYSDIFAAST230.Tests.csproj",
|
"-c",
|
||||||
"/property:GenerateFullPaths=true",
|
"Debug"
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "watch",
|
"label": "Test Release",
|
||||||
"command": "dotnet",
|
"command": "dotnet",
|
||||||
"type": "process",
|
"type": "process",
|
||||||
"args": [
|
"args": [
|
||||||
"watch",
|
"test",
|
||||||
"run",
|
"-c",
|
||||||
"${workspaceFolder}/MET08ANLYSDIFAAST230.Tests.csproj",
|
"Release"
|
||||||
"/property:GenerateFullPaths=true",
|
|
||||||
"/consoleloggerparameters:NoSummary"
|
|
||||||
],
|
],
|
||||||
"problemMatcher": "$msCompile"
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Nuget Clear",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"nuget",
|
||||||
|
"locals",
|
||||||
|
"all",
|
||||||
|
"--clear"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MSBuild for EAF Deployment Packages",
|
||||||
|
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"/target:Build",
|
||||||
|
"/restore:True",
|
||||||
|
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
|
||||||
|
"/detailedsummary",
|
||||||
|
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||||
|
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||||
|
"../MET08ANLYSDIFAAST230.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Code Project",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "code ../MET08ANLYSDIFAAST230.csproj",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Code Read Me",
|
||||||
|
"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/MET08ANLYSDIFAAST230",
|
||||||
|
"Day-Helper-2025-03-20",
|
||||||
|
"false",
|
||||||
|
"4"
|
||||||
|
],
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Code Git Config",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "code ../.git/config",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Kanbn Console",
|
||||||
|
"type": "npm",
|
||||||
|
"script": "kanbn.board",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Kanbn Write Boad",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Kanbn Write json",
|
||||||
|
"type": "npm",
|
||||||
|
"script": "kanbn.board.json",
|
||||||
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.APC;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -120,15 +120,15 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private readonly string _JobIdParentDirectory;
|
private readonly string _JobIdParentDirectory;
|
||||||
private readonly string _JobIdArchiveParentDirectory;
|
private readonly string _JobIdArchiveParentDirectory;
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -115,10 +115,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0060
|
||||||
private void MoveArchive(string reportFullPath, DateTime dateTime)
|
private void MoveArchive(string reportFullPath, DateTime dateTime)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||||
@ -128,7 +128,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||||
if (!Directory.Exists(jobIdDirectory))
|
if (!Directory.Exists(jobIdDirectory))
|
||||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||||
if (!Directory.GetDirectories(jobIdDirectory).Any())
|
if (Directory.GetDirectories(jobIdDirectory).Length == 0)
|
||||||
File.Copy(reportFullPath, Path.Combine(destinationArchiveDirectory, Path.GetFileName(reportFullPath)));
|
File.Copy(reportFullPath, Path.Combine(destinationArchiveDirectory, Path.GetFileName(reportFullPath)));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -144,15 +144,15 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
MoveArchive(reportFullPath, dateTime);
|
MoveArchive(reportFullPath, dateTime);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,20 +9,20 @@ namespace Adaptation.FileHandlers;
|
|||||||
public class CellInstanceConnectionName
|
public class CellInstanceConnectionName
|
||||||
{
|
{
|
||||||
|
|
||||||
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
internal static IFileRead Get(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
|
||||||
{
|
{
|
||||||
IFileRead result = cellInstanceConnectionName switch
|
IFileRead result = cellInstanceConnectionName switch
|
||||||
{
|
{
|
||||||
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||||
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -23,8 +23,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
private int _LastDummyRunIndex;
|
private int _LastDummyRunIndex;
|
||||||
private readonly string[] _CellNames;
|
private readonly string[] _CellNames;
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -157,7 +157,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!Directory.Exists(inProcessDirectory))
|
if (!Directory.Exists(inProcessDirectory))
|
||||||
_ = Directory.CreateDirectory(inProcessDirectory);
|
_ = Directory.CreateDirectory(inProcessDirectory);
|
||||||
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
files = Directory.GetFiles(inProcessDirectory, "*", SearchOption.AllDirectories);
|
||||||
if (files.Any())
|
if (files.Length != 0)
|
||||||
{
|
{
|
||||||
if (files.Length > 250)
|
if (files.Length > 250)
|
||||||
throw new Exception("Safety net!");
|
throw new Exception("Safety net!");
|
||||||
|
|||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.IQSSi;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -103,7 +103,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FileCopy<T>(string reportFullPath, DateTime dateTime, List<T> descriptions) where T : Shared.Properties.IDescription
|
private void WriteFile<T>(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List<T> descriptions) where T : Shared.Properties.IDescription
|
||||||
{
|
{
|
||||||
bool isDummyRun = false;
|
bool isDummyRun = false;
|
||||||
string successDirectory = string.Empty;
|
string successDirectory = string.Empty;
|
||||||
@ -111,25 +111,24 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
||||||
if (!Directory.Exists(duplicateDirectory))
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
string duplicateFile = Path.Combine(duplicateDirectory, $"{Path.GetFileName(reportFullPath)}.xml");
|
||||||
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
string xml = ProcessDataStandardFormat.GetXml(processDataStandardFormat);
|
||||||
|
File.WriteAllText(duplicateFile, xml);
|
||||||
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
WriteFile(reportFullPath, dateTime, processDataStandardFormat, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using Adaptation.Shared.Duplicator;
|
|||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -13,11 +14,65 @@ using System.Threading;
|
|||||||
|
|
||||||
namespace Adaptation.FileHandlers.MoveMatchingFiles;
|
namespace Adaptation.FileHandlers.MoveMatchingFiles;
|
||||||
|
|
||||||
|
#nullable enable
|
||||||
|
|
||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
internal class PreWith
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
{
|
||||||
|
|
||||||
|
internal string ErrFile { get; private set; }
|
||||||
|
internal string CheckFile { get; private set; }
|
||||||
|
internal string MatchingFile { get; private set; }
|
||||||
|
internal string CheckDirectory { get; private set; }
|
||||||
|
internal string NoWaitDirectory { get; private set; }
|
||||||
|
|
||||||
|
internal PreWith(string checkDirectory,
|
||||||
|
string checkFile,
|
||||||
|
string errFile,
|
||||||
|
string matchingFile,
|
||||||
|
string noWaitDirectory)
|
||||||
|
{
|
||||||
|
ErrFile = errFile;
|
||||||
|
CheckFile = checkFile;
|
||||||
|
MatchingFile = matchingFile;
|
||||||
|
CheckDirectory = checkDirectory;
|
||||||
|
NoWaitDirectory = noWaitDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class Pre
|
||||||
|
{
|
||||||
|
|
||||||
|
internal string MatchingFile { get; private set; }
|
||||||
|
internal string CheckFile { get; private set; }
|
||||||
|
|
||||||
|
internal Pre(string matchingFile, string checkFile)
|
||||||
|
{
|
||||||
|
MatchingFile = matchingFile;
|
||||||
|
CheckFile = checkFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class Post
|
||||||
|
{
|
||||||
|
|
||||||
|
internal string ErrFile { get; private set; }
|
||||||
|
internal string CheckFile { get; private set; }
|
||||||
|
|
||||||
|
internal Post(string checkFile, string errFile)
|
||||||
|
{
|
||||||
|
ErrFile = errFile;
|
||||||
|
CheckFile = checkFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -42,7 +97,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Move(extractResults);
|
Move(extractResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
void IFileRead.WaitForThread() =>
|
||||||
|
WaitForThread(thread: null, threadExceptions: null);
|
||||||
|
|
||||||
string IFileRead.GetEventDescription()
|
string IFileRead.GetEventDescription()
|
||||||
{
|
{
|
||||||
@ -89,7 +145,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
results = GetExtractResult(reportFullPath, dateTime);
|
results = GetExtractResult(reportFullPath, dateTime);
|
||||||
if (results.Item3 is null)
|
if (results.Item3 is null)
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]") ?? throw new Exception(), results.Item4);
|
||||||
if (results.Item3.Length > 0 && _IsEAFHosted)
|
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||||
WritePDSF(this, results.Item3);
|
WritePDSF(this, results.Item3);
|
||||||
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||||
@ -105,7 +161,73 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<string> GetSearchDirectories(int numberLength, string parentDirectory)
|
private static ProcessDataStandardFormatMapping GetProcessDataStandardFormatMapping(string processDataStandardFormatMappingOldColumnNames, string processDataStandardFormatMappingNewColumnNames, string processDataStandardFormatMappingColumnIndices)
|
||||||
|
{
|
||||||
|
ProcessDataStandardFormatMapping result;
|
||||||
|
string[] segmentsB;
|
||||||
|
List<string> distinct = new();
|
||||||
|
Dictionary<string, string> keyValuePairs = new();
|
||||||
|
string args4 = "Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Id,Recipe,Date,AreaDeltaFromLastRun,GLimit,HGCV1";
|
||||||
|
string args5 = "Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,AreaDeltaFromLastRun,Variation,Percentage HgCV 4PP Delta,HGCV1";
|
||||||
|
string args6 = "RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09,HGCV1";
|
||||||
|
string args7 = "FlatZMean|MeanFlatZ,GradeMean|MeanGrade,NAvgMean|MeanNAvg,NslMean|MeanNsl,PhaseMean|MeanPhase,RhoAvgMean|MeanRhoAvg,RhoslMean|MeanRhosl,RsMean|MeanRs,VdMean|MeanVd,FlatZRadialGradient|RadialGradientFlatZ,GradeRadialGradient|RadialGradientGrade,NAvgRadialGradient|RadialGradientNAvg,NslRadialGradient|RadialGradientNsl,PhaseRadialGradient|RadialGradientPhase,RhoAvgRadialGradient|RadialGradientRhoAvg,RhoslRadialGradient|RadialGradientRhosl,RsRadialGradient|RadialGradientRs,VdRadialGradient|RadialGradientVd,FlatZStdDev|StandardDeviationPercentageFlatZ,GradeStdDev|StandardDeviationPercentageGrade,NAvgStdDev|StandardDeviationPercentageNAvg,NslStdDev|StandardDeviationPercentageNsl,PhaseStdDev|StandardDeviationPercentagePhase,RhoAvgStdDev|StandardDeviationPercentageRhoAvg,RhoslStdDev|StandardDeviationPercentageRhosl,RsStdDev|StandardDeviationPercentageRs,VdStdDev|StandardDeviationPercentageVd,|HGCV1";
|
||||||
|
// string args8 = "Time,A_LOGISTICS,B_LOGISTICS,Test,Count,Index,MesEntity,Date,Employee,Lot,PSN,Reactor,Recipe,Area,Folder,HeaderUniqueId,Id,Layer,Model,Pattern,Phase,Plan,RampRate,RDS,SetupFile,StartVoltage,StopVoltage,UniqueId,Wafer,WaferSize,Zone,Ccomp,CondType,FlatZ,FlatZMean,FlatZRadialGradient,FlatZStdDev,GLimit,Grade,GradeMean,GradeRadialGradient,GradeStdDev,NAvg,NAvgMean,NAvgRadialGradient,NAvgStdDev,Nsl,NslMean,NslRadialGradient,NslStdDev,PhaseMean,PhaseRadialGradient,PhaseStdDev,RhoAvg,RhoAvgMean,RhoAvgRadialGradient,RhoAvgStdDev,RhoMethod,Rhosl,RhoslMean,RhoslRadialGradient,RhoslStdDev,RsMean,RsRadialGradient,RsStdDev,Vd,VdMean,VdRadialGradient,VdStdDev,Variation,AreaDeltaFromLastRun,Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09";
|
||||||
|
// string args9 = "Time,A_LOGISTICS,B_LOGISTICS,Index,Operator,StartVoltage,Wafer,StopVoltage,Lot,RampRate,Plan,GLimit,Date,Time,SetupFile,WaferSize,Folder,Ccomp,Pattern,Area,CondType,RhoMethod,Model,MeanNAvg,MeanNsl,MeanVd,MeanFlatZ,MeanRhoAvg,MeanRhosl,MeanPhase,MeanGrade,MeanRs,StandardDeviationPercentageNAvg,StandardDeviationPercentageNsl,StandardDeviationPercentageVd,StandardDeviationPercentageFlatZ,StandardDeviationPercentageRhoAvg,StandardDeviationPercentageRhosl,StandardDeviationPercentagePhase,StandardDeviationPercentageGrade,StandardDeviationPercentageRs,RadialGradientNAvg,RadialGradientNsl,RadialGradientVd,RadialGradientFlatZ,RadialGradientRhoAvg,RadialGradientRhosl,RadialGradientPhase,RadialGradientGrade,RadialGradientRs,Site,X,Y,NAvg,RhoAvg,Nsl,Rhosl,Vd,Phase,FlatZ,Grade,XLeft,XRight,BottomY,TopY,RDS,PSN,Reactor,Layer,Zone,Employee,InferredLot,Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,AreaDeltaFromLastRun,Variation,Percentage HgCV 4PP Delta,RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09";
|
||||||
|
// string args10 = "0,1,2,-1,-1,3,-1,12,70,8,66,67,-1,19,16,-1,-1,68,22,18,58,10,9,65,14,5,7,-1,6,15,69,17,20,59,26,44,35,11,60,30,48,39,53,23,41,32,55,24,42,33,29,47,38,54,27,45,36,21,56,28,46,37,31,49,40,57,25,43,34,81,80,72,73,74,75,76,77,78,79,83,84,85,86,87,88,89,90,91";
|
||||||
|
string[] segments = args7.Split(',');
|
||||||
|
ReadOnlyCollection<string> ignoreColumns = new(args4.Split(','));
|
||||||
|
ReadOnlyCollection<string> backfillColumns = new(args5.Split(','));
|
||||||
|
ReadOnlyCollection<string> indexOnlyColumns = new(args6.Split(','));
|
||||||
|
ReadOnlyCollection<string> newColumnNames = new(processDataStandardFormatMappingNewColumnNames.Split(','));
|
||||||
|
ReadOnlyCollection<string> oldColumnNames = new(processDataStandardFormatMappingOldColumnNames.Split(','));
|
||||||
|
ReadOnlyCollection<int> columnIndices = new(processDataStandardFormatMappingColumnIndices.Split(',').Select(int.Parse).ToArray());
|
||||||
|
foreach (string segment in segments)
|
||||||
|
{
|
||||||
|
segmentsB = segment.Split('|');
|
||||||
|
if (segmentsB.Length != 2)
|
||||||
|
continue;
|
||||||
|
if (distinct.Contains(segmentsB[0]))
|
||||||
|
continue;
|
||||||
|
distinct.Add(segmentsB[0]);
|
||||||
|
keyValuePairs.Add(segmentsB[0], segmentsB[1]);
|
||||||
|
}
|
||||||
|
result = new(backfillColumns: backfillColumns,
|
||||||
|
columnIndices: columnIndices,
|
||||||
|
newColumnNames: newColumnNames,
|
||||||
|
ignoreColumns: ignoreColumns,
|
||||||
|
indexOnlyColumns: indexOnlyColumns,
|
||||||
|
keyValuePairs: new(keyValuePairs),
|
||||||
|
oldColumnNames: oldColumnNames);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyCollection<PreWith> GetPreWithCollection(ReadOnlyCollection<Pre> preCollection)
|
||||||
|
{
|
||||||
|
List<PreWith> results = new();
|
||||||
|
string errFile;
|
||||||
|
PreWith preWith;
|
||||||
|
string? checkDirectory;
|
||||||
|
string noWaitDirectory;
|
||||||
|
foreach (Pre pre in preCollection)
|
||||||
|
{
|
||||||
|
errFile = string.Concat(pre.CheckFile, ".err");
|
||||||
|
checkDirectory = Path.GetDirectoryName(pre.CheckFile);
|
||||||
|
if (string.IsNullOrEmpty(checkDirectory))
|
||||||
|
continue;
|
||||||
|
if (!Directory.Exists(checkDirectory))
|
||||||
|
_ = Directory.CreateDirectory(checkDirectory);
|
||||||
|
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
||||||
|
preWith = new(checkDirectory: checkDirectory,
|
||||||
|
checkFile: pre.CheckFile,
|
||||||
|
errFile: errFile,
|
||||||
|
matchingFile: pre.MatchingFile,
|
||||||
|
noWaitDirectory: noWaitDirectory);
|
||||||
|
results.Add(preWith);
|
||||||
|
}
|
||||||
|
return results.AsReadOnly();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyCollection<string> GetSearchDirectories(int numberLength, string parentDirectory)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
string[] directories = Directory.GetDirectories(parentDirectory, "*", SearchOption.TopDirectoryOnly);
|
string[] directories = Directory.GetDirectories(parentDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
@ -116,114 +238,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
results.Add(directory);
|
results.Add(directory);
|
||||||
}
|
}
|
||||||
results.Sort();
|
results.Sort();
|
||||||
return results;
|
return results.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<string> GetMatchingFiles(long ticks, string reportFullPath, List<string> searchDirectories)
|
private static void CreatePointerFile(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
|
||||||
{
|
{
|
||||||
List<string> results = new();
|
|
||||||
string[] found;
|
|
||||||
string fileName = Path.GetFileName(reportFullPath);
|
|
||||||
foreach (string searchDirectory in searchDirectories)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < int.MaxValue; i++)
|
|
||||||
{
|
|
||||||
found = Directory.GetFiles(searchDirectory, fileName, SearchOption.AllDirectories);
|
|
||||||
if (found.Any())
|
|
||||||
{
|
|
||||||
results.AddRange(found);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds > _BreakAfterSeconds)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<(string matchingFile, string checkFile)> GetCollection(int numberLength, string parentDirectory, List<string> matchingFiles)
|
|
||||||
{
|
|
||||||
List<(string matchingFile, string checkFile)> results = new();
|
|
||||||
string checkFile;
|
|
||||||
int parentDirectoryLength = parentDirectory.Length;
|
|
||||||
foreach (string matchingFile in matchingFiles)
|
|
||||||
{
|
|
||||||
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
|
|
||||||
results.Add(new(matchingFile, checkFile));
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<(string, string, string, string, string)> GetCollection(List<(string matchingFile, string checkFile)> collection)
|
|
||||||
{
|
|
||||||
List<(string, string, string, string, string)> results = new();
|
|
||||||
string errFile;
|
|
||||||
string checkDirectory;
|
|
||||||
string noWaitDirectory;
|
|
||||||
foreach ((string matchingFile, string checkFile) in collection)
|
|
||||||
{
|
|
||||||
errFile = string.Concat(checkFile, ".err");
|
|
||||||
checkDirectory = Path.GetDirectoryName(checkFile);
|
|
||||||
if (!Directory.Exists(checkDirectory))
|
|
||||||
_ = Directory.CreateDirectory(checkDirectory);
|
|
||||||
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
|
||||||
results.Add(new(matchingFile, checkFile, errFile, checkDirectory, noWaitDirectory));
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
|
||||||
{
|
|
||||||
long preWait;
|
|
||||||
List<(string checkFile, string errFile)> postCollection = new();
|
|
||||||
foreach ((string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory) in GetCollection(collection))
|
|
||||||
{
|
|
||||||
File.Move(matchingFile, checkFile);
|
|
||||||
if (Directory.Exists(noWaitDirectory))
|
|
||||||
{
|
|
||||||
postCollection.Add(new(checkFile, errFile));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
|
||||||
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
|
|
||||||
else
|
|
||||||
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
|
||||||
{
|
|
||||||
if (DateTime.Now.Ticks > preWait)
|
|
||||||
break;
|
|
||||||
Thread.Sleep(500);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < int.MaxValue; i++)
|
|
||||||
{
|
|
||||||
if (File.Exists(errFile))
|
|
||||||
throw new Exception(File.ReadAllText(errFile));
|
|
||||||
if (!File.Exists(checkFile))
|
|
||||||
break;
|
|
||||||
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
|
|
||||||
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
|
|
||||||
Thread.Sleep(500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (postCollection.Any())
|
|
||||||
{
|
|
||||||
Thread.Sleep(500);
|
|
||||||
StringBuilder stringBuilder = new();
|
|
||||||
foreach ((string checkFile, string errFile) in postCollection)
|
|
||||||
{
|
|
||||||
if (File.Exists(errFile))
|
|
||||||
_ = stringBuilder.AppendLine(File.ReadAllText(errFile));
|
|
||||||
if (File.Exists(checkFile))
|
|
||||||
_ = stringBuilder.AppendLine($"<{checkFile}> was not consumed by the end!");
|
|
||||||
}
|
|
||||||
if (stringBuilder.Length > 0)
|
|
||||||
throw new Exception(stringBuilder.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void CreatePointerFile(int numberLength, string parentDirectory, List<string> matchingFiles)
|
|
||||||
{
|
|
||||||
#nullable enable
|
|
||||||
string checkFile;
|
string checkFile;
|
||||||
string writeFile;
|
string writeFile;
|
||||||
string? directoryName;
|
string? directoryName;
|
||||||
@ -239,28 +258,137 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
continue;
|
continue;
|
||||||
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
|
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
|
||||||
}
|
}
|
||||||
#nullable disable
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyCollection<Pre> GetPreCollection(int numberLength, string parentDirectory, ReadOnlyCollection<string> matchingFiles)
|
||||||
|
{
|
||||||
|
List<Pre> results = new();
|
||||||
|
Pre pre;
|
||||||
|
string checkFile;
|
||||||
|
int parentDirectoryLength = parentDirectory.Length;
|
||||||
|
foreach (string matchingFile in matchingFiles)
|
||||||
|
{
|
||||||
|
checkFile = $"{matchingFile[0]}{matchingFile.Substring(parentDirectoryLength + numberLength + 1)}";
|
||||||
|
pre = new(matchingFile, checkFile);
|
||||||
|
results.Add(pre);
|
||||||
|
}
|
||||||
|
return results.AsReadOnly();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MoveCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
||||||
|
{
|
||||||
|
ReadOnlyCollection<Post> postCollection = GetPostCollection(dateTime, processDataStandardFormat, preWithCollection);
|
||||||
|
if (postCollection.Count != 0)
|
||||||
|
{
|
||||||
|
Thread.Sleep(500);
|
||||||
|
StringBuilder stringBuilder = new();
|
||||||
|
foreach (Post post in postCollection)
|
||||||
|
{
|
||||||
|
if (File.Exists(post.ErrFile))
|
||||||
|
_ = stringBuilder.AppendLine(File.ReadAllText(post.ErrFile));
|
||||||
|
if (File.Exists(post.CheckFile))
|
||||||
|
_ = stringBuilder.AppendLine($"<{post.CheckFile}> was not consumed by the end!");
|
||||||
|
}
|
||||||
|
if (stringBuilder.Length > 0)
|
||||||
|
throw new Exception(stringBuilder.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ReadOnlyCollection<Post> GetPostCollection(DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, ReadOnlyCollection<PreWith> preWithCollection)
|
||||||
|
{
|
||||||
|
List<Post> results = new();
|
||||||
|
Post post;
|
||||||
|
long preWait;
|
||||||
|
foreach (PreWith preWith in preWithCollection)
|
||||||
|
{
|
||||||
|
if (!_IsEAFHosted)
|
||||||
|
continue;
|
||||||
|
if (!_StaticRuns.TryGetValue(_Logistics.Sequence, out List<Shared.Metrology.WS.Results>? wsResults))
|
||||||
|
wsResults = null;
|
||||||
|
if (processDataStandardFormat.InputPDSF is null)
|
||||||
|
File.Move(preWith.MatchingFile, preWith.CheckFile);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ProcessDataStandardFormat.Write(preWith.CheckFile, processDataStandardFormat, wsResults);
|
||||||
|
File.Delete(preWith.MatchingFile);
|
||||||
|
}
|
||||||
|
if (Directory.Exists(preWith.NoWaitDirectory))
|
||||||
|
{
|
||||||
|
post = new(preWith.CheckFile, preWith.ErrFile);
|
||||||
|
results.Add(post);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||||
|
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
|
||||||
|
else
|
||||||
|
preWait = DateTime.Now.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
|
{
|
||||||
|
if (DateTime.Now.Ticks > preWait)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
|
{
|
||||||
|
if (File.Exists(preWith.ErrFile))
|
||||||
|
throw new Exception(File.ReadAllText(preWith.ErrFile));
|
||||||
|
if (!File.Exists(preWith.CheckFile))
|
||||||
|
break;
|
||||||
|
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
|
||||||
|
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results.AsReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
|
if (!_IsEAFHosted)
|
||||||
|
ProcessDataStandardFormat.Write("../../.pdsf", processDataStandardFormat, wsResults: null);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
int numberLength = 2;
|
int numberLength = 2;
|
||||||
long ticks = dateTime.Ticks;
|
long ticks = dateTime.Ticks;
|
||||||
string parentParentDirectory = GetParentParent(reportFullPath);
|
string parentParentDirectory = GetParentParent(reportFullPath);
|
||||||
List<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
|
ReadOnlyCollection<string> searchDirectories = GetSearchDirectories(numberLength, parentParentDirectory);
|
||||||
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
ReadOnlyCollection<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
||||||
if (matchingFiles.Count != searchDirectories.Count)
|
if (matchingFiles.Count != searchDirectories.Count)
|
||||||
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
||||||
try
|
if (_IsEAFHosted)
|
||||||
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
{
|
||||||
catch (Exception) { }
|
try
|
||||||
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
|
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
||||||
MoveCollection(dateTime, collection);
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
ReadOnlyCollection<Pre> preCollection = GetPreCollection(numberLength, parentParentDirectory, matchingFiles);
|
||||||
|
ReadOnlyCollection<PreWith> preWithCollection = GetPreWithCollection(preCollection);
|
||||||
|
MoveCollection(dateTime, processDataStandardFormat, preWithCollection);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ReadOnlyCollection<string> GetMatchingFiles(long ticks, string reportFullPath, ReadOnlyCollection<string> searchDirectories)
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
string[] found;
|
||||||
|
string fileName = Path.GetFileName(reportFullPath);
|
||||||
|
foreach (string searchDirectory in searchDirectories)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
|
{
|
||||||
|
found = Directory.GetFiles(searchDirectory, fileName, SearchOption.AllDirectories);
|
||||||
|
if (found.Length != 0)
|
||||||
|
{
|
||||||
|
results.AddRange(found);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds > _BreakAfterSeconds)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results.AsReadOnly();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -9,7 +9,6 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.OpenInsight;
|
namespace Adaptation.FileHandlers.OpenInsight;
|
||||||
@ -18,16 +17,14 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
{
|
{
|
||||||
|
|
||||||
private readonly string _IqsConnectionString;
|
private readonly string _IqsConnectionString;
|
||||||
private readonly string _OpenInsightFilePattern;
|
|
||||||
private readonly string _OpenInsightApiECDirectory;
|
private readonly string _OpenInsightApiECDirectory;
|
||||||
private readonly string _OpenInsightApiIFXDirectory;
|
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
|
||||||
_Logistics = new(this);
|
_Logistics = new(this);
|
||||||
|
_NullData = string.Empty;
|
||||||
if (_FileParameter is null)
|
if (_FileParameter is null)
|
||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
if (_ModelObjectParameterDefinitions is null)
|
if (_ModelObjectParameterDefinitions is null)
|
||||||
@ -36,9 +33,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
throw new Exception(cellInstanceConnectionName);
|
throw new Exception(cellInstanceConnectionName);
|
||||||
_IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString");
|
_IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString");
|
||||||
_OpenInsightApiECDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "API.EC.Directory");
|
_OpenInsightApiECDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "API.EC.Directory");
|
||||||
_OpenInsightApiIFXDirectory = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "API.IFX.Directory");
|
|
||||||
_OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern");
|
|
||||||
_OpenInsightApiIFXDirectory = _OpenInsightApiIFXDirectory.Replace("\"", string.Empty);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||||
@ -116,71 +110,60 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetLines(Logistics logistics, List<SECS.Description> descriptions)
|
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, ProcessDataStandardFormat processDataStandardFormat, List<SECS.Description> descriptions, Test[] tests)
|
||||||
{
|
|
||||||
StringBuilder results = new();
|
|
||||||
char del = '\t';
|
|
||||||
SECS.Description x = descriptions[0];
|
|
||||||
_ = results.Append(x.PSN).Append(del)
|
|
||||||
.Append(x.Reactor).Append(del)
|
|
||||||
.Append(logistics.MesEntity).Append(del)
|
|
||||||
.Append(x.RDS).Append(del)
|
|
||||||
.Append(x.Recipe).Append(del)
|
|
||||||
.Append(x.Employee).Append(del);
|
|
||||||
return results.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<SECS.Description> descriptions, Test[] tests)
|
|
||||||
{
|
{
|
||||||
|
string duplicateFile;
|
||||||
bool isDummyRun = false;
|
bool isDummyRun = false;
|
||||||
List<(Shared.Properties.IScopeInfo, string)> collection = new();
|
List<(Shared.Properties.IScopeInfo, string)> collection = new();
|
||||||
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName);
|
||||||
string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation);
|
|
||||||
if (parentParent.Contains(_CellInstanceName))
|
|
||||||
parentParent = Path.GetDirectoryName(parentParent);
|
|
||||||
string duplicateDirectory = Path.Combine(parentParent, "Data");
|
|
||||||
if (!Directory.Exists(duplicateDirectory))
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder;
|
||||||
if (descriptions.Any() && tests.Any())
|
if (descriptions.Count == 0 || tests.Length == 0)
|
||||||
|
duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
|
else
|
||||||
{
|
{
|
||||||
string lines = GetLines(_Logistics, descriptions);
|
long? subgroupId;
|
||||||
if (!string.IsNullOrEmpty(lines))
|
string fileName = Path.GetFileName(reportFullPath);
|
||||||
|
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
||||||
|
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
|
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN))
|
||||||
|
subgroupId = null;
|
||||||
|
else
|
||||||
|
(subgroupId, int? _, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
|
||||||
|
if (_StaticRuns.TryGetValue(_Logistics.Sequence, out List<WS.Results> wsResults))
|
||||||
{
|
{
|
||||||
int? count;
|
if (wsResults is null || wsResults.Count != 1)
|
||||||
long? subGroupId;
|
throw new NullReferenceException($"{nameof(wsResults)} {wsResults?.Count} != 1 {_Logistics.Sequence}!");
|
||||||
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
lock (_StaticRuns)
|
||||||
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
wsResults[0] = WS.Results.Get(wsResults[0], subgroupId);
|
||||||
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN))
|
|
||||||
(subGroupId, count) = (null, null);
|
|
||||||
else
|
|
||||||
(subGroupId, count, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
|
|
||||||
if (subGroupId is null)
|
|
||||||
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
|
|
||||||
else if (count is null)
|
|
||||||
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines));
|
|
||||||
else
|
|
||||||
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} E{count.Value} {_OpenInsightFilePattern}"), lines));
|
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
|
||||||
FromIQS.Save(_OpenInsightApiECDirectory, _OpenInsightApiIFXDirectory, _Logistics, reportFullPath, logistics, descriptions.First(), lines, subGroupId, weekOfYear);
|
|
||||||
}
|
}
|
||||||
|
if (!fileName.StartsWith("Viewer"))
|
||||||
|
duplicateFile = Path.Combine(duplicateDirectory, $"{subgroupId} {fileName}".TrimStart());
|
||||||
|
else
|
||||||
|
duplicateFile = Path.Combine(duplicateDirectory, $"{$"Viewer {subgroupId}".TrimEnd()} {fileName.Replace("Viewer", string.Empty)}");
|
||||||
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
|
FromIQS.Save(_OpenInsightApiECDirectory, _Logistics, reportFullPath, processDataStandardFormat, descriptions.First(), subgroupId, weekOfYear);
|
||||||
}
|
}
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
|
{
|
||||||
|
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
||||||
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
WaitForFileConsumption(dateTime, descriptions, isDummyRun, successDirectory, duplicateDirectory, collection, duplicateFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests);
|
SaveOpenInsightFile(reportFullPath, dateTime, processDataStandardFormat, descriptions, tests);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@ -16,51 +17,175 @@ public class FromIQS
|
|||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
|
private static string GetCommandText(DateTime dateTime)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = new();
|
||||||
|
TimeSpan timeSpan = new(dateTime.ToUniversalTime().AddDays(-1).Ticks - new DateTime(1970, 01, 01).Ticks);
|
||||||
|
long infinityQS = (long)Math.Floor(timeSpan.TotalSeconds);
|
||||||
|
results.Add(" select count_se_sgtm CountSeSgtm, ");
|
||||||
|
results.Add(" dateadd(HH, -7, (dateadd(SS, convert(bigint, max_se_sgtm), '19700101'))) DateTime, ");
|
||||||
|
results.Add(" max_max_se_test MaxMaxSeTest, ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select td.f_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
|
||||||
|
results.Add(" where td.f_test = max_max_se_test ");
|
||||||
|
results.Add(" ) MaxMaxSeTestName, ");
|
||||||
|
results.Add(" max_max_se_val MaxMaxSeVal, ");
|
||||||
|
results.Add(" max_se_lot MaxSeLot, ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select pl.f_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[PART_LOT] pl ");
|
||||||
|
results.Add(" where max_se_lot = pl.f_lot ");
|
||||||
|
results.Add(" ) MaxSeLotName, ");
|
||||||
|
results.Add(" max_se_part MaxSePart, ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select rd.f_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[PART_DAT] rd ");
|
||||||
|
results.Add(" where max_se_part = rd.f_part ");
|
||||||
|
results.Add(" ) MaxSePartName, ");
|
||||||
|
results.Add(" max_se_prcs MaxSePrcs, ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select rd.f_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[PRCS_DAT] rd ");
|
||||||
|
results.Add(" where max_se_prcs = rd.f_prcs ");
|
||||||
|
results.Add(" ) MaxSePrcsName, ");
|
||||||
|
results.Add(" max_se_sgrp MaxSeSgrp, ");
|
||||||
|
results.Add(" min_min_se_test MinMinSeTest, ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select td.f_name ");
|
||||||
|
results.Add(" from [SPCEPIWORLD].[dbo].[TEST_DAT] td ");
|
||||||
|
results.Add(" where td.f_test = min_min_se_test ");
|
||||||
|
results.Add(" ) MinMinSeTestName, ");
|
||||||
|
results.Add(" min_min_se_val MinMinSeVal, ");
|
||||||
|
results.Add(" min_se_sgrp MinSeSgrp ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select count_se_sgtm, ");
|
||||||
|
results.Add(" max_se_lot, ");
|
||||||
|
results.Add(" max_se_part, ");
|
||||||
|
results.Add(" max_se_prcs, ");
|
||||||
|
results.Add(" max_se_sgrp, ");
|
||||||
|
results.Add(" max_se_sgtm, ");
|
||||||
|
results.Add(" min_se_sgrp, ");
|
||||||
|
results.Add(" max(max_se_val) max_max_se_val, ");
|
||||||
|
results.Add(" min(min_se_val) min_min_se_val, ");
|
||||||
|
results.Add(" max(max_se_test) max_max_se_test, ");
|
||||||
|
results.Add(" min(min_se_test) min_min_se_test ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select count_se_sgtm, ");
|
||||||
|
results.Add(" max_se_lot, ");
|
||||||
|
results.Add(" max_se_val, ");
|
||||||
|
results.Add(" min_se_val, ");
|
||||||
|
results.Add(" max_se_part, ");
|
||||||
|
results.Add(" max_se_prcs, ");
|
||||||
|
results.Add(" max_se_sgrp, ");
|
||||||
|
results.Add(" max_se_sgtm, ");
|
||||||
|
results.Add(" max_se_test, ");
|
||||||
|
results.Add(" min_se_sgrp, ");
|
||||||
|
results.Add(" min_se_test ");
|
||||||
|
results.Add(" from ( ");
|
||||||
|
results.Add(" select ");
|
||||||
|
results.Add(" max(se.f_lot) max_se_lot, ");
|
||||||
|
results.Add(" max(se.f_val) max_se_val, ");
|
||||||
|
results.Add(" min(se.f_lot) min_se_lot, ");
|
||||||
|
results.Add(" min(se.f_val) min_se_val, ");
|
||||||
|
results.Add(" max(se.f_part) max_se_part, ");
|
||||||
|
results.Add(" max(se.f_prcs) max_se_prcs, ");
|
||||||
|
results.Add(" max(se.f_sgrp) max_se_sgrp, ");
|
||||||
|
results.Add(" max(se.f_sgtm) max_se_sgtm, ");
|
||||||
|
results.Add(" max(se.f_test) max_se_test, ");
|
||||||
|
results.Add(" min(se.f_part) min_se_part, ");
|
||||||
|
results.Add(" min(se.f_prcs) min_se_prcs, ");
|
||||||
|
results.Add(" min(se.f_sgrp) min_se_sgrp, ");
|
||||||
|
results.Add(" min(se.f_sgtm) min_se_sgtm, ");
|
||||||
|
results.Add(" min(se.f_test) min_se_test, ");
|
||||||
|
results.Add(" count(se.f_sgtm) count_se_sgtm ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" where se.f_tsno = 1 ");
|
||||||
|
results.Add(" and se.f_flag = 0 ");
|
||||||
|
results.Add($" and se.f_sgtm > {infinityQS} ");
|
||||||
|
results.Add(" group by se.f_sgtm, se.f_prcs, se.f_lot, se.f_test, se.f_val ");
|
||||||
|
results.Add(" ) qa ");
|
||||||
|
results.Add(" where qa.count_se_sgtm > 1 ");
|
||||||
|
results.Add(" and min_se_lot = max_se_lot ");
|
||||||
|
results.Add(" and min_se_val = max_se_val ");
|
||||||
|
results.Add(" and min_se_val = max_se_val ");
|
||||||
|
results.Add(" and min_se_part = max_se_part ");
|
||||||
|
results.Add(" and min_se_prcs = max_se_prcs ");
|
||||||
|
results.Add(" and min_se_sgtm = max_se_sgtm ");
|
||||||
|
results.Add(" and min_se_test = max_se_test ");
|
||||||
|
results.Add(" ) qb ");
|
||||||
|
results.Add(" group by count_se_sgtm, ");
|
||||||
|
results.Add(" max_se_lot, ");
|
||||||
|
results.Add(" max_se_part, ");
|
||||||
|
results.Add(" max_se_prcs, ");
|
||||||
|
results.Add(" max_se_sgrp, ");
|
||||||
|
results.Add(" max_se_sgtm, ");
|
||||||
|
results.Add(" min_se_sgrp ");
|
||||||
|
results.Add(" ");
|
||||||
|
results.Add(" ) qc ");
|
||||||
|
results.Add(" order by max_se_sgrp desc ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(Environment.NewLine, results);
|
||||||
|
} // cSpell:restore
|
||||||
|
|
||||||
private static string GetCommandText(Logistics logistics, SECS.Description description, string dateTime, long? subGroupId)
|
private static string GetCommandText(Logistics logistics, SECS.Description description, string dateTime, long? subGroupId)
|
||||||
{
|
{ // cSpell:disable
|
||||||
StringBuilder result = new();
|
List<string> results = new();
|
||||||
_ = result
|
results.Add(" select iq.ev_count, iq.cl_count, iq.sl_count, iq.se_sgrp, iq.se_sgtm, iq.se_tsno, iq.td_test, iq.pr_name, iq.jd_name, iq.pl_name, iq.pd_name, iq.td_name, iq.se_val ");
|
||||||
.AppendLine(" select ")
|
results.Add(" from ( ");
|
||||||
.AppendLine(" se.f_sgrp se_sgrp, ")
|
results.Add(" select ");
|
||||||
.AppendLine(" se.f_sgtm se_sgtm, ")
|
results.Add(" se.f_sgrp se_sgrp, ");
|
||||||
.AppendLine(" se.f_tsno se_tsno, ")
|
results.Add(" se.f_sgtm se_sgtm, ");
|
||||||
.AppendLine(" se.f_val se_val, ")
|
results.Add(" se.f_tsno se_tsno, ");
|
||||||
.AppendLine(" rd.f_name rd_name, ")
|
results.Add(" se.f_val se_val, ");
|
||||||
.AppendLine(" jd.f_name jd_name, ")
|
results.Add(" pr.f_name pr_name, ");
|
||||||
.AppendLine(" pl.f_name pl_name, ")
|
results.Add(" jd.f_name jd_name, ");
|
||||||
.AppendLine(" pd.f_name pd_name, ")
|
results.Add(" pl.f_name pl_name, ");
|
||||||
.AppendLine(" td.f_test td_test, ")
|
results.Add(" pd.f_name pd_name, ");
|
||||||
.AppendLine(" td.f_name td_name, ")
|
results.Add(" td.f_test td_test, ");
|
||||||
.AppendLine(" (select count(ev.f_evnt) ")
|
results.Add(" td.f_name td_name, ");
|
||||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
results.Add(" (select count(cl.f_part) ");
|
||||||
.AppendLine(" where ev.f_prcs = rd.f_prcs ")
|
results.Add(" from [spcepiworld].[dbo].[ctrl_lim] cl ");
|
||||||
.AppendLine(" and ev.f_part = pd.f_part ")
|
results.Add(" where cl.f_part = pd.f_part ");
|
||||||
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
|
results.Add(" and cl.f_test = td.f_test ");
|
||||||
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
|
results.Add(" ) cl_count, ");
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ")
|
results.Add(" (select count(sl.f_part) ");
|
||||||
.AppendLine(" on se.f_prcs = rd.f_prcs ")
|
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[job_dat] jd ")
|
results.Add(" where sl.f_part = pd.f_part ");
|
||||||
.AppendLine(" on se.f_job = jd.f_job ")
|
results.Add(" and sl.f_test = td.f_test ");
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[part_lot] pl ")
|
results.Add(" ) sl_count, ");
|
||||||
.AppendLine(" on se.f_lot = pl.f_lot ")
|
results.Add(" (select count(ev.f_evnt) ");
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[part_dat] pd ")
|
results.Add(" from [spcepiworld].[dbo].[evnt_inf] ev ");
|
||||||
.AppendLine(" on se.f_part = pd.f_part ")
|
results.Add(" where ev.f_prcs = pr.f_prcs ");
|
||||||
.AppendLine(" join [spcepiworld].[dbo].[test_dat] td ")
|
results.Add(" and ev.f_part = pd.f_part ");
|
||||||
.AppendLine(" on se.f_test = td.f_test ")
|
results.Add(" and ev.f_sgtm = se.f_sgtm ");
|
||||||
.AppendLine(" where se.f_flag = 0 ");
|
results.Add(" ) ev_count ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[sgrp_ext] se ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[prcs_dat] pr ");
|
||||||
|
results.Add(" on se.f_prcs = pr.f_prcs ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[job_dat] jd ");
|
||||||
|
results.Add(" on se.f_job = jd.f_job ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_lot] pl ");
|
||||||
|
results.Add(" on se.f_lot = pl.f_lot ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on se.f_part = pd.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
|
||||||
|
results.Add(" on se.f_test = td.f_test ");
|
||||||
|
results.Add(" where se.f_flag = 0 ");
|
||||||
if (subGroupId is not null)
|
if (subGroupId is not null)
|
||||||
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
results.Add($" and se.f_sgrp = {subGroupId} ");
|
||||||
if (!string.IsNullOrEmpty(description.RDS))
|
if (!string.IsNullOrEmpty(description.RDS))
|
||||||
_ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' ");
|
results.Add($" and pl.f_name = '{description.RDS}' ");
|
||||||
_ = result
|
results.Add($" and pr.f_name = '{description.Reactor}' ");
|
||||||
.Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ")
|
results.Add($" and pd.f_name = '{description.PSN}' ");
|
||||||
.Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ")
|
results.Add(" and jd.f_name in ('SPV01') ");
|
||||||
.AppendLine(" and jd.f_name in ('TENCOR1', 'TENCOR2', 'TENCOR3') ")
|
results.Add($" and jd.f_name = '{logistics.MesEntity}' ");
|
||||||
.Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ")
|
results.Add($" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '{dateTime}' ");
|
||||||
.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ")
|
results.Add(" ) as iq ");
|
||||||
.AppendLine(" for json path ");
|
results.Add(" order by iq.ev_count desc, iq.cl_count desc, iq.sl_count desc, iq.se_sgrp, iq.se_tsno, iq.td_test ");
|
||||||
return result.ToString();
|
results.Add(" for json path ");
|
||||||
}
|
return string.Join(Environment.NewLine, results);
|
||||||
|
} // cSpell:restore
|
||||||
|
|
||||||
private static StringBuilder GetForJsonPath(string connectionString, string commandText)
|
private static StringBuilder GetForJsonPath(string connectionString, string commandText)
|
||||||
{
|
{
|
||||||
@ -74,32 +199,103 @@ public class FromIQS
|
|||||||
return stringBuilder;
|
return stringBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetCommandText(List<long> subGroups)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = new();
|
||||||
|
results.Add(" update [spcepiworld].[dbo].[sgrp_ext] ");
|
||||||
|
results.Add(" set f_flag = 1 ");
|
||||||
|
results.Add(" where f_flag = 0 ");
|
||||||
|
results.Add($" and f_sgrp in ({string.Join($",{Environment.NewLine} ", subGroups)}) ");
|
||||||
|
return string.Join(Environment.NewLine, results);
|
||||||
|
} // cSpell:enable
|
||||||
|
|
||||||
|
private static int? ExecuteNonQuery(string connectionString, string commandText)
|
||||||
|
{
|
||||||
|
int? result;
|
||||||
|
if (string.IsNullOrEmpty(connectionString))
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using SqlConnection sqlConnection = new(connectionString);
|
||||||
|
sqlConnection.Open();
|
||||||
|
using SqlCommand sqlCommand = new(commandText, sqlConnection);
|
||||||
|
result = sqlCommand.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void FlagDuplicates(string connectionString, string json)
|
||||||
|
{
|
||||||
|
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||||
|
if (jsonElements is not null && jsonElements.Length != 0 && jsonElements[0].ValueKind == JsonValueKind.Object)
|
||||||
|
{
|
||||||
|
Root? root;
|
||||||
|
List<long> collection = new();
|
||||||
|
JsonElement[] array = jsonElements.ToArray();
|
||||||
|
foreach (JsonElement jsonElement in array)
|
||||||
|
{
|
||||||
|
root = JsonSerializer.Deserialize<Root>(jsonElement.ToString(), jsonSerializerOptions);
|
||||||
|
if (root is null || root.MaxSeSgrp < 1)
|
||||||
|
continue;
|
||||||
|
if (collection.Count > 99)
|
||||||
|
break;
|
||||||
|
collection.Add(root.MaxSeSgrp);
|
||||||
|
}
|
||||||
|
if (collection.Count > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string commandText = GetCommandText(collection);
|
||||||
|
File.WriteAllText("D:/.sql", commandText);
|
||||||
|
_ = ExecuteNonQuery(connectionString, commandText);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, SECS.Description description, long breakAfter, long preWait)
|
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, SECS.Description description, long breakAfter, long preWait)
|
||||||
{
|
{
|
||||||
string dateTime;
|
DateTime dateTime;
|
||||||
int? count = null;
|
int? count = null;
|
||||||
string commandText;
|
string commandText;
|
||||||
long? result = null;
|
long? result = null;
|
||||||
|
StringBuilder stringBuilder;
|
||||||
string dateFormat = SECS.Description.GetDateFormat();
|
string dateFormat = SECS.Description.GetDateFormat();
|
||||||
if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed))
|
if (DateTime.TryParseExact(description.Date, dateFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTimeParsed))
|
||||||
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
|
dateTime = dateTimeParsed.ToLocalTime();
|
||||||
else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed))
|
else if (DateTime.TryParse(description.Date, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTimeParsed))
|
||||||
dateTime = dateTimeParsed.ToString("yyyy-MM-dd HH:mm:ss");
|
dateTime = dateTimeParsed.ToLocalTime();
|
||||||
else
|
else
|
||||||
dateTime = logistics.DateTimeFromSequence.ToString("yyyy-MM-dd HH:mm:ss");
|
dateTime = logistics.DateTimeFromSequence;
|
||||||
commandText = GetCommandText(logistics, description, dateTime, subGroupId: null);
|
commandText = GetCommandText(dateTime);
|
||||||
|
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||||
|
if (stringBuilder.Length > 0)
|
||||||
|
FlagDuplicates(connectionString, stringBuilder.ToString());
|
||||||
|
commandText = GetCommandText(logistics, description, dateTime.ToString("yyyy-MM-dd HH:mm:ss"), subGroupId: null);
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
{
|
{
|
||||||
if (DateTime.Now.Ticks > preWait)
|
if (DateTime.Now.Ticks > preWait)
|
||||||
break;
|
break;
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
StringBuilder stringBuilder = new();
|
|
||||||
for (short z = 0; z < short.MaxValue; z++)
|
for (short z = 0; z < short.MaxValue; z++)
|
||||||
{
|
{
|
||||||
stringBuilder = GetForJsonPath(connectionString, commandText);
|
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||||
if (stringBuilder.Length > 0)
|
if (stringBuilder.Length > 0)
|
||||||
|
{
|
||||||
|
long postBreakAfter = DateTime.Now.AddSeconds(5).Ticks;
|
||||||
|
for (short y = 0; y < short.MaxValue; y++)
|
||||||
|
{
|
||||||
|
if (DateTime.Now.Ticks > postBreakAfter)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(250);
|
||||||
|
}
|
||||||
|
stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
if (DateTime.Now.Ticks > breakAfter)
|
if (DateTime.Now.Ticks > breakAfter)
|
||||||
// throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!");
|
// throw new Exception($"After {breakAfterSeconds} seconds, didn't find sub group id!");
|
||||||
break;
|
break;
|
||||||
@ -110,18 +306,17 @@ public class FromIQS
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(stringBuilder.ToString());
|
JsonElement[]? jsonElements = JsonSerializer.Deserialize<JsonElement[]>(stringBuilder.ToString());
|
||||||
if (jsonElements is null || !jsonElements.Any() || jsonElements[0].ValueKind != JsonValueKind.Object)
|
if (jsonElements is null || jsonElements.Length == 0 || jsonElements[0].ValueKind != JsonValueKind.Object)
|
||||||
commandText = stringBuilder.ToString();
|
commandText = stringBuilder.ToString();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray();
|
JsonProperty[] jsonProperties = jsonElements[0].EnumerateObject().ToArray();
|
||||||
if (!jsonProperties.Any() || jsonProperties[0].Name != "se_sgrp" || !long.TryParse(jsonProperties[0].Value.ToString(), out long subGroupId))
|
if (jsonProperties.Length == 0 || jsonProperties[3].Name != "se_sgrp" || !long.TryParse(jsonProperties[3].Value.ToString(), out long subGroupId))
|
||||||
commandText = stringBuilder.ToString();
|
commandText = stringBuilder.ToString();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = subGroupId;
|
result = subGroupId;
|
||||||
commandText = GetCommandText(logistics, description, dateTime, subGroupId);
|
if (jsonProperties.Length != 0 && jsonProperties[0].Name == "ev_count" && int.TryParse(jsonProperties[0].Value.ToString(), out int evCount))
|
||||||
if (jsonProperties.Any() && jsonProperties[10].Name == "ev_count" && int.TryParse(jsonProperties[10].Value.ToString(), out int evCount))
|
|
||||||
count = evCount;
|
count = evCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -129,7 +324,7 @@ public class FromIQS
|
|||||||
return new(result, count, commandText);
|
return new(result, count, commandText);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetJson(Logistics logistics, string logisticLines, SECS.Description description)
|
private static string GetJson(Logistics logistics, ProcessDataStandardFormat processDataStandardFormat, SECS.Description description)
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
@ -149,7 +344,7 @@ public class FromIQS
|
|||||||
string safeValue;
|
string safeValue;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
string serializerValue;
|
string serializerValue;
|
||||||
foreach (string line in logisticLines.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
|
foreach (string line in processDataStandardFormat.Logistics)
|
||||||
{
|
{
|
||||||
segments = line.Split('\t');
|
segments = line.Split('\t');
|
||||||
if (segments.Length < 2)
|
if (segments.Length < 2)
|
||||||
@ -180,40 +375,115 @@ public class FromIQS
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Save(string openInsightApiECDirectory, string openInsightApiIFXDirectory, Logistics logistics, string reportFullPath, string logisticLines, SECS.Description description, string lines, long? subGroupId, string weekOfYear)
|
internal static void Save(string openInsightApiECDirectory, Logistics logistics, string reportFullPath, ProcessDataStandardFormat processDataStandardFormat, SECS.Description description, long? subGroupId, string weekOfYear)
|
||||||
{
|
{
|
||||||
string checkFile;
|
string checkFile;
|
||||||
string fileName = Path.GetFileName(reportFullPath);
|
string fileName = Path.GetFileName(reportFullPath);
|
||||||
string json = GetJson(logistics, logisticLines, description);
|
string json = GetJson(logistics, processDataStandardFormat, description);
|
||||||
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
|
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
|
||||||
string? ifxPathRoot = Path.GetPathRoot(openInsightApiIFXDirectory);
|
|
||||||
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
|
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
|
||||||
bool ifxExists = ifxPathRoot is not null && Directory.Exists(ifxPathRoot);
|
|
||||||
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
||||||
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
||||||
string ifxDirectory = Path.Combine(openInsightApiIFXDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
|
||||||
if (ecExists && !Directory.Exists(ecDirectory))
|
if (ecExists && !Directory.Exists(ecDirectory))
|
||||||
_ = Directory.CreateDirectory(ecDirectory);
|
_ = Directory.CreateDirectory(ecDirectory);
|
||||||
if (ifxExists && !Directory.Exists(ifxDirectory))
|
|
||||||
_ = Directory.CreateDirectory(ifxDirectory);
|
|
||||||
checkFile = Path.Combine(ecDirectory, fileName);
|
checkFile = Path.Combine(ecDirectory, fileName);
|
||||||
if (ecExists && !File.Exists(checkFile))
|
if (ecExists && !File.Exists(checkFile))
|
||||||
File.Copy(reportFullPath, checkFile);
|
File.Copy(reportFullPath, checkFile);
|
||||||
checkFile = Path.Combine(ifxDirectory, fileName);
|
|
||||||
if (ifxExists && !File.Exists(checkFile))
|
|
||||||
File.Copy(reportFullPath, checkFile);
|
|
||||||
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
|
||||||
if (ecExists && !File.Exists(checkFile))
|
|
||||||
File.WriteAllText(checkFile, lines);
|
|
||||||
checkFile = Path.Combine(ifxDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
|
||||||
if (ifxExists && !File.Exists(checkFile))
|
|
||||||
File.WriteAllText(checkFile, lines);
|
|
||||||
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
||||||
if (ecExists && !File.Exists(checkFile))
|
if (ecExists && !File.Exists(checkFile))
|
||||||
File.WriteAllText(checkFile, json);
|
File.WriteAllText(checkFile, json);
|
||||||
checkFile = Path.Combine(ifxDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
}
|
||||||
if (ifxExists && !File.Exists(checkFile))
|
|
||||||
File.WriteAllText(checkFile, json);
|
private static string GetCommandText(string[] iqsCopyValues)
|
||||||
|
{ // cSpell:disable
|
||||||
|
List<string> results = new();
|
||||||
|
if (iqsCopyValues.Length != 4)
|
||||||
|
throw new NotSupportedException();
|
||||||
|
string find = iqsCopyValues[1];
|
||||||
|
string replace = iqsCopyValues[3];
|
||||||
|
results.Add(" select pd.f_name [Part Name], ");
|
||||||
|
results.Add(" null [Part Revision], ");
|
||||||
|
results.Add($" '{replace}' [Test Name], ");
|
||||||
|
results.Add(" null [Description], ");
|
||||||
|
results.Add(" null [Lot Number], ");
|
||||||
|
results.Add(" null [Job Name], ");
|
||||||
|
results.Add(" null [Process Name], ");
|
||||||
|
results.Add(" case when sl.f_url = 0 then null else sl.f_url end [Reasonable Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_url = 0 then 0 else 1 end [Alarm Reasonable Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_usl = 0 then null else sl.f_usl end [Specification Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_usl = 0 then 0 else 1 end [Alarm Specification Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_ugb = 0 then null else sl.f_ugb end [Warning Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_ugb = 0 then 0 else 1 end [Alarm Warning Limit (Upper)], ");
|
||||||
|
results.Add(" case when sl.f_tar = 0 then null else sl.f_tar end [Specification Limit (Target)], ");
|
||||||
|
results.Add(" case when sl.f_lgb = 0 then null else sl.f_lgb end [Warning Limit (Lower)], ");
|
||||||
|
results.Add(" case when sl.f_lgb = 0 then 0 else 1 end [Alarm Warning Limit (Lower)], ");
|
||||||
|
results.Add(" case when sl.f_lsl = 0 then null else sl.f_lsl end [Specification Limit (Lower)], ");
|
||||||
|
results.Add(" case when sl.f_lsl = 0 then 0 else 1 end [Alarm Specification Limit (Lower)], ");
|
||||||
|
results.Add(" case when sl.f_lrl = 0 then null else sl.f_lrl end [Reasonable Limit (Lower)], ");
|
||||||
|
results.Add(" case when sl.f_lrl = 0 then 0 else 1 end [Alarm Reasonable Limit (Lower)], ");
|
||||||
|
results.Add(" td.f_name [Original Test Name], ");
|
||||||
|
results.Add(" td.f_test [Test Id], ");
|
||||||
|
results.Add(" ( ");
|
||||||
|
results.Add(" select count(sl_b.f_spec) ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
|
||||||
|
results.Add(" on sl_b.f_part = pd_b.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
|
||||||
|
results.Add(" on sl_b.f_test = td_b.f_test ");
|
||||||
|
results.Add(" where sl_b.f_prcs = 0 ");
|
||||||
|
results.Add($" and td_b.f_name = '{replace}' ");
|
||||||
|
results.Add(" and pd_b.f_name = pd.f_name ");
|
||||||
|
results.Add(" and sl_b.f_url = sl.f_url ");
|
||||||
|
results.Add(" and sl_b.f_usl = sl.f_usl ");
|
||||||
|
results.Add(" and sl_b.f_ugb = sl.f_ugb ");
|
||||||
|
results.Add(" and sl_b.f_tar = sl.f_tar ");
|
||||||
|
results.Add(" and sl_b.f_lgb = sl.f_lgb ");
|
||||||
|
results.Add(" and sl_b.f_lsl = sl.f_lsl ");
|
||||||
|
results.Add(" and sl_b.f_lrl = sl.f_lrl ");
|
||||||
|
results.Add(" group by sl_b.f_spec ");
|
||||||
|
results.Add(" ) count ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd ");
|
||||||
|
results.Add(" on sl.f_part = pd.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td ");
|
||||||
|
results.Add(" on sl.f_test = td.f_test ");
|
||||||
|
results.Add(" where sl.f_prcs = 0 ");
|
||||||
|
results.Add($" and td.f_name = '{find}' ");
|
||||||
|
results.Add(" and isnull(( ");
|
||||||
|
results.Add(" select count(sl_b.f_spec) ");
|
||||||
|
results.Add(" from [spcepiworld].[dbo].[spec_lim] sl_b ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[part_dat] pd_b ");
|
||||||
|
results.Add(" on sl_b.f_part = pd_b.f_part ");
|
||||||
|
results.Add(" join [spcepiworld].[dbo].[test_dat] td_b ");
|
||||||
|
results.Add(" on sl_b.f_test = td_b.f_test ");
|
||||||
|
results.Add(" where sl_b.f_prcs = 0 ");
|
||||||
|
results.Add($" and td_b.f_name = '{replace}' ");
|
||||||
|
results.Add(" and pd_b.f_name = pd.f_name ");
|
||||||
|
results.Add(" and sl_b.f_url = sl.f_url ");
|
||||||
|
results.Add(" and sl_b.f_usl = sl.f_usl ");
|
||||||
|
results.Add(" and sl_b.f_ugb = sl.f_ugb ");
|
||||||
|
results.Add(" and sl_b.f_tar = sl.f_tar ");
|
||||||
|
results.Add(" and sl_b.f_lgb = sl.f_lgb ");
|
||||||
|
results.Add(" and sl_b.f_lsl = sl.f_lsl ");
|
||||||
|
results.Add(" and sl_b.f_lrl = sl.f_lrl ");
|
||||||
|
results.Add(" group by sl_b.f_spec ");
|
||||||
|
results.Add(" ), 0) = 0 ");
|
||||||
|
results.Add(" for json path ");
|
||||||
|
return string.Join(Environment.NewLine, results);
|
||||||
|
} // cSpell:restore
|
||||||
|
|
||||||
|
internal static void SaveCopy(string fileConnectorConfigurationSourceFileLocation, string connectionString, string name, string[] iqsCopyValues)
|
||||||
|
{
|
||||||
|
string checkFile = Path.Combine(fileConnectorConfigurationSourceFileLocation, $"{name}.json");
|
||||||
|
if (!File.Exists(checkFile))
|
||||||
|
{
|
||||||
|
string commandText = GetCommandText(iqsCopyValues);
|
||||||
|
StringBuilder stringBuilder = GetForJsonPath(connectionString, commandText);
|
||||||
|
if (stringBuilder.Length != 0)
|
||||||
|
File.WriteAllText(checkFile, stringBuilder.ToString());
|
||||||
|
else
|
||||||
|
File.WriteAllText(Path.Combine(fileConnectorConfigurationSourceFileLocation, $"{name}.sql"), commandText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|||||||
47
Adaptation/FileHandlers/OpenInsight/Root.cs
Normal file
47
Adaptation/FileHandlers/OpenInsight/Root.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Adaptation.FileHandlers.OpenInsight;
|
||||||
|
|
||||||
|
public class Root
|
||||||
|
{
|
||||||
|
|
||||||
|
[JsonPropertyName("count_se_sgtm")] public long CountSeSgtm { get; }
|
||||||
|
[JsonPropertyName("date_time")] public DateTime DateTime { get; }
|
||||||
|
[JsonPropertyName("max_max_se_test")] public long MaxMaxSeTest { get; }
|
||||||
|
[JsonPropertyName("max_max_se_test_name")] public string MaxMaxSeTestName { get; }
|
||||||
|
[JsonPropertyName("max_max_se_val")] public double MaxMaxSeVal { get; }
|
||||||
|
[JsonPropertyName("max_se_lot")] public long MaxSeLot { get; }
|
||||||
|
[JsonPropertyName("max_se_lot_name")] public string MaxSeLotName { get; }
|
||||||
|
[JsonPropertyName("max_se_part")] public long MaxSePart { get; }
|
||||||
|
[JsonPropertyName("max_se_part_name")] public string MaxSePartName { get; }
|
||||||
|
[JsonPropertyName("max_se_prcs")] public long MaxSePrcs { get; }
|
||||||
|
[JsonPropertyName("max_se_prcs_name")] public string MaxSePrcsName { get; }
|
||||||
|
[JsonPropertyName("max_se_sgrp")] public long MaxSeSgrp { get; }
|
||||||
|
[JsonPropertyName("min_min_se_test")] public long MinMinSeTest { get; }
|
||||||
|
[JsonPropertyName("min_min_se_test_name")] public string MinMinSeTestName { get; }
|
||||||
|
[JsonPropertyName("min_min_se_val")] public double MinMinSeVal { get; }
|
||||||
|
[JsonPropertyName("min_se_sgrp")] public long MinSeSgrp { get; }
|
||||||
|
|
||||||
|
[JsonConstructor]
|
||||||
|
public Root(long countSeSgtm, DateTime dateTime, long maxMaxSeTest, string maxMaxSeTestName, double maxMaxSeVal, long maxSeLot, string maxSeLotName, long maxSePart, string maxSePartName, long maxSePrcs, string maxSePrcsName, long maxSeSgrp, long minMinSeTest, string minMinSeTestName, double minMinSeVal, long minSeSgrp)
|
||||||
|
{
|
||||||
|
CountSeSgtm = countSeSgtm;
|
||||||
|
DateTime = dateTime;
|
||||||
|
MaxMaxSeTest = maxMaxSeTest;
|
||||||
|
MaxMaxSeTestName = maxMaxSeTestName;
|
||||||
|
MaxMaxSeVal = maxMaxSeVal;
|
||||||
|
MaxSeLot = maxSeLot;
|
||||||
|
MaxSeLotName = maxSeLotName;
|
||||||
|
MaxSePart = maxSePart;
|
||||||
|
MaxSePartName = maxSePartName;
|
||||||
|
MaxSePrcs = maxSePrcs;
|
||||||
|
MaxSePrcsName = maxSePrcsName;
|
||||||
|
MaxSeSgrp = maxSeSgrp;
|
||||||
|
MinMinSeTest = minMinSeTest;
|
||||||
|
MinMinSeTestName = minMinSeTestName;
|
||||||
|
MinMinSeVal = minMinSeVal;
|
||||||
|
MinSeSgrp = minSeSgrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -103,26 +103,24 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SendData(DateTime dateTime, List<SECS.Description> descriptions)
|
#pragma warning disable IDE0060
|
||||||
|
private static void SendData(string reportFullPath, DateTime dateTime, List<SECS.Description> descriptions)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
if (descriptions is null)
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
SendData(dateTime, descriptions);
|
SendData(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.OpenInsightMetrologyViewerAttachments;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -103,28 +103,26 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List<SECS.Description> descriptions)
|
#pragma warning disable IDE0060
|
||||||
|
private static void PostOpenInsightMetrologyViewerAttachments(List<SECS.Description> descriptions)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
if (reportFullPath is null)
|
|
||||||
{ }
|
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
if (descriptions is null)
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0060
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
List<SECS.Description> descriptions = SECS.ProcessData.GetDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
PostOpenInsightMetrologyViewerAttachments(reportFullPath, dateTime, descriptions);
|
PostOpenInsightMetrologyViewerAttachments(descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.Processed;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -103,26 +103,22 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0060
|
||||||
private static void DirectoryMove(string reportFullPath, DateTime dateTime, List<Shared.Properties.IDescription> descriptions)
|
private static void DirectoryMove(string reportFullPath, DateTime dateTime, List<Shared.Properties.IDescription> descriptions)
|
||||||
|
#pragma warning restore IDE0060
|
||||||
{
|
{
|
||||||
if (reportFullPath is null)
|
|
||||||
{ }
|
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
if (descriptions is null)
|
|
||||||
{ }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
DirectoryMove(reportFullPath, dateTime, descriptions);
|
DirectoryMove(reportFullPath, dateTime, descriptions);
|
||||||
return results;
|
return results;
|
||||||
|
|||||||
@ -14,14 +14,15 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
|
|
||||||
|
public string MesEntity { get; set; }
|
||||||
|
public string Date { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("CURRENT_RECIPE_NAME")]
|
[JsonPropertyName("CURRENT_RECIPE_NAME")]
|
||||||
public string PSN { get; set; } // Part
|
public string PSN { get; set; } // Part
|
||||||
|
|
||||||
[JsonPropertyName("LotID")]
|
[JsonPropertyName("LotID")]
|
||||||
public string Reactor { get; set; } // Process
|
public string Reactor { get; set; } // Process
|
||||||
|
|
||||||
public string MesEntity { get; set; }
|
|
||||||
|
|
||||||
[JsonPropertyName("ID")]
|
[JsonPropertyName("ID")]
|
||||||
public string RDS { get; set; } // Lot
|
public string RDS { get; set; } // Lot
|
||||||
|
|
||||||
@ -31,7 +32,8 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
[JsonPropertyName("SAMPLETYPE")]
|
[JsonPropertyName("SAMPLETYPE")]
|
||||||
public string Employee { get; set; } // Item descriptor
|
public string Employee { get; set; } // Item descriptor
|
||||||
|
|
||||||
public string Date { get; set; }
|
[JsonPropertyName("SLOT_NUMBER")]
|
||||||
|
public string SlotNumber { get; set; } // Item descriptor
|
||||||
|
|
||||||
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||||
|
|
||||||
@ -68,6 +70,6 @@ public class Description : IDescription, Shared.Properties.IDescription
|
|||||||
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData) =>
|
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData) =>
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|
||||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
internal static string GetDateFormat() => "MM/dd/yyyy HH:mm:ss";
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -26,7 +26,6 @@ public class ProcessData : IProcessData
|
|||||||
|
|
||||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName, string pdfTextStripperFileName)
|
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, string ghostPCLFileName, string pdfTextStripperFileName)
|
||||||
{
|
{
|
||||||
fileInfoCollection.Clear();
|
|
||||||
_Details = new List<object>();
|
_Details = new List<object>();
|
||||||
JobID = logistics.JobID;
|
JobID = logistics.JobID;
|
||||||
MesEntity = logistics.MesEntity;
|
MesEntity = logistics.MesEntity;
|
||||||
|
|||||||
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.SPaCe;
|
|||||||
public class FileRead : Shared.FileRead, IFileRead
|
public class FileRead : Shared.FileRead, IFileRead
|
||||||
{
|
{
|
||||||
|
|
||||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Shared.Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
|
||||||
{
|
{
|
||||||
_MinFileLength = 10;
|
_MinFileLength = 10;
|
||||||
_NullData = string.Empty;
|
_NullData = string.Empty;
|
||||||
@ -116,18 +116,16 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
|
|
||||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||||
{
|
{
|
||||||
if (dateTime == DateTime.MinValue)
|
|
||||||
{ }
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
ProcessDataStandardFormat processDataStandardFormat = ProcessDataStandardFormat.GetProcessDataStandardFormat(reportFullPath);
|
||||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
_Logistics = new Logistics(reportFullPath, processDataStandardFormat);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(pdsf);
|
JsonElement[] jsonElements = ProcessDataStandardFormat.GetArray(processDataStandardFormat);
|
||||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||||
FileCopy(reportFullPath, dateTime, descriptions);
|
FileCopy(reportFullPath, dateTime, descriptions);
|
||||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(string.Join(Environment.NewLine, processDataStandardFormat.Logistics), tests, jsonElements, new List<FileInfo>());
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,21 +18,12 @@ public class MonIn : IMonIn, IDisposable
|
|||||||
public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text")
|
public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text")
|
||||||
{
|
{
|
||||||
MonIn instance;
|
MonIn instance;
|
||||||
if (_Instances.ContainsKey(url))
|
lock (_Instances)
|
||||||
{
|
{
|
||||||
instance = _Instances[url];
|
if (_Instances.TryGetValue(url, out instance))
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lock (_Instances)
|
|
||||||
{
|
{
|
||||||
if (!_Instances.ContainsKey(url))
|
instance = new MonIn(url);
|
||||||
{
|
_Instances.Add(url, instance);
|
||||||
instance = new MonIn(url);
|
|
||||||
_Instances.Add(url, instance);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
instance = _Instances[url];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
|
|||||||
@ -1,155 +0,0 @@
|
|||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- Development
|
|
||||||
paths:
|
|
||||||
include:
|
|
||||||
- "Adaptation/*"
|
|
||||||
|
|
||||||
pool:
|
|
||||||
name: Mesa-Windows-Service
|
|
||||||
demands: MET08ANLYSDIFAAST230-Development
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
set coreVersion=net6.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://messa017.infineon.com/v3/index.json
|
|
||||||
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"
|
|
||||||
|
|
||||||
- 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)"
|
|
||||||
|
|
||||||
- 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:
|
|
||||||
SourceFolder: 'bin\$(Configuration)'
|
|
||||||
Contents: "*$(Build.Repository.Name)*"
|
|
||||||
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
|
|
||||||
OverWrite: true
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
|
||||||
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
|
|
||||||
inputs:
|
|
||||||
SourceFolder: 'bin\$(Configuration)'
|
|
||||||
Contents: "*$(Build.Repository.Name)*"
|
|
||||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\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
|
|
||||||
|
|||||||
@ -8,10 +8,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ImplicitUsings>disable</ImplicitUsings>
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<LangVersion>10.0</LangVersion>
|
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx</VSTestLogger>
|
<VSTestLogger>trx</VSTestLogger>
|
||||||
@ -33,7 +32,10 @@
|
|||||||
<DefineConstants>Linux</DefineConstants>
|
<DefineConstants>Linux</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" Version="3.2.0" />
|
<RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08ANLYSDIFAAST230" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="6.0.3" />
|
||||||
<PackageReference Include="FFMpegCore" Version="5.1.0" />
|
<PackageReference Include="FFMpegCore" Version="5.1.0" />
|
||||||
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
@ -42,42 +44,40 @@
|
|||||||
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="Instances" Version="3.0.0" />
|
<PackageReference Include="Instances" Version="3.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
|
<PackageReference Include="log4net" Version="3.0.3"></PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
|
||||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="9.0.0" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
<PackageReference Include="MSTest.TestAdapter" Version="3.7.0" />
|
||||||
|
<PackageReference Include="MSTest.TestFramework" Version="3.7.0" />
|
||||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
<PackageReference Include="RoboSharp" Version="1.2.8" />
|
<PackageReference Include="RoboSharp" Version="1.6.0" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
|
||||||
<PackageReference Include="System.Data.OleDb" Version="7.0.0" />
|
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
|
||||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
<PackageReference Include="System.Drawing.Common" Version="9.0.0" />
|
||||||
<PackageReference Include="System.Text.Json" Version="7.0.2" />
|
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.2"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.3" />
|
||||||
|
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
|
||||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
|
||||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
|
||||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="appsettings.json">
|
<None Include="appsettings.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
|||||||
@ -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:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
@ -6,148 +12,309 @@ trigger:
|
|||||||
include:
|
include:
|
||||||
- "Adaptation/*"
|
- "Adaptation/*"
|
||||||
|
|
||||||
pool:
|
stages:
|
||||||
name: Mesa-Windows-Service
|
- stage: DevServer
|
||||||
demands: MET08ANLYSDIFAAST230
|
displayName: DevServer
|
||||||
|
|
||||||
steps:
|
pool:
|
||||||
- script: |
|
name: EAF Mesa Integration
|
||||||
set coreVersion=net6.0
|
demands: MET08ANLYSDIFAAST230-Development
|
||||||
echo %coreVersion%
|
|
||||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
|
||||||
echo $(CoreVersion)
|
|
||||||
displayName: CoreVersion
|
|
||||||
|
|
||||||
- script: |
|
variables:
|
||||||
set configuration=Release
|
coreVersion: "net8.0"
|
||||||
echo %configuration%
|
nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
|
||||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
|
||||||
echo ($Configuration)
|
|
||||||
displayName: Configuration
|
|
||||||
|
|
||||||
- script: |
|
jobs:
|
||||||
set nugetSource=https://messa08ec.ec.local/v3/index.json
|
- job: SetupEnvironment
|
||||||
echo %nugetSource%
|
steps:
|
||||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
- script: |
|
||||||
echo $(NugetSource)
|
echo $(Build.BuildId)
|
||||||
displayName: NugetSource
|
echo $(Build.Reason)
|
||||||
|
echo $(Build.Repository.Id)
|
||||||
|
echo $(Build.Repository.Name)
|
||||||
|
echo $(Build.SourceVersion)
|
||||||
|
echo $(CoreVersion)
|
||||||
|
echo $(NugetSource)
|
||||||
|
displayName: "Echo Check"
|
||||||
|
|
||||||
- script: |
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
set gitCommit=$(Build.SourceVersion)
|
displayName: "Nuget Clear"
|
||||||
set gitCommitSeven=%gitCommit:~0,7%
|
enabled: false
|
||||||
echo %gitCommitSeven%
|
|
||||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
|
||||||
echo $(GitCommitSeven)
|
|
||||||
displayName: GitCommitSeven
|
|
||||||
|
|
||||||
- script: |
|
- task: CopyFiles@2
|
||||||
echo $(Build.BuildId)
|
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
echo $(Build.Reason)
|
inputs:
|
||||||
echo $(Build.Repository.Id)
|
Contents: "*"
|
||||||
echo $(Build.Repository.Name)
|
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
||||||
echo $(Build.SourceVersion)
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
||||||
echo $(CoreVersion)
|
OverWrite: true
|
||||||
echo $(Configuration)
|
enabled: true
|
||||||
echo $(NugetSource)
|
|
||||||
echo $(GitCommitSeven)
|
|
||||||
REM echo $(pipelinePassword)
|
|
||||||
displayName: "Echo Check"
|
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
- task: CopyFiles@2
|
||||||
displayName: "Nuget Clear"
|
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
enabled: false
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: true
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
"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 "BuildNumber" "$(Build.BuildId)"
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommit" "$(Build.SourceVersion)"
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||||
workingDirectory: Adaptation
|
workingDirectory: Adaptation
|
||||||
displayName: "Safe storage of app secrets - Adaptation"
|
displayName: "Safe storage of app secrets - Adaptation"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
- job: BuildDebug
|
||||||
workingDirectory: Adaptation
|
dependsOn:
|
||||||
displayName: "Core Build - Adaptation"
|
- SetupEnvironment
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
set configuration=Debug
|
||||||
|
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 }
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
workingDirectory: Adaptation
|
||||||
displayName: "PowerShell Script"
|
displayName: "Core Build - Adaptation"
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- script: "dotnet test --configuration $(Configuration)"
|
- job: BuildRelease
|
||||||
workingDirectory: Adaptation
|
dependsOn:
|
||||||
displayName: "Core Test"
|
- SetupEnvironment
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
set configuration=Release
|
||||||
|
echo %configuration%
|
||||||
|
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||||
|
echo $(Configuration)
|
||||||
|
displayName: Configuration
|
||||||
|
|
||||||
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
- 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: "Move Results"
|
displayName: "MSBuild Restore"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" tool 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'
|
||||||
workingDirectory: Adaptation
|
displayName: MSBuild
|
||||||
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'
|
- 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'
|
||||||
workingDirectory: Adaptation
|
displayName: MSBuild
|
||||||
displayName: "Report Generator"
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- script: 'echo $(Build.Repository.Name)-$(Build.BuildId)-$(Build.SourceVersion)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
||||||
displayName: "Publish Test Results **/*.trx"
|
displayName: "Commit Id"
|
||||||
inputs:
|
|
||||||
testResultsFormat: VSTest
|
|
||||||
testResultsFiles: "**/*.trx"
|
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)"
|
|
||||||
|
|
||||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
- task: CopyFiles@2
|
||||||
displayName: "Create work item"
|
displayName: 'Copy Files to: D:\EAF'
|
||||||
inputs:
|
inputs:
|
||||||
teamProject: "Mesa_FI"
|
Contents: "*$(Build.Repository.Name)*"
|
||||||
workItemType: Bug
|
SourceFolder: 'bin\$(Configuration)'
|
||||||
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
|
TargetFolder: 'D:\EAF\EAF Deployment Storage\Adaptation_$(Build.Repository.Name)'
|
||||||
assignedTo: "$(Build.RequestedForId)"
|
OverWrite: true
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
|
- job: TestDebug
|
||||||
workingDirectory: Adaptation
|
dependsOn:
|
||||||
displayName: "Core Publish"
|
- SetupEnvironment
|
||||||
enabled: false
|
- BuildDebug
|
||||||
|
- BuildRelease
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
set configuration=Debug
|
||||||
|
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)'
|
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||||
displayName: "MSBuild Restore"
|
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
||||||
|
displayName: "PowerShell Script"
|
||||||
|
continueOnError: 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'
|
- script: "dotnet test --configuration $(Configuration)"
|
||||||
displayName: MSBuild
|
workingDirectory: Adaptation
|
||||||
|
displayName: "Core Test"
|
||||||
|
|
||||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
||||||
displayName: "Commit Id"
|
displayName: "Move Results"
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||||
displayName: 'Copy Files to: D:\Framework4.8'
|
workingDirectory: Adaptation
|
||||||
inputs:
|
displayName: "Tool Restore"
|
||||||
SourceFolder: 'bin\$(Configuration)'
|
enabled: false
|
||||||
Contents: "*$(Build.Repository.Name)*"
|
|
||||||
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
|
|
||||||
OverWrite: true
|
|
||||||
|
|
||||||
- task: CopyFiles@2
|
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||||
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
|
workingDirectory: Adaptation
|
||||||
inputs:
|
displayName: "Report Generator"
|
||||||
SourceFolder: 'bin\$(Configuration)'
|
enabled: false
|
||||||
Contents: "*$(Build.Repository.Name)*"
|
|
||||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
|
|
||||||
OverWrite: true
|
|
||||||
|
|
||||||
- script: |
|
- task: PublishTestResults@2
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
displayName: "Publish Test Results **/*.trx"
|
||||||
workingDirectory: Adaptation
|
inputs:
|
||||||
displayName: "Core Clean - Tests"
|
testResultsFormat: VSTest
|
||||||
|
testResultsFiles: "**/*.trx"
|
||||||
|
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||||
|
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||||
|
|
||||||
- script: |
|
- task: PublishTestResults@2
|
||||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
displayName: "Publish Test Results */coverage.cobertura.xml"
|
||||||
workingDirectory: Adaptation
|
inputs:
|
||||||
displayName: "Core Clean - Adaptation"
|
testResultsFormat: VSTest
|
||||||
|
testResultsFiles: "*/coverage.cobertura.xml"
|
||||||
|
testRunTitle: "$(Build.BuildId)-$(Build.SourceVersion)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||||
|
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||||
|
|
||||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
- script: |
|
||||||
displayName: "Force Fail"
|
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||||
enabled: false
|
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: false
|
||||||
|
|
||||||
|
- stage: ProductionServer
|
||||||
|
displayName: ProductionServer
|
||||||
|
|
||||||
|
pool:
|
||||||
|
name: EAF Mesa Integration
|
||||||
|
demands: MET08ANLYSDIFAAST230
|
||||||
|
|
||||||
|
variables:
|
||||||
|
coreVersion: "net8.0"
|
||||||
|
nugetSource: "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/"
|
||||||
|
|
||||||
|
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: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
|
displayName: "Nuget Clear"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy GhostPCL Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\GhostPCL'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy LincPDFC Files to: D:\EAF-Mesa-Integration\copy'
|
||||||
|
inputs:
|
||||||
|
Contents: "*"
|
||||||
|
SourceFolder: '\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC'
|
||||||
|
TargetFolder: 'D:\EAF-Mesa-Integration\copy\LincPDFC'
|
||||||
|
OverWrite: true
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|||||||
@ -115,6 +115,42 @@ public class Description : IDescription, Properties.IDescription
|
|||||||
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
|
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
|
||||||
{
|
{
|
||||||
List<IDescription> results = new();
|
List<IDescription> results = new();
|
||||||
|
if (iProcessData is null || iProcessData.Details.Count == 0)
|
||||||
|
results.Add(GetDefault(fileRead, logistics));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string nullData;
|
||||||
|
Description description;
|
||||||
|
object configDataNullData = fileRead.NullData;
|
||||||
|
if (configDataNullData is null)
|
||||||
|
nullData = string.Empty;
|
||||||
|
else
|
||||||
|
nullData = configDataNullData.ToString();
|
||||||
|
for (int i = 0; i < iProcessData.Details.Count; i++)
|
||||||
|
{
|
||||||
|
if (iProcessData.Details[i] is null)
|
||||||
|
continue;
|
||||||
|
description = new Description
|
||||||
|
{
|
||||||
|
Test = (int)tests[i],
|
||||||
|
Count = tests.Count,
|
||||||
|
Index = i,
|
||||||
|
//
|
||||||
|
EventName = fileRead.EventName,
|
||||||
|
NullData = nullData,
|
||||||
|
JobID = fileRead.CellInstanceName,
|
||||||
|
Sequence = logistics.Sequence.ToString(),
|
||||||
|
MesEntity = logistics.MesEntity,
|
||||||
|
ReportFullPath = logistics.ReportFullPath,
|
||||||
|
ProcessJobID = logistics.ProcessJobID,
|
||||||
|
MID = logistics.MID,
|
||||||
|
//
|
||||||
|
Date = DateTime.Now.ToString(GetDateFormat()),
|
||||||
|
RDS = string.Empty,
|
||||||
|
};
|
||||||
|
results.Add(description);
|
||||||
|
}
|
||||||
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -44,9 +44,9 @@ public class FileRead : Properties.IFileRead
|
|||||||
protected readonly string _CellInstanceConnectionNameBase;
|
protected readonly string _CellInstanceConnectionNameBase;
|
||||||
protected readonly Dictionary<string, List<long>> _DummyRuns;
|
protected readonly Dictionary<string, List<long>> _DummyRuns;
|
||||||
protected readonly Dictionary<string, string> _FileParameter;
|
protected readonly Dictionary<string, string> _FileParameter;
|
||||||
protected readonly Dictionary<long, List<string>> _StaticRuns;
|
|
||||||
protected readonly string _ParameterizedModelObjectDefinitionType;
|
protected readonly string _ParameterizedModelObjectDefinitionType;
|
||||||
protected readonly FileConnectorConfiguration _FileConnectorConfiguration;
|
protected readonly FileConnectorConfiguration _FileConnectorConfiguration;
|
||||||
|
protected readonly Dictionary<long, List<Metrology.WS.Results>> _StaticRuns;
|
||||||
protected readonly IList<ModelObjectParameterDefinition> _ModelObjectParameterDefinitions;
|
protected readonly IList<ModelObjectParameterDefinition> _ModelObjectParameterDefinitions;
|
||||||
|
|
||||||
bool Properties.IFileRead.IsEvent => _IsEvent;
|
bool Properties.IFileRead.IsEvent => _IsEvent;
|
||||||
@ -63,216 +63,21 @@ public class FileRead : Properties.IFileRead
|
|||||||
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
|
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
|
||||||
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
|
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
|
||||||
|
|
||||||
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription
|
||||||
{
|
|
||||||
_SMTP = smtp;
|
|
||||||
_IsEvent = isEvent;
|
|
||||||
_DummyRuns = dummyRuns;
|
|
||||||
_LastTicksDuration = 0;
|
|
||||||
_StaticRuns = staticRuns;
|
|
||||||
_IsEAFHosted = isEAFHosted;
|
|
||||||
_Description = description;
|
|
||||||
_FileParameter = fileParameter;
|
|
||||||
_ReportFullPath = string.Empty;
|
|
||||||
_CellInstanceName = cellInstanceName;
|
|
||||||
_Calendar = new CultureInfo("en-US").Calendar;
|
|
||||||
_Log = LogManager.GetLogger(typeof(FileRead));
|
|
||||||
_UseCyclicalForDescription = useCyclicalForDescription;
|
|
||||||
_CellInstanceConnectionName = cellInstanceConnectionName;
|
|
||||||
_ModelObjectParameterDefinitions = modelObjectParameters;
|
|
||||||
_FileConnectorConfiguration = fileConnectorConfiguration;
|
|
||||||
_ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType;
|
|
||||||
_IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt");
|
|
||||||
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
|
||||||
_Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
|
||||||
_TracePath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Trace");
|
|
||||||
_ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking);
|
|
||||||
string suffix;
|
|
||||||
string[] segments = _ParameterizedModelObjectDefinitionType.Split('.');
|
|
||||||
string @namespace = segments[0];
|
|
||||||
string eventNameFileRead = "FileRead";
|
|
||||||
string eventName = segments[segments.Length - 1];
|
|
||||||
bool isDuplicator = segments[0] == cellInstanceName;
|
|
||||||
_IsDuplicator = isDuplicator;
|
|
||||||
_CellInstanceConnectionNameBase = cellInstanceConnectionNameBase;
|
|
||||||
if (eventName == eventNameFileRead)
|
|
||||||
suffix = string.Empty;
|
|
||||||
else
|
|
||||||
suffix = string.Concat('_', eventName.Split(new string[] { eventNameFileRead }, StringSplitOptions.RemoveEmptyEntries)[1]);
|
|
||||||
string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix);
|
|
||||||
if (!isEAFHosted)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended)
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
|
||||||
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
|
||||||
// throw new Exception(cellInstanceConnectionName);
|
|
||||||
}
|
|
||||||
if (isDuplicator)
|
|
||||||
_MesEntity = string.Empty;
|
|
||||||
else
|
|
||||||
_MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
|
||||||
_EventName = eventName;
|
|
||||||
_EventNameFileRead = eventNameFileRead;
|
|
||||||
_EquipmentType = parameterizedModelObjectDefinitionTypeAppended;
|
|
||||||
long breakAfterSeconds;
|
|
||||||
if (_FileConnectorConfiguration is null)
|
|
||||||
breakAfterSeconds = 360;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased)
|
|
||||||
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileHandleTimeout.Value);
|
|
||||||
else if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.FileWatcher)
|
|
||||||
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value);
|
|
||||||
else
|
|
||||||
throw new Exception();
|
|
||||||
}
|
|
||||||
_BreakAfterSeconds = breakAfterSeconds;
|
|
||||||
UpdateLastTicksDuration(breakAfterSeconds * 10000000);
|
|
||||||
if (_IsDuplicator)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(_FileConnectorConfiguration.TargetFileLocation) || string.IsNullOrEmpty(_FileConnectorConfiguration.ErrorTargetFileLocation))
|
|
||||||
throw new Exception("_Configuration is empty?");
|
|
||||||
if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%'))
|
|
||||||
throw new Exception("_Configuration is incorrect for a duplicator!");
|
|
||||||
// if (_FileConnectorConfiguration is not null)
|
|
||||||
// {
|
|
||||||
// if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
|
||||||
// throw new Exception("SourceDirectoryCloaking is empty?");
|
|
||||||
// if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~"))
|
|
||||||
// throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!");
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string GetPropertyValue(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyName)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
List<string> results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList();
|
|
||||||
if (results.Count != 1)
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
result = results[0];
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
|
|
||||||
{
|
|
||||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
|
|
||||||
if (!results.Any())
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
|
|
||||||
{
|
|
||||||
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
|
|
||||||
if (!results.Any())
|
|
||||||
throw new Exception(cellInstanceConnectionName);
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void UpdateLastTicksDuration(long ticksDuration)
|
|
||||||
{
|
|
||||||
if (ticksDuration < 50000000)
|
|
||||||
ticksDuration = 50000000;
|
|
||||||
_LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667);
|
|
||||||
_Log.Info($"{new TimeSpan(ticksDuration).TotalMilliseconds} TotalMillisecond(s) to process{Environment.NewLine}{_CellInstanceConnectionName}{Environment.NewLine}<{_ReportFullPath}>");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
|
||||||
{
|
|
||||||
if (thread is not null)
|
|
||||||
{
|
|
||||||
ThreadState threadState;
|
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
|
||||||
{
|
|
||||||
if (thread is null)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
threadState = thread.ThreadState;
|
|
||||||
if (threadState is not ThreadState.Running and not ThreadState.WaitSleepJoin)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
Thread.Sleep(500);
|
|
||||||
}
|
|
||||||
lock (threadExceptions)
|
|
||||||
{
|
|
||||||
if (threadExceptions.Any())
|
|
||||||
{
|
|
||||||
foreach (Exception item in threadExceptions)
|
|
||||||
_Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace));
|
|
||||||
Exception exception = threadExceptions[0];
|
|
||||||
threadExceptions.Clear();
|
|
||||||
throw exception;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void WriteAllLines(string to, string[] exceptionLines)
|
|
||||||
{
|
|
||||||
string fileName = string.Concat(to, @"\readme.txt");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!Directory.Exists(to))
|
|
||||||
_ = Directory.CreateDirectory(to);
|
|
||||||
File.WriteAllLines(fileName, exceptionLines);
|
|
||||||
}
|
|
||||||
catch (Exception ex) { _Log.Error(ex.Message); }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
|
||||||
{
|
|
||||||
string[] results;
|
|
||||||
bool isErrorFile = exception is not null;
|
|
||||||
if (!to.EndsWith(@"\"))
|
|
||||||
_ = string.Concat(to, @"\");
|
|
||||||
if (!isErrorFile)
|
|
||||||
results = Array.Empty<string>();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace };
|
|
||||||
if (!_IsDuplicator)
|
|
||||||
WriteAllLines(to, results);
|
|
||||||
}
|
|
||||||
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
|
|
||||||
{
|
|
||||||
string itemFile;
|
|
||||||
List<string> directories = new();
|
|
||||||
foreach (FileInfo sourceFile in extractResults.Item4)
|
|
||||||
{
|
|
||||||
if (sourceFile.FullName != _Logistics.ReportFullPath)
|
|
||||||
{
|
|
||||||
itemFile = sourceFile.FullName.Replace(from, to);
|
|
||||||
Shared1880(itemFile, directories, sourceFile, isErrorFile);
|
|
||||||
}
|
|
||||||
else if (!isErrorFile && _Logistics is not null)
|
|
||||||
Shared1811(to, sourceFile);
|
|
||||||
}
|
|
||||||
Shared0231(directories);
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory) where T : Properties.IDescription
|
|
||||||
{
|
{
|
||||||
string result;
|
string result;
|
||||||
string rds;
|
string rds;
|
||||||
|
string fileName;
|
||||||
string dateValue;
|
string dateValue;
|
||||||
string rdsPlaceholder = "%RDS%";
|
string rdsPlaceholder = "%RDS%";
|
||||||
if (!descriptions.Any() || string.IsNullOrEmpty(descriptions[0].RDS))
|
string mesEntityPlaceholder = "%MesEntity%";
|
||||||
|
if (descriptions.Count == 0 || string.IsNullOrEmpty(descriptions[0].RDS))
|
||||||
rds = logistics.MID;
|
rds = logistics.MID;
|
||||||
else
|
else
|
||||||
rds = descriptions[0].RDS;
|
rds = descriptions[0].RDS;
|
||||||
string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
|
string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (segments.Length == 0)
|
if (segments.Length == 0)
|
||||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds));
|
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = segments[1].Split('%');
|
segments = segments[1].Split('%');
|
||||||
@ -284,7 +89,11 @@ public class FileRead : Properties.IFileRead
|
|||||||
continue;
|
continue;
|
||||||
datePlaceholder = string.Concat('%', segment, '%');
|
datePlaceholder = string.Concat('%', segment, '%');
|
||||||
}
|
}
|
||||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(datePlaceholder, dateValue));
|
fileName = scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue);
|
||||||
|
if (!duplicateFile.Contains("Viewer"))
|
||||||
|
result = Path.Combine(duplicateDirectory, fileName);
|
||||||
|
else
|
||||||
|
result = Path.Combine(duplicateDirectory, $"Viewer_{fileName}");
|
||||||
}
|
}
|
||||||
if (result.Contains('%'))
|
if (result.Contains('%'))
|
||||||
throw new Exception("Placeholder exists!");
|
throw new Exception("Placeholder exists!");
|
||||||
@ -306,7 +115,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
preWait = dateTime.AddMilliseconds(1234).Ticks;
|
preWait = dateTime.AddMilliseconds(1234).Ticks;
|
||||||
else
|
else
|
||||||
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
if (!collection.Any())
|
if (collection.Count == 0)
|
||||||
duplicateFiles.Add(duplicateFile);
|
duplicateFiles.Add(duplicateFile);
|
||||||
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
|
||||||
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
|
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
|
||||||
@ -317,7 +126,7 @@ public class FileRead : Properties.IFileRead
|
|||||||
else if (!scopeInfo.FileName.Contains('%'))
|
else if (!scopeInfo.FileName.Contains('%'))
|
||||||
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
|
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
|
||||||
else
|
else
|
||||||
tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory);
|
tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile);
|
||||||
tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0];
|
tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0];
|
||||||
duplicateFiles.Add(tupleFile);
|
duplicateFiles.Add(tupleFile);
|
||||||
if (_IsEAFHosted)
|
if (_IsEAFHosted)
|
||||||
@ -378,6 +187,293 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void WaitForFileConsumption<T>(DateTime dateTime, List<T> descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription
|
||||||
|
{
|
||||||
|
if (!isDummyRun && _IsEAFHosted)
|
||||||
|
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||||
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
|
{
|
||||||
|
if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter)
|
||||||
|
break;
|
||||||
|
Thread.Sleep(500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<Metrology.WS.Results>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
|
||||||
|
{
|
||||||
|
_SMTP = smtp;
|
||||||
|
_IsEvent = isEvent;
|
||||||
|
_DummyRuns = dummyRuns;
|
||||||
|
_LastTicksDuration = 0;
|
||||||
|
_StaticRuns = staticRuns;
|
||||||
|
_IsEAFHosted = isEAFHosted;
|
||||||
|
_Description = description;
|
||||||
|
_FileParameter = fileParameter;
|
||||||
|
_ReportFullPath = string.Empty;
|
||||||
|
_CellInstanceName = cellInstanceName;
|
||||||
|
_Calendar = new CultureInfo("en-US").Calendar;
|
||||||
|
_Log = LogManager.GetLogger(typeof(FileRead));
|
||||||
|
_UseCyclicalForDescription = useCyclicalForDescription;
|
||||||
|
_CellInstanceConnectionName = cellInstanceConnectionName;
|
||||||
|
_ModelObjectParameterDefinitions = modelObjectParameters;
|
||||||
|
_FileConnectorConfiguration = fileConnectorConfiguration;
|
||||||
|
_ParameterizedModelObjectDefinitionType = parameterizedModelObjectDefinitionType;
|
||||||
|
_IsSourceTimer = fileConnectorConfiguration.SourceFileFilter.StartsWith("*Timer.txt");
|
||||||
|
string cellInstanceConnectionNameBase = cellInstanceConnectionName.Replace("-", string.Empty);
|
||||||
|
_Hyphens = cellInstanceConnectionName.Length - cellInstanceConnectionNameBase.Length;
|
||||||
|
_TracePath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Trace");
|
||||||
|
_ExceptionSubject = string.Concat("Exception:", _CellInstanceConnectionName, _FileConnectorConfiguration?.SourceDirectoryCloaking);
|
||||||
|
string suffix;
|
||||||
|
string[] segments = _ParameterizedModelObjectDefinitionType.Split('.');
|
||||||
|
string @namespace = segments[0];
|
||||||
|
string eventNameFileRead = "FileRead";
|
||||||
|
string eventName = segments[segments.Length - 1];
|
||||||
|
bool isDuplicator = segments[0] == cellInstanceName;
|
||||||
|
_IsDuplicator = isDuplicator;
|
||||||
|
_CellInstanceConnectionNameBase = cellInstanceConnectionNameBase;
|
||||||
|
if (eventName == eventNameFileRead)
|
||||||
|
suffix = string.Empty;
|
||||||
|
else
|
||||||
|
suffix = string.Concat('_', eventName.Split(new string[] { eventNameFileRead }, StringSplitOptions.RemoveEmptyEntries)[1]);
|
||||||
|
string parameterizedModelObjectDefinitionTypeAppended = string.Concat(@namespace, suffix);
|
||||||
|
if (!isEAFHosted)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(equipmentTypeName) || equipmentTypeName != parameterizedModelObjectDefinitionTypeAppended)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent && connectionCount > 1)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
|
||||||
|
// throw new Exception(cellInstanceConnectionName);
|
||||||
|
// if (!string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
|
||||||
|
// throw new Exception(cellInstanceConnectionName);
|
||||||
|
}
|
||||||
|
if (isDuplicator)
|
||||||
|
_MesEntity = string.Empty;
|
||||||
|
else
|
||||||
|
_MesEntity = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".Alias"));
|
||||||
|
_EventName = eventName;
|
||||||
|
_EventNameFileRead = eventNameFileRead;
|
||||||
|
_EquipmentType = parameterizedModelObjectDefinitionTypeAppended;
|
||||||
|
long breakAfterSeconds;
|
||||||
|
if (_FileConnectorConfiguration is null)
|
||||||
|
breakAfterSeconds = 360;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.TimeBased)
|
||||||
|
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileHandleTimeout.Value);
|
||||||
|
else if (_FileConnectorConfiguration.FileScanningOption == FileConnectorConfiguration.FileScanningOptionEnum.FileWatcher)
|
||||||
|
breakAfterSeconds = Math.Abs(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value);
|
||||||
|
else
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
_BreakAfterSeconds = breakAfterSeconds;
|
||||||
|
UpdateLastTicksDuration(breakAfterSeconds * 10000000);
|
||||||
|
if (_IsDuplicator)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_FileConnectorConfiguration.TargetFileLocation) || string.IsNullOrEmpty(_FileConnectorConfiguration.ErrorTargetFileLocation))
|
||||||
|
throw new Exception("_Configuration is empty?");
|
||||||
|
if (_FileConnectorConfiguration.TargetFileLocation.Contains('%') || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains('%'))
|
||||||
|
throw new Exception("_Configuration is incorrect for a duplicator!");
|
||||||
|
// if (_FileConnectorConfiguration is not null)
|
||||||
|
// {
|
||||||
|
// if (string.IsNullOrEmpty(_FileConnectorConfiguration.SourceDirectoryCloaking))
|
||||||
|
// throw new Exception("SourceDirectoryCloaking is empty?");
|
||||||
|
// if (!_FileConnectorConfiguration.SourceDirectoryCloaking.StartsWith("~"))
|
||||||
|
// throw new Exception("SourceDirectoryCloaking is incorrect for a duplicator!");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static string GetPropertyValue(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyName)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
List<string> results = (from l in modelObjectParameters where l.Name == propertyName select l.Value).ToList();
|
||||||
|
if (results.Count != 1)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
result = results[0];
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void UpdateLastTicksDuration(long ticksDuration)
|
||||||
|
{
|
||||||
|
if (ticksDuration < 50000000)
|
||||||
|
ticksDuration = 50000000;
|
||||||
|
_LastTicksDuration = (long)Math.Ceiling(ticksDuration * .667);
|
||||||
|
_Log.Info($"{new TimeSpan(ticksDuration).TotalMilliseconds} TotalMillisecond(s) to process{Environment.NewLine}{_CellInstanceConnectionName}{Environment.NewLine}<{_ReportFullPath}>");
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetParentParent(string value)
|
||||||
|
{
|
||||||
|
string result = Path.GetDirectoryName(Path.GetDirectoryName(value));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static List<string> GetDirectoryNames(string directory)
|
||||||
|
{
|
||||||
|
#nullable enable
|
||||||
|
List<string> results = new();
|
||||||
|
string? fileName;
|
||||||
|
string? checkDirectory = directory;
|
||||||
|
string? pathRoot = Path.GetPathRoot(directory);
|
||||||
|
string extension = Path.GetExtension(directory);
|
||||||
|
if (string.IsNullOrEmpty(pathRoot))
|
||||||
|
throw new NullReferenceException(nameof(pathRoot));
|
||||||
|
if (Directory.Exists(directory))
|
||||||
|
{
|
||||||
|
fileName = Path.GetFileName(directory);
|
||||||
|
if (!string.IsNullOrEmpty(fileName))
|
||||||
|
results.Add(fileName);
|
||||||
|
}
|
||||||
|
else if ((string.IsNullOrEmpty(extension) || extension.Length > 3) && !File.Exists(directory))
|
||||||
|
{
|
||||||
|
fileName = Path.GetFileName(directory);
|
||||||
|
if (!string.IsNullOrEmpty(fileName))
|
||||||
|
results.Add(fileName);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < int.MaxValue; i++)
|
||||||
|
{
|
||||||
|
checkDirectory = Path.GetDirectoryName(checkDirectory);
|
||||||
|
if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot)
|
||||||
|
break;
|
||||||
|
fileName = Path.GetFileName(checkDirectory);
|
||||||
|
if (string.IsNullOrEmpty(fileName))
|
||||||
|
continue;
|
||||||
|
results.Add(fileName);
|
||||||
|
}
|
||||||
|
results.Add(pathRoot);
|
||||||
|
results.Reverse();
|
||||||
|
return results;
|
||||||
|
#nullable disable
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetJobIdParentDirectory(string directory)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
if (!string.IsNullOrEmpty(Path.GetFileName(directory)))
|
||||||
|
result = Path.GetFullPath(GetParentParent(directory));
|
||||||
|
else
|
||||||
|
result = Path.GetFullPath(GetParentParent(Path.GetDirectoryName(directory)));
|
||||||
|
if (!Directory.Exists(result))
|
||||||
|
_ = Directory.CreateDirectory(result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
||||||
|
if (segments.Length <= 2)
|
||||||
|
result = segments[0];
|
||||||
|
else
|
||||||
|
result = string.Concat(segments[0], segments[2]);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal string[] GetInProcessDirectory(string jobIdDirectory)
|
||||||
|
{
|
||||||
|
List<string> results = new();
|
||||||
|
if (!_IsEAFHosted)
|
||||||
|
results = new string[] { jobIdDirectory }.ToList();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] files;
|
||||||
|
string[] directories;
|
||||||
|
string logisticsSequence;
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
logisticsSequence = (_Logistics.Sequence + -i).ToString();
|
||||||
|
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.Count == 1)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (results.Count != 1)
|
||||||
|
throw new Exception("Didn't find directory by logistics sequence");
|
||||||
|
return results.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static string[] GetMatches(FileConnectorConfiguration fileConnectorConfiguration)
|
||||||
|
{
|
||||||
|
string[] segments;
|
||||||
|
string[] results = null;
|
||||||
|
foreach (string subSourceFileFilter in fileConnectorConfiguration.SourceFileFilters)
|
||||||
|
{
|
||||||
|
segments = subSourceFileFilter.Split('\\');
|
||||||
|
if (fileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||||
|
results = Directory.GetFiles(fileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories);
|
||||||
|
else
|
||||||
|
results = Directory.GetFiles(fileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly);
|
||||||
|
if (results.Length != 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static void NestExistingFiles(FileConnectorConfiguration fileConnectorConfiguration)
|
||||||
|
{
|
||||||
|
// if (!fileConnectorConfiguration.IncludeSubDirectories.Value && fileConnectorConfiguration.TriggerOnCreated is not null && fileConnectorConfiguration.TriggerOnCreated.Value)
|
||||||
|
if (!fileConnectorConfiguration.IncludeSubDirectories.Value)
|
||||||
|
{
|
||||||
|
string[] matches = GetMatches(fileConnectorConfiguration);
|
||||||
|
if (matches is not null && matches.Length > 0)
|
||||||
|
{
|
||||||
|
string fileName;
|
||||||
|
string nestedDirectory = Path.Combine(fileConnectorConfiguration.SourceFileLocation, DateTime.Now.Ticks.ToString());
|
||||||
|
if (!Directory.Exists(nestedDirectory))
|
||||||
|
_ = Directory.CreateDirectory(nestedDirectory);
|
||||||
|
foreach (string match in matches)
|
||||||
|
{
|
||||||
|
fileName = Path.GetFileName(match);
|
||||||
|
File.Move(match, Path.Combine(nestedDirectory, fileName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
||||||
|
{
|
||||||
|
List<Properties.IDescription> results = new();
|
||||||
|
Duplicator.Description description;
|
||||||
|
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
||||||
|
foreach (JsonElement jsonElement in jsonElements)
|
||||||
|
{
|
||||||
|
if (jsonElement.ValueKind != JsonValueKind.Object)
|
||||||
|
throw new Exception();
|
||||||
|
description = JsonSerializer.Deserialize<Duplicator.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
||||||
|
results.Add(description);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix)
|
||||||
|
{
|
||||||
|
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) select l).ToArray();
|
||||||
|
if (results.Length == 0)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static ModelObjectParameterDefinition[] GetProperties(string cellInstanceConnectionName, IList<ModelObjectParameterDefinition> modelObjectParameters, string propertyNamePrefix, string propertyNameSuffix)
|
||||||
|
{
|
||||||
|
ModelObjectParameterDefinition[] results = (from l in modelObjectParameters where l.Name.StartsWith(propertyNamePrefix) && l.Name.EndsWith(propertyNameSuffix) select l).ToArray();
|
||||||
|
if (results.Length == 0)
|
||||||
|
throw new Exception(cellInstanceConnectionName);
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
protected void SetFileParameter(string key, string value)
|
protected void SetFileParameter(string key, string value)
|
||||||
{
|
{
|
||||||
if (_FileConnectorConfiguration is null || _FileConnectorConfiguration.TargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.TargetFileName.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileName.Contains(string.Concat("%", key, "%")))
|
if (_FileConnectorConfiguration is null || _FileConnectorConfiguration.TargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileLocation.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.TargetFileName.Contains(string.Concat("%", key, "%")) || _FileConnectorConfiguration.ErrorTargetFileName.Contains(string.Concat("%", key, "%")))
|
||||||
@ -389,47 +485,44 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetFileParameterLotIDToLogisticsMID(bool includeLogisticsSequence = true)
|
protected static void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
||||||
{
|
{
|
||||||
string key;
|
#pragma warning disable CA1510
|
||||||
if (!includeLogisticsSequence)
|
if (fileRead is null)
|
||||||
key = "LotID";
|
throw new ArgumentNullException(nameof(fileRead));
|
||||||
else
|
if (jsonElements is null)
|
||||||
key = "LotIDWithLogisticsSequence";
|
throw new ArgumentNullException(nameof(jsonElements));
|
||||||
string value = string.Concat(_Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
#pragma warning restore CA1510
|
||||||
SetFileParameter(key, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetFileParameterLotID(string value, bool includeLogisticsSequence = true)
|
protected void WaitForThread(Thread thread, List<Exception> threadExceptions)
|
||||||
{
|
{
|
||||||
string key;
|
if (thread is not null)
|
||||||
if (!includeLogisticsSequence)
|
|
||||||
key = "LotID";
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
key = "LotIDWithLogisticsSequence";
|
ThreadState threadState;
|
||||||
value = string.Concat(value, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
for (short i = 0; i < short.MaxValue; i++)
|
||||||
}
|
{
|
||||||
SetFileParameter(key, value);
|
if (thread is null)
|
||||||
}
|
break;
|
||||||
|
else
|
||||||
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
|
{
|
||||||
{
|
threadState = thread.ThreadState;
|
||||||
string directory;
|
if (threadState is not ThreadState.Running and not ThreadState.WaitSleepJoin)
|
||||||
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
|
break;
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Target", _CellInstanceName, _CellInstanceConnectionName);
|
}
|
||||||
else
|
Thread.Sleep(500);
|
||||||
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName);
|
}
|
||||||
if (!Directory.Exists(directory))
|
lock (threadExceptions)
|
||||||
_ = Directory.CreateDirectory(directory);
|
{
|
||||||
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
|
if (threadExceptions.Count != 0)
|
||||||
string lines = ProcessDataStandardFormat.GetPDSFText(fileRead, _Logistics, jsonElements, logisticsText: string.Empty);
|
{
|
||||||
File.WriteAllText(file, lines);
|
foreach (Exception item in threadExceptions)
|
||||||
if (_Logistics.TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
_Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace));
|
||||||
{
|
Exception exception = threadExceptions[0];
|
||||||
try
|
threadExceptions.Clear();
|
||||||
{ File.SetLastWriteTime(file, _Logistics.DateTimeFromSequence); }
|
throw exception;
|
||||||
catch (Exception) { }
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,80 +544,49 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs)
|
protected string[] Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||||
{
|
{
|
||||||
object value;
|
string[] results;
|
||||||
string description;
|
bool isErrorFile = exception is not null;
|
||||||
List<object[]> list;
|
if (!to.EndsWith(@"\"))
|
||||||
for (int i = 0; i < extractResults.Item3.Length; i++)
|
_ = string.Concat(to, @"\");
|
||||||
{
|
if (!isErrorFile)
|
||||||
_Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length));
|
results = Array.Empty<string>();
|
||||||
foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject())
|
|
||||||
{
|
|
||||||
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name))
|
|
||||||
description = string.Empty;
|
|
||||||
else
|
|
||||||
description = keyValuePairs[jsonProperty.Name].Split('|')[0];
|
|
||||||
if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name))
|
|
||||||
value = jsonProperty.Value.ToString();
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list = new List<object[]>();
|
|
||||||
for (int z = 0; z < extractResults.Item3.Length; z++)
|
|
||||||
list.Add(new object[] { z, extractResults.Item3[z].GetProperty(jsonProperty.Name).ToString() });
|
|
||||||
value = list;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_UseCyclicalForDescription)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Tuple<string, Test[], JsonElement[], List<FileInfo>> ReExtract(IFileRead fileRead, List<string> headerNames, Dictionary<string, string> keyValuePairs)
|
|
||||||
{
|
|
||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
|
||||||
if (!Directory.Exists(_FileConnectorConfiguration.SourceFileLocation))
|
|
||||||
results = null;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] segments;
|
results = new string[] { _Logistics.Sequence.ToString(), _Logistics.ReportFullPath, from, resolvedFileLocation, to, string.Empty, string.Empty, exception.Message, string.Empty, string.Empty, exception.StackTrace };
|
||||||
string[] matches = null;
|
if (!_IsDuplicator)
|
||||||
foreach (string subSourceFileFilter in _FileConnectorConfiguration.SourceFileFilters)
|
WriteAllLines(to, results);
|
||||||
|
}
|
||||||
|
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Count != 0)
|
||||||
|
{
|
||||||
|
string itemFile;
|
||||||
|
List<string> directories = new();
|
||||||
|
foreach (FileInfo sourceFile in extractResults.Item4)
|
||||||
{
|
{
|
||||||
segments = subSourceFileFilter.Split('\\');
|
if (sourceFile.FullName != _Logistics.ReportFullPath)
|
||||||
if (_FileConnectorConfiguration.IncludeSubDirectories.Value)
|
{
|
||||||
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories);
|
itemFile = sourceFile.FullName.Replace(from, to);
|
||||||
else
|
Shared1880(itemFile, directories, sourceFile, isErrorFile);
|
||||||
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly);
|
}
|
||||||
if (matches.Any())
|
else if (!isErrorFile && _Logistics is not null)
|
||||||
break;
|
Shared1811(to, sourceFile);
|
||||||
}
|
|
||||||
if (matches is null || !matches.Any())
|
|
||||||
results = null;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_ReportFullPath = matches[0];
|
|
||||||
results = fileRead.GetExtractResult(_ReportFullPath, _EventName);
|
|
||||||
if (!_IsEAFHosted)
|
|
||||||
TriggerEvents(results, headerNames, keyValuePairs);
|
|
||||||
}
|
}
|
||||||
|
Shared0231(directories);
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static List<Properties.IDescription> GetDuplicatorDescriptions(JsonElement[] jsonElements)
|
private void WriteAllLines(string to, string[] exceptionLines)
|
||||||
{
|
{
|
||||||
List<Properties.IDescription> results = new();
|
string fileName = string.Concat(to, @"\readme.txt");
|
||||||
Duplicator.Description description;
|
try
|
||||||
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
|
|
||||||
foreach (JsonElement jsonElement in jsonElements)
|
|
||||||
{
|
{
|
||||||
if (jsonElement.ValueKind != JsonValueKind.Object)
|
if (!Directory.Exists(to))
|
||||||
throw new Exception();
|
_ = Directory.CreateDirectory(to);
|
||||||
description = JsonSerializer.Deserialize<Duplicator.Description>(jsonElement.ToString(), jsonSerializerOptions);
|
File.WriteAllLines(fileName, exceptionLines);
|
||||||
results.Add(description);
|
|
||||||
}
|
}
|
||||||
return results;
|
catch (Exception ex) { _Log.Error(ex.Message); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
private void Shared1880(string itemFile, List<string> directories, FileInfo sourceFile, bool isErrorFile)
|
||||||
@ -556,6 +618,9 @@ public class FileRead : Properties.IFileRead
|
|||||||
case FileConnectorConfiguration.PostProcessingModeEnum.Delete:
|
case FileConnectorConfiguration.PostProcessingModeEnum.Delete:
|
||||||
File.Delete(sourceFile.FullName);
|
File.Delete(sourceFile.FullName);
|
||||||
break;
|
break;
|
||||||
|
case FileConnectorConfiguration.PostProcessingModeEnum.None:
|
||||||
|
File.Move(sourceFile.FullName, itemFile);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
@ -567,11 +632,12 @@ public class FileRead : Properties.IFileRead
|
|||||||
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
|
||||||
{
|
{
|
||||||
string directoryName = Path.GetFileName(to);
|
string directoryName = Path.GetFileName(to);
|
||||||
string jobIdDirectory = Path.GetDirectoryName(to);
|
string jobIdDirectory = GetJobIdDirectory(to);
|
||||||
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
DateTime dateTime = DateTime.Now.AddMinutes(-15);
|
||||||
|
string day = $"{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
||||||
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
|
string destinationDirectory = Path.Combine(jobIdDirectory, "_ Ignore 100 bytes", weekDirectory, day, directoryName);
|
||||||
if (!Directory.Exists(destinationDirectory))
|
if (!Directory.Exists(destinationDirectory))
|
||||||
_ = Directory.CreateDirectory(destinationDirectory);
|
_ = Directory.CreateDirectory(destinationDirectory);
|
||||||
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
|
||||||
@ -582,13 +648,13 @@ public class FileRead : Properties.IFileRead
|
|||||||
{
|
{
|
||||||
if (!checkDirectory.Contains('_'))
|
if (!checkDirectory.Contains('_'))
|
||||||
continue;
|
continue;
|
||||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
|
||||||
continue;
|
continue;
|
||||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
|
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
|
||||||
continue;
|
continue;
|
||||||
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any())
|
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
|
||||||
continue;
|
continue;
|
||||||
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any())
|
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
|
||||||
continue;
|
continue;
|
||||||
if (new DirectoryInfo(checkDirectory).CreationTime > dateTime)
|
if (new DirectoryInfo(checkDirectory).CreationTime > dateTime)
|
||||||
continue;
|
continue;
|
||||||
@ -596,6 +662,52 @@ public class FileRead : Properties.IFileRead
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception) { throw; }
|
catch (Exception) { throw; }
|
||||||
|
DeleteEmptyTopDirectories(jobIdDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetJobIdDirectory(string path)
|
||||||
|
{
|
||||||
|
string result;
|
||||||
|
List<string> directoryNames = GetDirectoryNames(path);
|
||||||
|
if (!directoryNames.Contains(_Logistics.JobID))
|
||||||
|
result = Path.GetDirectoryName(path);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = string.Empty;
|
||||||
|
foreach (string directoryName in directoryNames)
|
||||||
|
{
|
||||||
|
result = Path.Combine(result, directoryName);
|
||||||
|
if (directoryName == _Logistics.JobID)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void DeleteEmptyTopDirectories(string rootDirectory)
|
||||||
|
{
|
||||||
|
if (Directory.Exists(rootDirectory))
|
||||||
|
{
|
||||||
|
string[] files;
|
||||||
|
string[] directories;
|
||||||
|
string[] subDirectories = Directory.GetDirectories(rootDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string subDirectory in subDirectories)
|
||||||
|
{
|
||||||
|
files = Directory.GetFiles(subDirectory, "*", SearchOption.AllDirectories);
|
||||||
|
if (files.Length > 0)
|
||||||
|
continue;
|
||||||
|
directories = Directory.GetDirectories(subDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
|
if (directories.Length > 0)
|
||||||
|
continue;
|
||||||
|
try
|
||||||
|
{ Directory.Delete(subDirectory); }
|
||||||
|
catch (UnauthorizedAccessException)
|
||||||
|
{
|
||||||
|
new DirectoryInfo(subDirectory).Attributes = FileAttributes.Normal;
|
||||||
|
Directory.Delete(subDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,72 +717,87 @@ public class FileRead : Properties.IFileRead
|
|||||||
{
|
{
|
||||||
foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct())
|
foreach (string directory in (from l in directories orderby l.Split('\\').Length descending select l).Distinct())
|
||||||
{
|
{
|
||||||
if (Directory.Exists(directory) && !Directory.GetFiles(directory).Any())
|
if (Directory.Exists(directory) && Directory.GetFiles(directory).Length == 0)
|
||||||
Directory.Delete(directory);
|
Directory.Delete(directory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void WaitForFileConsumption<T>(DateTime dateTime, List<T> descriptions, bool isDummyRun, string successDirectory, string duplicateDirectory, List<(Properties.IScopeInfo, string)> collection, string duplicateFile) where T : Properties.IDescription
|
protected void SetFileParameterLotID(string value, bool includeLogisticsSequence = true)
|
||||||
{
|
{
|
||||||
if (!isDummyRun && _IsEAFHosted)
|
string key;
|
||||||
WaitForFileConsumption(_FileConnectorConfiguration.SourceDirectoryCloaking, _Logistics, dateTime, descriptions, successDirectory, duplicateDirectory, duplicateFile, collection);
|
if (!includeLogisticsSequence)
|
||||||
|
key = "LotID";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long breakAfter = DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
key = "LotIDWithLogisticsSequence";
|
||||||
for (short i = 0; i < short.MaxValue; i++)
|
value = string.Concat(value, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
||||||
|
}
|
||||||
|
SetFileParameter(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void SetFileParameterLotIDToLogisticsMID(bool includeLogisticsSequence = true)
|
||||||
|
{
|
||||||
|
string key;
|
||||||
|
if (!includeLogisticsSequence)
|
||||||
|
key = "LotID";
|
||||||
|
else
|
||||||
|
key = "LotIDWithLogisticsSequence";
|
||||||
|
string value = string.Concat(_Logistics.MID, "_", _Logistics.Sequence, "_", DateTime.Now.Ticks - _Logistics.Sequence);
|
||||||
|
SetFileParameter(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Tuple<string, Test[], JsonElement[], List<FileInfo>> ReExtract(IFileRead fileRead, List<string> headerNames, Dictionary<string, string> keyValuePairs)
|
||||||
|
{
|
||||||
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||||
|
if (!Directory.Exists(_FileConnectorConfiguration.SourceFileLocation))
|
||||||
|
results = null;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string[] matches = GetMatches(_FileConnectorConfiguration);
|
||||||
|
if (matches is null || matches.Length == 0)
|
||||||
|
results = null;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!_IsEAFHosted || DateTime.Now.Ticks > breakAfter)
|
_ReportFullPath = matches[0];
|
||||||
break;
|
results = fileRead.GetExtractResult(_ReportFullPath, _EventName);
|
||||||
Thread.Sleep(500);
|
if (!_IsEAFHosted)
|
||||||
|
TriggerEvents(results, headerNames, keyValuePairs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
internal static string GetJobIdParentDirectory(string directory)
|
|
||||||
{
|
|
||||||
string result;
|
|
||||||
if (!string.IsNullOrEmpty(Path.GetFileName(directory)))
|
|
||||||
result = Path.GetFullPath(GetParentParent(directory));
|
|
||||||
else
|
|
||||||
result = Path.GetFullPath(GetParentParent(Path.GetDirectoryName(directory)));
|
|
||||||
if (!Directory.Exists(result))
|
|
||||||
_ = Directory.CreateDirectory(result);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal string[] GetInProcessDirectory(string jobIdDirectory)
|
|
||||||
{
|
|
||||||
string[] results;
|
|
||||||
if (!_IsEAFHosted)
|
|
||||||
results = new string[] { jobIdDirectory };
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
|
||||||
results = Directory.GetDirectories(jobIdDirectory, string.Concat(_Logistics.MID, '*', logisticsSequence, '*'), SearchOption.TopDirectoryOnly);
|
|
||||||
}
|
|
||||||
if ((results is null) || results.Length != 1)
|
|
||||||
throw new Exception("Didn't find directory by logistics sequence");
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string GetFileNameAfterUnderscoreSplit(string reportFullPath)
|
protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs)
|
||||||
{
|
{
|
||||||
string result;
|
object value;
|
||||||
string[] segments = Path.GetFileNameWithoutExtension(reportFullPath).Split('_');
|
string segments;
|
||||||
if (segments.Length <= 2)
|
string description;
|
||||||
result = segments[0];
|
List<object[]> list;
|
||||||
else
|
for (int i = 0; i < extractResults.Item3.Length; i++)
|
||||||
result = string.Concat(segments[0], segments[2]);
|
{
|
||||||
return result;
|
_Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length));
|
||||||
}
|
foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject())
|
||||||
|
{
|
||||||
internal static string GetParentParent(string value)
|
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.TryGetValue(jsonProperty.Name, out segments))
|
||||||
{
|
description = string.Empty;
|
||||||
string result = Path.GetDirectoryName(Path.GetDirectoryName(value));
|
else
|
||||||
return result;
|
description = segments.Split('|')[0];
|
||||||
|
if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name))
|
||||||
|
value = jsonProperty.Value.ToString();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list = new List<object[]>();
|
||||||
|
for (int z = 0; z < extractResults.Item3.Length; z++)
|
||||||
|
list.Add(new object[] { z, extractResults.Item3[z].GetProperty(jsonProperty.Name).ToString() });
|
||||||
|
value = list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_UseCyclicalForDescription)
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2022-06-08 -> Shared - FileRead
|
// 2025-03-25 -> Shared - FileRead
|
||||||
@ -35,6 +35,9 @@ public class Logistics : ILogistics
|
|||||||
public long Sequence => _Sequence;
|
public long Sequence => _Sequence;
|
||||||
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||||
|
|
||||||
|
private static string DefaultMesEntity(DateTime dateTime) =>
|
||||||
|
string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||||
|
|
||||||
public Logistics(IFileRead fileRead)
|
public Logistics(IFileRead fileRead)
|
||||||
{
|
{
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
@ -84,14 +87,14 @@ public class Logistics : ILogistics
|
|||||||
_Logistics2 = new List<Logistics2>();
|
_Logistics2 = new List<Logistics2>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics(string reportFullPath, string logistics)
|
internal Logistics(string reportFullPath, ProcessDataStandardFormat processDataStandardFormat)
|
||||||
{
|
{
|
||||||
string key;
|
string key;
|
||||||
DateTime dateTime;
|
DateTime dateTime;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
_FileInfo = new(reportFullPath);
|
_FileInfo = new(reportFullPath);
|
||||||
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
_Logistics1 = processDataStandardFormat.Logistics.ToList();
|
||||||
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||||
{
|
{
|
||||||
_NullData = null;
|
_NullData = null;
|
||||||
_JobID = "null";
|
_JobID = "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)
|
internal void Update(string mid, string processJobID)
|
||||||
{
|
{
|
||||||
_MID = mid;
|
_MID = mid;
|
||||||
|
|||||||
@ -2,18 +2,29 @@
|
|||||||
|
|
||||||
public partial class WS
|
public partial class WS
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Attachment
|
public class Attachment
|
||||||
{
|
{
|
||||||
|
|
||||||
public string UniqueId { get; set; }
|
#nullable enable
|
||||||
public string DestinationFileName { get; set; }
|
|
||||||
public string SourceFileName { get; set; }
|
|
||||||
|
|
||||||
public Attachment(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)
|
||||||
{
|
{
|
||||||
UniqueId = uniqueId;
|
UniqueId = uniqueId;
|
||||||
DestinationFileName = destinationFileName;
|
|
||||||
SourceFileName = sourceFileName;
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Metrology;
|
namespace Adaptation.Shared.Metrology;
|
||||||
|
|
||||||
public partial class WS
|
public partial class WS
|
||||||
{
|
{
|
||||||
// this class represents the response from the Inbound API endpoint
|
|
||||||
public class Results
|
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
|
#nullable enable
|
||||||
public long HeaderID { get; set; }
|
|
||||||
|
|
||||||
// if false, this collection will contain a list of errors
|
[JsonConstructor]
|
||||||
public List<string> Errors { get; set; }
|
public Results(List<string>? errors,
|
||||||
|
long? headerId,
|
||||||
|
long? subgroupId,
|
||||||
|
bool? success,
|
||||||
|
List<string>? 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
|
[JsonPropertyName("errors")] public List<string>? Errors { get; set; }
|
||||||
public List<string> Warnings { 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<string>? 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<string> 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
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -10,9 +10,11 @@ namespace Adaptation.Shared.Metrology;
|
|||||||
public partial class WS
|
public partial class WS
|
||||||
{
|
{
|
||||||
|
|
||||||
public static (string, Results) SendData(string url, object payload, int timeoutSeconds = 120)
|
#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;
|
string resultsJson = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -30,85 +32,83 @@ public partial class WS
|
|||||||
};
|
};
|
||||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||||
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
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)
|
if (wsResults.Success is null || !wsResults.Success.Value)
|
||||||
results.Errors.Add(results.ToString());
|
wsResults.Errors?.Add(wsResults.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{ wsResults ??= Results.Get(resultsJson, e); }
|
||||||
Exception exception = e;
|
return new(resultsJson, wsResults);
|
||||||
StringBuilder stringBuilder = new();
|
|
||||||
while (exception is not null)
|
|
||||||
{
|
|
||||||
_ = stringBuilder.AppendLine(exception.Message);
|
|
||||||
exception = exception.InnerException;
|
|
||||||
}
|
|
||||||
results.Errors ??= new List<string>();
|
|
||||||
results.Errors.Add(resultsJson);
|
|
||||||
results.Errors.Add(stringBuilder.ToString());
|
|
||||||
}
|
|
||||||
return new(resultsJson, results);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this method is a wrapper for attaching a file to either a header or data record
|
public static void AttachFile(string url, Attachment attachment, int timeoutSeconds = 60)
|
||||||
// URL is the same URL used for SendData, ex: http://localhost/api/inbound/CDE
|
|
||||||
// attachToHeaderId is the ID returned by SendData
|
|
||||||
// attachToDataUniqueId is the string unique ID for the data record, aka the Title of the Sharepoint list entry
|
|
||||||
// fileContents is a byte array with the contents of the file
|
|
||||||
// fileName is which attachment this is, image.pdf, data.pdf, data.txt, header.pdf, etc
|
|
||||||
// timeoutSeconds is configured as the request timeout
|
|
||||||
// this method will either succeed or throw an exception
|
|
||||||
// also, this has been made synchronous
|
|
||||||
public static void AttachFile(string url, long attachToHeaderId, string attachToDataUniqueId, byte[] fileContents, string fileName, int timeoutSeconds = 60)
|
|
||||||
{
|
{
|
||||||
using HttpClient httpClient = new();
|
using HttpClient httpClient = new();
|
||||||
string requestUrl = url + "/attachment?headerid=" + attachToHeaderId.ToString();
|
string json = JsonSerializer.Serialize(attachment);
|
||||||
if (!string.IsNullOrWhiteSpace(attachToDataUniqueId))
|
|
||||||
{
|
|
||||||
requestUrl += "&datauniqueid=";
|
|
||||||
requestUrl += System.Net.WebUtility.UrlEncode(attachToDataUniqueId);
|
|
||||||
}
|
|
||||||
requestUrl += "&filename="; // this is just so the web server log shows the filename
|
|
||||||
requestUrl += System.Net.WebUtility.UrlEncode(fileName);
|
|
||||||
|
|
||||||
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
httpClient.Timeout = new TimeSpan(0, 0, 0, timeoutSeconds, 0);
|
||||||
|
StringContent httpContent = new(json, Encoding.UTF8, "application/json");
|
||||||
MultipartFormDataContent multipartFormDataContent = new();
|
HttpResponseMessage httpResponseMessage = httpClient.PostAsync($"{url}/attachment", httpContent).Result;
|
||||||
ByteArrayContent byteArrayContent = new(fileContents);
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
||||||
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
|
{
|
||||||
|
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||||
multipartFormDataContent.Add(byteArrayContent, "attachment", fileName);
|
throw new Exception($"Attachment failed: {resultBody}");
|
||||||
|
}
|
||||||
HttpResponseMessage httpResponseMessage = httpClient.PostAsync(requestUrl, multipartFormDataContent).Result;
|
|
||||||
|
|
||||||
if (httpResponseMessage.IsSuccessStatusCode)
|
|
||||||
return;
|
|
||||||
|
|
||||||
string resultBody = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
|
||||||
|
|
||||||
throw new Exception("Attachment failed: " + resultBody);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AttachFiles(string url, long headerID, List<Attachment> headerAttachments = null, List<Attachment> dataAttachments = null)
|
public static void AttachFiles(string url, List<Attachment>? headerAttachments = null, List<Attachment>? dataAttachments = null)
|
||||||
{
|
{
|
||||||
|
string directory;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
string? directoryName;
|
||||||
if (headerAttachments is not null)
|
if (headerAttachments is not null)
|
||||||
{
|
{
|
||||||
foreach (Attachment attachment in headerAttachments)
|
foreach (Attachment attachment in headerAttachments)
|
||||||
AttachFile(url, headerID, "", File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (dataAttachments is not null)
|
if (dataAttachments is not null)
|
||||||
{
|
{
|
||||||
foreach (Attachment attachment in dataAttachments)
|
foreach (Attachment attachment in dataAttachments)
|
||||||
AttachFile(url, headerID, attachment.UniqueId, File.ReadAllBytes(attachment.SourceFileName), attachment.DestinationFileName);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (headerAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in headerAttachments)
|
||||||
|
AttachFile(url, attachment);
|
||||||
|
}
|
||||||
|
if (dataAttachments is not null)
|
||||||
|
{
|
||||||
|
foreach (Attachment attachment in dataAttachments)
|
||||||
|
AttachFile(url, attachment);
|
||||||
}
|
}
|
||||||
//MessageBox.Show(r.ToString());
|
//MessageBox.Show(r.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Exception exception = e;
|
Exception? exception = e;
|
||||||
StringBuilder stringBuilder = new();
|
StringBuilder stringBuilder = new();
|
||||||
while (exception is not null)
|
while (exception is not null)
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
33
Adaptation/Shared/ProcessDataStandardFormatMapping.cs
Normal file
33
Adaptation/Shared/ProcessDataStandardFormatMapping.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Adaptation.Shared;
|
||||||
|
|
||||||
|
public class ProcessDataStandardFormatMapping
|
||||||
|
{
|
||||||
|
|
||||||
|
public ReadOnlyCollection<string> BackfillColumns { get; private set; }
|
||||||
|
public ReadOnlyCollection<int> ColumnIndices { get; private set; }
|
||||||
|
public ReadOnlyCollection<string> IgnoreColumns { get; private set; }
|
||||||
|
public ReadOnlyCollection<string> IndexOnlyColumns { get; private set; }
|
||||||
|
public ReadOnlyDictionary<string, string> KeyValuePairs { get; private set; }
|
||||||
|
public ReadOnlyCollection<string> NewColumnNames { get; private set; }
|
||||||
|
public ReadOnlyCollection<string> OldColumnNames { get; private set; }
|
||||||
|
|
||||||
|
public ProcessDataStandardFormatMapping(ReadOnlyCollection<string> backfillColumns,
|
||||||
|
ReadOnlyCollection<int> columnIndices,
|
||||||
|
ReadOnlyCollection<string> ignoreColumns,
|
||||||
|
ReadOnlyCollection<string> indexOnlyColumns,
|
||||||
|
ReadOnlyDictionary<string, string> keyValuePairs,
|
||||||
|
ReadOnlyCollection<string> newColumnNames,
|
||||||
|
ReadOnlyCollection<string> oldColumnNames)
|
||||||
|
{
|
||||||
|
BackfillColumns = backfillColumns;
|
||||||
|
ColumnIndices = columnIndices;
|
||||||
|
IgnoreColumns = ignoreColumns;
|
||||||
|
IndexOnlyColumns = indexOnlyColumns;
|
||||||
|
KeyValuePairs = keyValuePairs;
|
||||||
|
NewColumnNames = newColumnNames;
|
||||||
|
OldColumnNames = oldColumnNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -14,6 +14,7 @@ public enum Test
|
|||||||
CandelaPSL = 38,
|
CandelaPSL = 38,
|
||||||
CandelaVerify = 37,
|
CandelaVerify = 37,
|
||||||
CDE = 24,
|
CDE = 24,
|
||||||
|
Climatec = 54, //Largest
|
||||||
CV = 3,
|
CV = 3,
|
||||||
DailyRPMAverage = 19,
|
DailyRPMAverage = 19,
|
||||||
DailyRPMPLRatio = 20,
|
DailyRPMPLRatio = 20,
|
||||||
@ -21,7 +22,7 @@ public enum Test
|
|||||||
Denton = 9,
|
Denton = 9,
|
||||||
DiffusionLength = 45,
|
DiffusionLength = 45,
|
||||||
GRATXTCenter = 51,
|
GRATXTCenter = 51,
|
||||||
GRATXTEdge = 52, //Largest
|
GRATXTEdge = 52,
|
||||||
GrowthRateXML = 50,
|
GrowthRateXML = 50,
|
||||||
Hall = 10,
|
Hall = 10,
|
||||||
HgCV = 23,
|
HgCV = 23,
|
||||||
@ -38,6 +39,7 @@ public enum Test
|
|||||||
RPMPLRatio = 17,
|
RPMPLRatio = 17,
|
||||||
RPMXY = 15,
|
RPMXY = 15,
|
||||||
SP1 = 8,
|
SP1 = 8,
|
||||||
|
SRP2100 = 53,
|
||||||
Tencor = 7,
|
Tencor = 7,
|
||||||
UV = 35,
|
UV = 35,
|
||||||
VerificationLehighton = 14,
|
VerificationLehighton = 14,
|
||||||
|
|||||||
@ -0,0 +1,182 @@
|
|||||||
|
#if v2_59_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_59_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08ANLYSDIFAAST230(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__MoveMatchingFiles()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__IQSSi()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsight()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__APC()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__SPaCe()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Processed()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Archive()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400762024374000.zip";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -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 MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08ANLYSDIFAAST230(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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__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__MET08ANLYSDIFAAST230__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400762024374000.zip";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
#if v2_43_0
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
@ -45,7 +46,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting?.Dispose();
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -58,7 +59,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -71,7 +72,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -84,7 +85,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -97,7 +98,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -110,7 +111,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -123,7 +124,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -136,7 +137,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -149,7 +150,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -162,7 +163,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -176,3 +177,4 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
#if v2_47_5
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
@ -18,7 +19,7 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
internal static string DummyRoot { get; private set; }
|
internal static string DummyRoot { get; private set; }
|
||||||
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
{
|
{
|
||||||
@ -178,3 +179,4 @@ public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,162 @@
|
|||||||
|
#if v2_56_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_56_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08ANLYSDIFAAST230(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__MoveMatchingFiles()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__IQSSi()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsight()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__APC()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__SPaCe()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Processed()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Archive()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400762024374000.zip";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,182 @@
|
|||||||
|
#if v2_57_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_57_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230 : EAFLoggingUnitTesting
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
internal static string DummyRoot { get; private set; }
|
||||||
|
internal static MET08ANLYSDIFAAST230 EAFLoggingUnitTesting { get; private set; }
|
||||||
|
|
||||||
|
static MET08ANLYSDIFAAST230() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
if (EAFLoggingUnitTesting is null)
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MET08ANLYSDIFAAST230(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting ??= new MET08ANLYSDIFAAST230(testContext);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||||
|
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||||
|
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||||
|
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[ClassCleanup()]
|
||||||
|
public static void ClassCleanup()
|
||||||
|
{
|
||||||
|
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||||
|
EAFLoggingUnitTesting?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__MoveMatchingFiles()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__IQSSi()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsight()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__APC()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__SPaCe()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Processed()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Archive()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Dummy()
|
||||||
|
{
|
||||||
|
string check = "637400762024374000.zip";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
|
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||||
|
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
#if v2_59_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Production.v2_59_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_59_0.MET08ANLYSDIFAAST230 _MET08ANLYSDIFAAST230;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_59_0.MET08ANLYSDIFAAST230.ClassInitialize(testContext);
|
||||||
|
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Production.v2_59_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsight638149072810290000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__APC();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__SPaCe();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__Processed();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Archive638144101790470000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_59_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Production__v2_59_0__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
#if true
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
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 MET08ANLYSDIFAAST230
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Production.v2_60_0.MET08ANLYSDIFAAST230 _MET08ANLYSDIFAAST230;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Production.v2_60_0.MET08ANLYSDIFAAST230.ClassInitialize(testContext);
|
||||||
|
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Production.v2_60_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsight638149072810290000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__APC();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__SPaCe();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__Processed();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__Archive638144101790470000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Production__v2_60_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Production__v2_60_0__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
#if v2_43_0
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
@ -22,13 +23,13 @@ public class MET08ANLYSDIFAAST230
|
|||||||
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Staging.v2_43_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Staging.v2_43_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -43,19 +44,19 @@ public class MET08ANLYSDIFAAST230
|
|||||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -70,46 +71,47 @@ public class MET08ANLYSDIFAAST230
|
|||||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__APC();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__APC();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__SPaCe();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__SPaCe();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Processed();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Processed();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Archive();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
|
||||||
#if true
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Dummy();
|
public void Staging__v2_43_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_43_0__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
#if v2_47_5
|
||||||
using Adaptation._Tests.Shared;
|
using Adaptation._Tests.Shared;
|
||||||
using Adaptation.Shared;
|
using Adaptation.Shared;
|
||||||
using Adaptation.Shared.Methods;
|
using Adaptation.Shared.Methods;
|
||||||
@ -114,3 +115,4 @@ public class MET08ANLYSDIFAAST230
|
|||||||
public void Staging__v2_47_5__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_47_5__MET08ANLYSDIFAAST230__Dummy();
|
public void Staging__v2_47_5__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_47_5__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
#if v2_56_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Staging.v2_56_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Staging.v2_56_0.MET08ANLYSDIFAAST230 _MET08ANLYSDIFAAST230;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Staging.v2_56_0.MET08ANLYSDIFAAST230.ClassInitialize(testContext);
|
||||||
|
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Staging.v2_56_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsight638149072810290000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__APC();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__SPaCe();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__Processed();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Archive638144101790470000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Ignore]
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_56_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_56_0__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@ -0,0 +1,118 @@
|
|||||||
|
#if v2_57_0
|
||||||
|
using Adaptation._Tests.Shared;
|
||||||
|
using Adaptation.Shared;
|
||||||
|
using Adaptation.Shared.Methods;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
namespace Adaptation._Tests.Extract.Staging.v2_57_0;
|
||||||
|
|
||||||
|
[TestClass]
|
||||||
|
public class MET08ANLYSDIFAAST230
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable CA2254
|
||||||
|
#pragma warning disable IDE0060
|
||||||
|
|
||||||
|
private static CreateSelfDescription.Staging.v2_57_0.MET08ANLYSDIFAAST230 _MET08ANLYSDIFAAST230;
|
||||||
|
|
||||||
|
[ClassInitialize]
|
||||||
|
public static void ClassInitialize(TestContext testContext)
|
||||||
|
{
|
||||||
|
CreateSelfDescription.Staging.v2_57_0.MET08ANLYSDIFAAST230.ClassInitialize(testContext);
|
||||||
|
_MET08ANLYSDIFAAST230 = CreateSelfDescription.Staging.v2_57_0.MET08ANLYSDIFAAST230.EAFLoggingUnitTesting;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__MoveMatchingFiles() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__MoveMatchingFiles();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewer();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__IQSSi() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__IQSSi();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsight() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsight638149072810290000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsight();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__OpenInsightMetrologyViewerAttachments();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__APC() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__APC();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__SPaCe() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__SPaCe();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Processed() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__Processed();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Archive() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Archive638144101790470000__Normal()
|
||||||
|
{
|
||||||
|
string check = "*.pdsf";
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
_MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__Archive();
|
||||||
|
string[] variables = _MET08ANLYSDIFAAST230.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false);
|
||||||
|
IFileRead fileRead = _MET08ANLYSDIFAAST230.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||||
|
Logistics logistics = new(fileRead);
|
||||||
|
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
[Ignore]
|
||||||
|
#endif
|
||||||
|
[TestMethod]
|
||||||
|
public void Staging__v2_57_0__MET08ANLYSDIFAAST230__Dummy() => _MET08ANLYSDIFAAST230.Staging__v2_57_0__MET08ANLYSDIFAAST230__Dummy();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
@ -74,7 +73,7 @@ public class UnitTesting
|
|||||||
if (string.IsNullOrEmpty(result))
|
if (string.IsNullOrEmpty(result))
|
||||||
break;
|
break;
|
||||||
checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly);
|
checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly);
|
||||||
if (checkFiles.Any())
|
if (checkFiles.Length != 0)
|
||||||
break;
|
break;
|
||||||
result = Path.GetDirectoryName(result);
|
result = Path.GetDirectoryName(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,10 @@ using Adaptation._Tests.Shared;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@ -38,35 +40,65 @@ public class MET08ANLYSDIFAAST230 : LoggingUnitTesting, IDisposable
|
|||||||
LoggingUnitTesting?.Dispose();
|
LoggingUnitTesting?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestDateTime()
|
public void TestDateTime()
|
||||||
{
|
{
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging()
|
public void Production()
|
||||||
{
|
{
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("MET08ANLYSDIFAAST230", "v2.47.5"),
|
new("MET08ANLYSDIFAAST230", "v2.60.0"),
|
||||||
};
|
};
|
||||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||||
{
|
{
|
||||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||||
}
|
}
|
||||||
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||||
|
if (!Directory.Exists(sourceDirectory))
|
||||||
|
_ = Directory.CreateDirectory(sourceDirectory);
|
||||||
|
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||||
|
{
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||||
|
if (Directory.Exists(sourceDirectory))
|
||||||
|
{
|
||||||
|
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||||
|
if (!Directory.Exists(destinationDirectory))
|
||||||
|
_ = Directory.CreateDirectory(destinationDirectory);
|
||||||
|
List<string> lines = new();
|
||||||
|
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string file in files)
|
||||||
|
lines.AddRange(File.ReadAllLines(file));
|
||||||
|
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||||
|
}
|
||||||
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2,8 +2,10 @@ using Adaptation._Tests.Shared;
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@ -38,35 +40,65 @@ public class SECS : LoggingUnitTesting, IDisposable
|
|||||||
LoggingUnitTesting?.Dispose();
|
LoggingUnitTesting?.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void NonThrowTryCatch()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{ throw new Exception(); }
|
||||||
|
catch (Exception) { }
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestDateTime()
|
public void TestDateTime()
|
||||||
{
|
{
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
Assert.AreEqual(dateTime.ToString(), dateTime.ToString("M/d/yyyy h:mm:ss tt"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Staging()
|
public void Production()
|
||||||
{
|
{
|
||||||
MethodBase methodBase = new StackFrame().GetMethod();
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
StringBuilder results = new();
|
StringBuilder results = new();
|
||||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||||
{
|
{
|
||||||
new("SPV01", "v2.43.0"),
|
new("SPV01", "v2.20.1"),
|
||||||
};
|
};
|
||||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2";
|
||||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||||
{
|
{
|
||||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{production}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||||
}
|
}
|
||||||
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||||
|
if (!Directory.Exists(sourceDirectory))
|
||||||
|
_ = Directory.CreateDirectory(sourceDirectory);
|
||||||
|
File.WriteAllText(Path.Combine(sourceDirectory, $"{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv"), results.ToString());
|
||||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void CellInstanceVersionEdaConnectionPortNumber()
|
||||||
|
{
|
||||||
|
MethodBase methodBase = new StackFrame().GetMethod();
|
||||||
|
string sourceDirectory = "D:/Tmp/cellInstanceVersion.EdaConnection.PortNumber";
|
||||||
|
if (Directory.Exists(sourceDirectory))
|
||||||
|
{
|
||||||
|
string destinationDirectory = Path.Combine(sourceDirectory, "All");
|
||||||
|
if (!Directory.Exists(destinationDirectory))
|
||||||
|
_ = Directory.CreateDirectory(destinationDirectory);
|
||||||
|
List<string> lines = new();
|
||||||
|
string[] files = Directory.GetFiles(sourceDirectory, "*.tsv", SearchOption.TopDirectoryOnly);
|
||||||
|
foreach (string file in files)
|
||||||
|
lines.AddRange(File.ReadAllLines(file));
|
||||||
|
File.WriteAllLines(Path.Combine(destinationDirectory, $"{DateTime.Now.Ticks}.tsv"), lines.Distinct().OrderBy(l => l));
|
||||||
|
}
|
||||||
|
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||||
|
NonThrowTryCatch();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "i",
|
"Letter": "i",
|
||||||
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
||||||
"User": "INFINEON\\MESGaNEAF",
|
"User": "INFINEON\\MESGaNEAF",
|
||||||
@ -115,14 +115,14 @@
|
|||||||
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "s",
|
"Letter": "s",
|
||||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
||||||
"User": "EC\\ECMESEAF",
|
"User": "EC\\ECMESEAF",
|
||||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "t",
|
"Letter": "t",
|
||||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
||||||
"User": "EC\\ECEDASvc",
|
"User": "EC\\ECEDASvc",
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "i",
|
"Letter": "i",
|
||||||
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
"Share": "\\\\messdv002.na.infineon.com\\Candela",
|
||||||
"User": "INFINEON\\MESGaNEAF",
|
"User": "INFINEON\\MESGaNEAF",
|
||||||
@ -115,14 +115,14 @@
|
|||||||
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
"Password": "rzXkXdHKetDfsukhZKW0yA=="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "s",
|
"Letter": "s",
|
||||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
|
||||||
"User": "EC\\ECMESEAF",
|
"User": "EC\\ECMESEAF",
|
||||||
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Use": true,
|
"Use": false,
|
||||||
"Letter": "t",
|
"Letter": "t",
|
||||||
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
|
||||||
"User": "EC\\ECEDASvc",
|
"User": "EC\\ECEDASvc",
|
||||||
|
|||||||
@ -1,14 +1,8 @@
|
|||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||||
"nuget-clear": "dotnet nuget locals all --clear",
|
"kanbn.board": "kanbn board",
|
||||||
"build": "dotnet build --runtime win-x64 --self-contained",
|
"kanbn.board.json": "kanbn board -j > .kanbn/board.json",
|
||||||
"build-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
|
|
||||||
"build-nuget-And-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/",
|
|
||||||
"build-All-Sources": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/ --source https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json --source http://192.168.0.73:5002/v3/index.json",
|
|
||||||
"dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn",
|
|
||||||
"MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../MET08ANLYSDIFAAST230.csproj",
|
|
||||||
"pull": "git pull",
|
|
||||||
"garbage-collect": "git gc",
|
"garbage-collect": "git gc",
|
||||||
"AT-CreateSelfDescription.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AT-CreateSelfDescription.Staging.v2_43_0-MET08ANLYSDIFAAST230": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~MET08ANLYSDIFAAST230\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
"AX-CreateSelfDescription.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
"AX-CreateSelfDescription.Staging.v2_43_0-SPV01_EQPT": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0 & ClassName~SPV01_EQPT\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
private FilePathGenerator _FilePathGeneratorForTarget;
|
private FilePathGenerator _FilePathGeneratorForTarget;
|
||||||
private readonly List<EquipmentParameter> _EquipmentParameters;
|
private readonly List<EquipmentParameter> _EquipmentParameters;
|
||||||
private static readonly Dictionary<string, List<long>> _DummyRuns;
|
private static readonly Dictionary<string, List<long>> _DummyRuns;
|
||||||
private static readonly Dictionary<long, List<string>> _StaticRuns;
|
private static readonly Dictionary<long, List<Adaptation.Shared.Metrology.WS.Results>> _StaticRuns;
|
||||||
|
|
||||||
static FileRead()
|
static FileRead()
|
||||||
{
|
{
|
||||||
@ -165,7 +165,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType);
|
Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType);
|
||||||
}
|
}
|
||||||
if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind))
|
if (!parameterTypeDefinitions.ContainsKey(jsonProperty.Value.ValueKind))
|
||||||
throw new Exception(string.Concat('{', jsonProperty.Value.ValueKind, "} is not mapped!"));
|
throw new Exception(string.Concat('<', jsonProperty.Name, "> {", jsonProperty.Value.ValueKind, "} is not mapped!"));
|
||||||
}
|
}
|
||||||
foreach (JsonProperty jsonProperty in jsonProperties)
|
foreach (JsonProperty jsonProperty in jsonProperties)
|
||||||
{
|
{
|
||||||
@ -197,7 +197,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
|
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
|
||||||
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
|
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
|
||||||
IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters);
|
IList<ModelObjectParameterDefinition> modelObjectParameters = Mapper.Map(ConfiguredParameters);
|
||||||
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: true);
|
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null);
|
||||||
if (_FileRead.IsEvent)
|
if (_FileRead.IsEvent)
|
||||||
AddParameterRangeAndEvent();
|
AddParameterRangeAndEvent();
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
|
|||||||
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
|
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions);
|
IList<ModelObjectParameterDefinition> modelObjectParameters = JsonSerializer.Deserialize<IList<ModelObjectParameterDefinition>>(modelObjectParameterDefinitionJsonElement.ToString(), jsonSerializerOptions);
|
||||||
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, isEAFHosted: false);
|
_FileRead = CellInstanceConnectionName.Get(this, FileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, _DummyRuns, _StaticRuns, _UseCyclicalForDescription, connectionCount: null);
|
||||||
results = _FileRead.ReExtract();
|
results = _FileRead.ReExtract();
|
||||||
if (results?.Item2 is null)
|
if (results?.Item2 is null)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
|
|||||||
@ -48,6 +48,12 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.8' ">
|
||||||
|
<DefineConstants>NETFRAMEWORK;NET20;NET35;NET40;NET45;NET451;NET452;NET46;NET461;NET462;NET47;NET471;NET472;NET48;$(DefineConstants)</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<RuntimeHostConfigurationOption Include="AssemblyName" Value="MET08ANLYSDIFAAST230" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@ -107,6 +113,7 @@
|
|||||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FromIQS.cs" />
|
<Compile Include="Adaptation\FileHandlers\OpenInsight\FromIQS.cs" />
|
||||||
|
<Compile Include="Adaptation\FileHandlers\OpenInsight\Root.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
<Compile Include="Adaptation\FileHandlers\Processed\FileRead.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\SECS\Description.cs" />
|
<Compile Include="Adaptation\FileHandlers\SECS\Description.cs" />
|
||||||
<Compile Include="Adaptation\FileHandlers\SECS\ProcessData.cs" />
|
<Compile Include="Adaptation\FileHandlers\SECS\ProcessData.cs" />
|
||||||
@ -143,6 +150,7 @@
|
|||||||
<Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" />
|
<Compile Include="Adaptation\Shared\Metrology\WS.Results.cs" />
|
||||||
<Compile Include="Adaptation\Shared\ParameterType.cs" />
|
<Compile Include="Adaptation\Shared\ParameterType.cs" />
|
||||||
<Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" />
|
<Compile Include="Adaptation\Shared\ProcessDataStandardFormat.cs" />
|
||||||
|
<Compile Include="Adaptation\Shared\ProcessDataStandardFormatMapping.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Properties\IDescription.cs" />
|
<Compile Include="Adaptation\Shared\Properties\IDescription.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Properties\IFileRead.cs" />
|
<Compile Include="Adaptation\Shared\Properties\IFileRead.cs" />
|
||||||
<Compile Include="Adaptation\Shared\Properties\ILogistics.cs" />
|
<Compile Include="Adaptation\Shared\Properties\ILogistics.cs" />
|
||||||
@ -158,10 +166,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Infineon.EAF.Runtime">
|
<PackageReference Include="Infineon.EAF.Runtime">
|
||||||
<Version>2.47.0</Version>
|
<Version>2.60.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.Json">
|
<PackageReference Include="System.Text.Json">
|
||||||
<Version>6.0.3</Version>
|
<Version>8.0.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
|||||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2.47.5.0")]
|
[assembly: AssemblyVersion("2.60.0.0")]
|
||||||
[assembly: AssemblyFileVersion("2.47.5.0")]
|
[assembly: AssemblyFileVersion("2.60.0.0")]
|
||||||
|
|||||||
Reference in New Issue
Block a user