diff --git a/.gitignore b/.gitignore
index eab1f67..56d8c06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -331,10 +331,15 @@ ASALocalRun/
##
## Visual Studio Code
##
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
+**/.vscode/*
+!**/.vscode/extensions.json
+!**/.vscode/format-report.json
+!**/.vscode/launch.json
+!**/.vscode/settings.json
+!**/.vscode/tasks.json
+!**/.vscode/mklink.md
*.lnk
+
+.kanbn
+Adaptation/.kanbn
diff --git a/.groovy b/.groovy
deleted file mode 100644
index dd33f0d..0000000
--- a/.groovy
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env groovy
-/* groovylint-disable CompileStatic, ConsecutiveStringConcatenation, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, NestedBlockDepth, NoDef, VariableTypeRequired */
-import groovy.transform.Field
-
-@Field String _DDrive = 'D:/'
-@Field String _AssemblyName = '...'
-@Field String _TargetLocation = '...'
-@Field String _GitCommitSeven = '...'
-@Field String _GitName = 'DEP08SIASM'
-@Field String _TestProjectDirectory = 'Adaptation'
-@Field String _AgentStaging = 'mestsa07ec-ecmeseaf'
-@Field String _DDriveNet = "${_DDrive}Framework4.8"
-@Field String _AgentProduction = 'messa08ec-ecmeseaf'
-@Field String _AgentDevelopment = 'mestsa003-mesedasvc'
-@Field String _ProgramFilesDotnet = 'C:/Program Files/dotnet/dotnet.exe'
-@Field String _ProgramFilesMSBuild = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe'
-
-pipeline {
- agent {
- label env.JENKINS_ENVIRONMENT == 'Development' ? _AgentDevelopment : env.JENKINS_ENVIRONMENT == 'Staging' ? _AgentStaging : env.JENKINS_ENVIRONMENT == 'Production' ? _AgentProduction : 'Else'
- }
- parameters {
- string(name: 'GIT_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'mestsa003.infineon.com' : 'mestsa07ec.ec.local', description: 'git server')
- string(name: 'DEFAULT_FILE_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'messv02ecc1_ec_local' : 'messv02ecc1.ec.local', description: 'Default file server...')
- }
- stages {
- stage('Git') {
- steps {
- bat(returnStatus: true, script: 'git init')
- bat(returnStatus: true, script: 'git remote add origin \\\\' + params.GIT_SERVER + '\\Git\\' + _GitName + '.git')
- bat(returnStatus: true, script: 'git pull origin master')
- }
- }
- stage('Setup') {
- steps {
- script {
- _AssemblyName = "${env.JOB_NAME}"
- _GitCommitSeven = '1234567'
- // _GitCommitSeven = env.GIT_COMMIT.substring(0, 7)
- def files = findFiles(glob: '*.csproj')
- if (files.length != 1) {
- error("Build failed because couldn't find a *.csproj file")
- }
- echo """
- ${files[0].name}
- ${files[0].path}
- ${files[0].directory}
- ${files[0].length}
- ${files[0].lastModified}
- """
- _AssemblyName = files[0].name.split('[.]csproj')[0]
- _TargetLocation = "\\\\${params.DEFAULT_FILE_SERVER}\\EC_EAFRepository\\${env.JENKINS_ENVIRONMENT}\\DeploymentStorage\\Adaptation_${_AssemblyName}"
- }
- }
- }
- stage('Info') {
- steps {
- echo "_AssemblyName ${_AssemblyName}" // ...
- echo "BUILD_NUMBER ${env.BUILD_NUMBER}" // 11
- echo "DEFAULT_FILE_SERVER ${params.DEFAULT_FILE_SERVER}" // 11
- echo "GIT_BRANCH ${env.GIT_BRANCH}" // origin/master
- echo "GIT_COMMIT ${env.GIT_COMMIT}" // 73b814069f2cf0173a62a8228815a9bc9ba93c41
- echo "GIT_SERVER ${params.GIT_SERVER}" // ...
- echo "GIT_URL ${env.GIT_URL}" // D:\ProgramData\Git\....git
- echo "JENKINS_ENVIRONMENT ${env.JENKINS_ENVIRONMENT}" // 11
- echo "JENKINS_URL ${env.JENKINS_URL}" // http://localhost:8080/
- echo "JOB_NAME ${env.JOB_NAME}" // ...
- echo "WORKSPACE ${env.WORKSPACE}" // D:\.jenkins\_\...
- }
- }
- // stage('Restore') {
- // steps {
- // bat(returnStatus: true, script: 'dotnet --info')
- // }
- // }
- stage('Safe storage of app secrets') {
- steps {
- dir(_TestProjectDirectory) {
- bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
- 'user-secrets init')
- bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
- 'user-secrets set "BuildNumber" "' + env.BUILD_NUMBER + '"')
- bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
- 'user-secrets set "GitCommitSeven" "' + _GitCommitSeven + '"')
- bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
- 'user-secrets set "Server" "' + params.DEFAULT_FILE_SERVER + '"')
- }
- }
- }
- stage('Core Build') {
- steps {
- echo "Build number is ${currentBuild.number}"
- dir(_TestProjectDirectory) {
- bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
- 'build --runtime win-x64 --self-contained --verbosity quiet')
- }
- }
- }
- // stage('Test') {
- // options {
- // timeout(time: 10, unit: 'MINUTES')
- // }
- // steps {
- // dir(_TestProjectDirectory) {
- // bat('dotnet --info')
- // }
- // }
- // }
- stage('Framework Build') {
- steps {
- echo "Build number is ${currentBuild.number}"
- bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
- '/target:Restore ' +
- '/detailedsummary ' +
- '/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
- '/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
- _AssemblyName + '.csproj')
- bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
- '/target:Build ' +
- '/detailedsummary ' +
- '/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
- '/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
- _AssemblyName + '.csproj')
- }
- }
- stage('Commit Id') {
- steps {
- dir('bin/Debug') {
- writeFile file: "${_AssemblyName}.txt", text: "${env.GIT_COMMIT}-${env.BUILD_NUMBER}-${env.GIT_URL}"
- }
- }
- }
- stage('Package') {
- steps {
- fileOperations([fileZipOperation(folderPath: 'bin/Debug', outputFolderPath: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug")])
- fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*", renameFiles: false, sourceCaptureExpression: '', targetLocation: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug", targetNameExpression: '')])
- }
- }
- // stage('Force Fail') {
- // steps {
- // error("Build failed because of this and that..")
- // }
- // }
- stage('Copy Files to: file-share') {
- steps {
- dir('bin/Debug') {
- fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.txt", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
- fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.dll", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
- fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.exe", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
- fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.pdb", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
- }
- }
- }
- }
- post {
- always {
- dir('bin') {
- deleteDir()
- }
- dir('obj') {
- deleteDir()
- }
- dir(_TestProjectDirectory + '/bin') {
- deleteDir()
- }
- dir(_TestProjectDirectory + '/obj') {
- deleteDir()
- }
- // cleanWs()
- }
- }
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..71cf24f
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,55 @@
+{
+ "files.eol": "\n",
+ "[markdown]": {
+ "editor.wordWrap": "off"
+ },
+ "cSpell.words": [
+ "PDSF",
+ "Syncthing"
+ ],
+ "files.exclude": {
+ "**/node_modules": true
+ },
+ "files.watcherExclude": {
+ "**/node_modules": true
+ },
+ "foam.files.ignore": [
+ ".foam/**/*",
+ ".stfolder/**/*",
+ "**/_layouts/**/*",
+ "**/_site/**/*",
+ "**/.vscode/**/*",
+ "**/node_modules/**/*"
+ ],
+ "kanbn.showBurndownButton": false,
+ "kanbn.showSprintButton": false,
+ "foam.links.hover.enable": false,
+ "foam.placeholders.exclude": [
+ ".kanbn/Archive/**/*"
+ ],
+ "foam.orphans.exclude": [
+ ".journal/**/*"
+ ],
+ "foam.graph.style": {
+ "background": "#202020",
+ "node": {
+ "wired": "green",
+ "wireless": "orange",
+ "person": "white",
+ "topic": "#bc2a3c",
+ "kanbn": "#ff7b00",
+ "basic-note": "#773b93",
+ "daily-note": "#ff9d00",
+ "note": "#f2cb1d",
+ "placeholder": "#ff9d00",
+ "tag": "#0494c1",
+ "bug": "#bc2a3c",
+ "epic": "#ff7b00",
+ "feature": "#773b93",
+ "issue": "#ff9d00",
+ "task": "#f2cb1d",
+ "test-case": "#ff9d00",
+ "user-story": "#0494c1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Adaptation/.config/dotnet-tools.json b/Adaptation/.config/dotnet-tools.json
new file mode 100644
index 0000000..cd368e1
--- /dev/null
+++ b/Adaptation/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-reportgenerator-globaltool": {
+ "version": "5.1.15",
+ "commands": [
+ "reportgenerator"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Adaptation/.editorconfig b/Adaptation/.editorconfig
index 2220133..69ecc38 100644
--- a/Adaptation/.editorconfig
+++ b/Adaptation/.editorconfig
@@ -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]
csharp_indent_block_contents = true
csharp_indent_braces = false
@@ -76,14 +92,36 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
dotnet_code_quality.CAXXXX.api_surface = private, internal
+dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
+dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
+dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
+dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
+dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
+dotnet_diagnostic.CA1861.severity = none # CA1861: Prefer 'static readonly' fields over constant array arguments
+dotnet_diagnostic.CA1862.severity = none # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
+dotnet_diagnostic.CA1864.severity = none # CA1864: To avoid double lookup, call 'TryAdd' instead of calling 'Add' with a 'ContainsKey' guard
+dotnet_diagnostic.CA1866.severity = none # CA1866: Use 'string.EndsWith(char)' instead of 'string.EndsWith(string)' when you have a string with a single char
+dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
+dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
+dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
+dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified
+dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
+dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter
+dotnet_diagnostic.IDE0200.severity = warning # IDE0200: Lambda expression can be removed
+dotnet_diagnostic.IDE0270.severity = none # IDE0270: Null check can be simplified
+dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
+dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified
+dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified
+dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
+dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
@@ -215,7 +253,7 @@ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
dotnet_style_predefined_type_for_locals_parameters_members = true
-dotnet_style_predefined_type_for_member_access = true
+dotnet_style_predefined_type_for_member_access = true:warning
dotnet_style_prefer_auto_properties = true:warning
dotnet_style_prefer_compound_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = false
diff --git a/Adaptation/.vscode/launch.json b/Adaptation/.vscode/launch.json
index 8962180..ff26980 100644
--- a/Adaptation/.vscode/launch.json
+++ b/Adaptation/.vscode/launch.json
@@ -4,7 +4,7 @@
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
- "processId": 20908
+ "processId": 8084
}
]
}
diff --git a/Adaptation/.vscode/mklink.md b/Adaptation/.vscode/mklink.md
new file mode 100644
index 0000000..5803c6e
--- /dev/null
+++ b/Adaptation/.vscode/mklink.md
@@ -0,0 +1,5 @@
+# mklink
+
+```bash
+mklink /J "T:\DEP08SIHTRPLC\06_SourceCode\DEP08SIHTRPLC\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\DEP08SIHTRPLC"
+```
diff --git a/Adaptation/.vscode/settings.json b/Adaptation/.vscode/settings.json
index 4d1a803..ea870fc 100644
--- a/Adaptation/.vscode/settings.json
+++ b/Adaptation/.vscode/settings.json
@@ -1,4 +1,7 @@
{
+ "[markdown]": {
+ "editor.wordWrap": "off"
+ },
"cSpell.words": [
"Analyte",
"CICN",
@@ -52,6 +55,7 @@
"XRDXRR",
"XRDXY"
],
+ "coverage-gutters.coverageBaseDir": "../../../../DEP08SIASM/05_TestResults/TestResults/**",
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#7ea1d9",
"activityBar.activeBorder": "#f8e6ed",
diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json
new file mode 100644
index 0000000..2323d41
--- /dev/null
+++ b/Adaptation/.vscode/tasks.json
@@ -0,0 +1,104 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "Build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "Test-Debug",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "test",
+ "-c",
+ "Debug"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "Test-Release",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "test",
+ "-c",
+ "Release"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "Format",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "format",
+ "--report",
+ ".vscode",
+ "--verbosity",
+ "detailed",
+ "--severity",
+ "warn"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "Nuget Clear",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "nuget",
+ "locals",
+ "all",
+ "--clear"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "MSBuild for EAF Deployment Packages",
+ "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
+ "type": "process",
+ "args": [
+ "/target:Build",
+ "/restore:True",
+ "/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://tfs.intra.infineon.com/tfs/FactoryIntegration/_packaging/EAF%40Local/nuget/v3/index.json%3Bhttps://api.nuget.org/v3/index.json",
+ "/detailedsummary",
+ "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
+ "/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
+ "../DEP08SIASM.csproj"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "File-Folder-Helper AOT s M .Kanbn Tasks",
+ "type": "shell",
+ "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation -s T:/DEP08SIASM/06_SourceCode/DEP08SIASM/Adaptation/.kanbn/tasks",
+ "problemMatcher": []
+ },
+ {
+ "label": "Kanbn Console",
+ "type": "npm",
+ "script": "kanbn.board",
+ "problemMatcher": []
+ },
+ {
+ "label": "Kanbn Write Boad",
+ "type": "shell",
+ "command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md",
+ "problemMatcher": []
+ },
+ {
+ "label": "Kanbn Write json",
+ "type": "npm",
+ "script": "kanbn.board.json",
+ "problemMatcher": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Adaptation/DEP08SIASM-Development.yml b/Adaptation/DEP08SIASM-Development.yml
new file mode 100644
index 0000000..4d6a3b4
--- /dev/null
+++ b/Adaptation/DEP08SIASM-Development.yml
@@ -0,0 +1 @@
+ECHO is on.
diff --git a/Adaptation/DEP08SIASM.Tests.csproj b/Adaptation/DEP08SIASM.Tests.csproj
index 73eacbf..4f84b25 100644
--- a/Adaptation/DEP08SIASM.Tests.csproj
+++ b/Adaptation/DEP08SIASM.Tests.csproj
@@ -8,10 +8,9 @@
disable
false
- 10.0
disable
win-x64
- net6.0
+ net8.0
trx
@@ -33,49 +32,11 @@
Linux
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
- NU1701
- NU1701
- NU1701
-
-
- NU1701
+
+
NU1701
NU1701
NU1701
@@ -83,6 +44,41 @@
NU1701
NU1701
NU1701
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NU1701
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NU1701
+
+
+ NU1701
+ NU1701
+ NU1701
diff --git a/Adaptation/DEP08SIASM.yml b/Adaptation/DEP08SIASM.yml
new file mode 100644
index 0000000..4d6a3b4
--- /dev/null
+++ b/Adaptation/DEP08SIASM.yml
@@ -0,0 +1 @@
+ECHO is on.
diff --git a/Adaptation/FileHandlers/CellInstanceConnectionName.cs b/Adaptation/FileHandlers/CellInstanceConnectionName.cs
index f4dbcb5..f020ba1 100644
--- a/Adaptation/FileHandlers/CellInstanceConnectionName.cs
+++ b/Adaptation/FileHandlers/CellInstanceConnectionName.cs
@@ -9,14 +9,14 @@ namespace Adaptation.FileHandlers;
public class CellInstanceConnectionName
{
- internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
+ internal static IFileRead Get(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, int? connectionCount)
{
IFileRead result = cellInstanceConnectionName switch
{
- nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
- nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
- nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
- nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
+ nameof(DownloadJpegFile) => new DownloadJpegFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
+ nameof(jpeg) => new jpeg.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
+ nameof(MonitorApplication) => new MonitorApplication.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
+ nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
};
return result;
diff --git a/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs b/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs
index d60dca1..b8608c1 100644
--- a/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs
+++ b/Adaptation/FileHandlers/DownloadJpegFile/FileRead.cs
@@ -20,8 +20,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _FFmpegFileName;
private readonly string _StaticFileServer;
- public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
- base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
+ public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
+ base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
_NullData = string.Empty;
@@ -111,14 +111,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
- private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime)
- {
- if (reportFullPath is null)
- { }
- if (dateTime == DateTime.MinValue)
- { }
- throw new Exception(string.Concat("See ", nameof(Callback)));
- }
+ private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback)));
private void DownloadJpegFileSynchronously()
{
diff --git a/Adaptation/FileHandlers/MonitorApplication/FileRead.cs b/Adaptation/FileHandlers/MonitorApplication/FileRead.cs
index 0ba797a..2965f4d 100644
--- a/Adaptation/FileHandlers/MonitorApplication/FileRead.cs
+++ b/Adaptation/FileHandlers/MonitorApplication/FileRead.cs
@@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _MonitorApplicationSite;
private readonly string _MonitorApplicationResource;
- public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
- base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
+ public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
+ base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
_NullData = string.Empty;
@@ -110,9 +110,10 @@ public class FileRead : Shared.FileRead, IFileRead
}
private void SendData(DateTime dateTime, List descriptions)
+#pragma warning restore IDE0060
{
if (dateTime == DateTime.MinValue)
- { }
+ throw new Exception();
MonIn monIn = MonIn.GetInstance();
int value = int.TryParse(descriptions[0].Lot, out int check) ? check : 0;
string performanceName = string.Concat(_MonitorApplicationResource, "_", _Logistics.MesEntity);
diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs
index 6ffe427..deacbf8 100644
--- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs
+++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs
@@ -19,8 +19,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly string _MemoryPath;
private readonly HttpClient _HttpClient;
- public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
- base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
+ public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
+ base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
_NullData = string.Empty;
@@ -113,9 +113,10 @@ public class FileRead : Shared.FileRead, IFileRead
}
private void SendData(DateTime dateTime, List descriptions)
+#pragma warning restore IDE0060
{
if (dateTime == DateTime.MinValue)
- { }
+ throw new Exception();
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string logisticsSequenceMemoryDirectory = Path.Combine(_MemoryPath, _EquipmentType, "Source", weekDirectory, _Logistics.Sequence.ToString());
diff --git a/Adaptation/FileHandlers/jpeg/Description.cs b/Adaptation/FileHandlers/jpeg/Description.cs
index 9b1046b..ec1ef04 100644
--- a/Adaptation/FileHandlers/jpeg/Description.cs
+++ b/Adaptation/FileHandlers/jpeg/Description.cs
@@ -35,6 +35,8 @@ public class Description : IDescription, Shared.Properties.IDescription
public int TotalDelta { get; set; }
public string ClosestMatchFileName { get; set; }
+ public string RDS { get; set; }
+
string IDescription.GetEventDescription() => "File Has been read and parsed";
List IDescription.GetNames(IFileRead fileRead, Logistics logistics)
@@ -136,7 +138,7 @@ public class Description : IDescription, Shared.Properties.IDescription
{
List results = new();
- if (iProcessData is null || !iProcessData.Details.Any() || iProcessData is not ProcessData processData)
+ if (iProcessData is null || iProcessData.Details.Count == 0 || iProcessData is not ProcessData processData)
results.Add(GetDefault(fileRead, logistics));
else
{
@@ -222,4 +224,6 @@ public class Description : IDescription, Shared.Properties.IDescription
return result;
}
+ internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
+
}
\ No newline at end of file
diff --git a/Adaptation/FileHandlers/jpeg/FileRead.cs b/Adaptation/FileHandlers/jpeg/FileRead.cs
index 1d6b35a..937801d 100644
--- a/Adaptation/FileHandlers/jpeg/FileRead.cs
+++ b/Adaptation/FileHandlers/jpeg/FileRead.cs
@@ -15,6 +15,7 @@ namespace Adaptation.FileHandlers.jpeg;
public class FileRead : Shared.FileRead, IFileRead
{
+ private long? _TickOffset;
protected long _LastChange;
protected string _LastText;
protected readonly int _EndX;
@@ -29,8 +30,8 @@ public class FileRead : Shared.FileRead, IFileRead
protected readonly Dictionary _Reactors;
protected readonly List> _ColorCollections;
- public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
- base(new Description(), true, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
+ public FileRead(ISMTP smtp, Dictionary fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList modelObjectParameters, string equipmentDictionaryName, Dictionary> dummyRuns, Dictionary> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
+ base(new Description(), true, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 36790;
_NullData = string.Empty;
@@ -157,7 +158,8 @@ public class FileRead : Shared.FileRead, IFileRead
private Tuple> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple> results = new(string.Empty, null, null, new List());
- _Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
+ _TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
+ _Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
SetFileParameterLotIDToLogisticsMID();
if (_Logistics.FileInfo.Length < _MinFileLength)
results.Item4.Add(_Logistics.FileInfo);
@@ -174,7 +176,7 @@ public class FileRead : Shared.FileRead, IFileRead
SetFileParameterLotID(mid);
string processJobID = iProcessData.GetCurrentReactor(this, _Logistics, _Reactors);
_Logistics.Update(mid, processJobID);
- if (!iProcessData.Details.Any())
+ if (iProcessData.Details.Count == 0)
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
if (processData.Text == _LastText && _LastChange > DateTime.Now.AddMinutes(-30).Ticks)
File.Delete(reportFullPath);
diff --git a/Adaptation/FileHandlers/jpeg/ProcessData.cs b/Adaptation/FileHandlers/jpeg/ProcessData.cs
index 700293e..b6f7b8e 100644
--- a/Adaptation/FileHandlers/jpeg/ProcessData.cs
+++ b/Adaptation/FileHandlers/jpeg/ProcessData.cs
@@ -7,8 +7,10 @@ using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
+using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
+using Tesseract;
namespace Adaptation.FileHandlers.jpeg;
@@ -32,8 +34,6 @@ public class ProcessData : IProcessData
public ProcessData(IFileRead fileRead, Logistics logistics, List fileInfoCollection, int startX, int startY, int endX, int endY, int offSetX, int offSetY, Size size, List> colorCollections)
{
- if (logistics is null)
- { }
JobID = logistics.JobID;
fileInfoCollection.Clear();
_Details = new List