Nuget bump

net6.0 to net7.0
Infineon.EAF.Runtime 2.49.0
MesEntity Placeholder
Not Tested
connectionCount
AssemblyVersion
SRP2100 = 53, //Largest
nuget server name
v2.49.2
IDescription.GetDescriptions with body
Viewer support
tasks.json
kanbn initialize
WSRequest alignment
Back to x64
mesfs.infineon.com
Infineon.EAF.Runtime 2.49.3
pool name
Kanban
net8.0
v2_52_0-Tests
editorconfig
yml ec fix
yml explicit contents
dotnet_diagnostic
CA1862 and GetWeekOfYear for WritePDSF
gitignore
cellInstanceVersion.EdaConnection.PortNumber
Delete 2.52.3
Added Climatec to Test.cs
GetJobIdDirectory
Remove and
5-Other-Small
This commit is contained in:
Mike Phares 2023-03-22 10:47:09 -07:00
parent 5e87407ead
commit c36b7f41b9
29 changed files with 637 additions and 174 deletions

15
.gitignore vendored
View File

@ -331,11 +331,14 @@ ASALocalRun/
##
## Visual Studio Code
##
*/!.vscode/extensions.json
*/!.vscode/launch.json
*/!.vscode/settings.json
*/!.vscode/tasks.json
*/.vscode/*
*/.vscode/ReportGenerator/*
**/.vscode/*
!**/.vscode/extensions.json
!**/.vscode/format-report.json
!**/.vscode/launch.json
!**/.vscode/settings.json
!**/.vscode/tasks.json
!**/.vscode/mklink.md
*.lnk
.kanbn

11
.vscode/mklink.md vendored Normal file
View File

@ -0,0 +1,11 @@
---
type: "note"
created: "2023-10-20T03:52:57.401Z"
updated: "2023-10-20T03:53:49.161Z"
---
# mklink
```bash
mklink /J "L:\Workspaces\33_CS29_79_72\MIT_EAF_Adaptations\Trunk\DEP08SIHTRPLC\06_SourceCode\DEP08SIHTRPLC\.kanbn" "D:\5-Other-Small\Kanban\DEP08SIHTRPLC"
```

55
.vscode/settings.json vendored Normal file
View 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"
}
}
}

View File

@ -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
@ -77,18 +93,35 @@ 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.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.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

View File

@ -1,4 +1,7 @@
{
"[markdown]": {
"editor.wordWrap": "off"
},
"cSpell.words": [
"Analyte",
"CICN",

82
Adaptation/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,82 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"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://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%3Bhttps://localhost/v3/index.json",
"/detailedsummary",
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
"../DEP08SIHTRPLC.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:/DEP08SIHTRPLC/06_SourceCode/DEP08SIHTRPLC/Adaptation -s T:/DEP08SIHTRPLC/06_SourceCode/DEP08SIHTRPLC/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": []
}
]
}

View File

@ -12,7 +12,7 @@ pool:
steps:
- script: |
set coreVersion=net6.0
set coreVersion=net7.0
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
@ -22,11 +22,11 @@ steps:
set configuration=Debug
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo ($Configuration)
echo $(Configuration)
displayName: Configuration
- script: |
set nugetSource=https://messa017.infineon.com/v3/index.json
set nugetSource=https://eaf-dev-reporting.mes.infineon.com/v3/index.json
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
@ -97,7 +97,15 @@ steps:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"
@ -125,18 +133,18 @@ steps:
- task: CopyFiles@2
displayName: 'Copy Files to: D:\Framework4.8'
inputs:
SourceFolder: 'bin\$(Configuration)'
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
enabled: false
- task: CopyFiles@2
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
displayName: 'Copy Files to: \\mesfs.infineon.com\EC_EAFRepository'
inputs:
SourceFolder: 'bin\$(Configuration)'
Contents: "*$(Build.Repository.Name)*"
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
SourceFolder: 'bin\$(Configuration)'
TargetFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
enabled: false

View File

@ -8,10 +8,9 @@
<PropertyGroup>
<ImplicitUsings>disable</ImplicitUsings>
<IsPackable>false</IsPackable>
<LangVersion>10.0</LangVersion>
<Nullable>disable</Nullable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<VSTestLogger>trx</VSTestLogger>
@ -33,8 +32,8 @@
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0" />
<PackageReference Include="FFMpegCore" Version="5.0.2" />
<PackageReference Include="coverlet.collector" Version="6.0.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.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -43,32 +42,32 @@
<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="Instances" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="8.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="RoboSharp" Version="1.2.8" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
<PackageReference Include="System.Data.OleDb" Version="7.0.0" />
<PackageReference Include="RoboSharp" Version="1.3.5" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.Data.OleDb" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="Tesseract" Version="5.2.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
<PackageReference Include="Tibco.Rendezvous.DotNetCore" Version="8.5.0" />
<PackageReference Include="Infineon.Yoda.DotNetCore" Version="5.4.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>

View File

@ -12,7 +12,7 @@ pool:
steps:
- script: |
set coreVersion=net6.0
set coreVersion=net7.0
echo %coreVersion%
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
echo $(CoreVersion)
@ -22,11 +22,11 @@ steps:
set configuration=Release
echo %configuration%
echo ##vso[task.setvariable variable=Configuration;]%configuration%
echo ($Configuration)
echo $(Configuration)
displayName: Configuration
- script: |
set nugetSource=https://messa08ec.ec.local/v3/index.json
set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json
echo %nugetSource%
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
echo $(NugetSource)
@ -97,7 +97,15 @@ steps:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: PublishTestResults@2
displayName: "Publish Test Results */coverage.cobertura.xml"
inputs:
testResultsFormat: VSTest
testResultsFiles: "*/coverage.cobertura.xml"
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
displayName: "Create work item"
@ -125,17 +133,17 @@ steps:
- task: CopyFiles@2
displayName: 'Copy Files to: D:\Framework4.8'
inputs:
SourceFolder: 'bin\$(Configuration)'
Contents: "*$(Build.Repository.Name)*"
SourceFolder: 'bin\$(Configuration)'
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
OverWrite: true
- task: CopyFiles@2
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
displayName: 'Copy Files to: \\mesfs.infineon.com\EC_EAFRepository'
inputs:
SourceFolder: 'bin\$(Configuration)'
Contents: "*$(Build.Repository.Name)*"
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
SourceFolder: 'bin\$(Configuration)'
TargetFolder: '\\mesfs.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
OverWrite: true
- script: |

View File

@ -9,11 +9,11 @@ namespace Adaptation.FileHandlers;
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<string>> staticRuns, bool useCyclicalForDescription, int? connectionCount)
{
IFileRead result = cellInstanceConnectionName switch
{
nameof(ZipFilesByDate) => new ZipFilesByDate.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
nameof(ZipFilesByDate) => new ZipFilesByDate.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;

View File

@ -21,8 +21,8 @@ public class FileRead : Shared.FileRead, IFileRead
private readonly Timer _Timer;
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) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, 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<string>> 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;
@ -117,14 +117,7 @@ public class FileRead : Shared.FileRead, IFileRead
return results;
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
if (reportFullPath is null)
{ }
if (dateTime == DateTime.MinValue)
{ }
throw new Exception(string.Concat("See ", nameof(Callback)));
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback)));
private static bool DeleteEmptyDirectories(string rootDirectory)
{

View File

@ -18,21 +18,12 @@ public class MonIn : IMonIn, IDisposable
public static MonIn GetInstance(string url = "http://moninhttp.{0}.infineon.com/input/text")
{
MonIn instance;
if (_Instances.ContainsKey(url))
lock (_Instances)
{
instance = _Instances[url];
}
else
{
lock (_Instances)
if (_Instances.TryGetValue(url, out instance))
{
if (!_Instances.ContainsKey(url))
{
instance = new MonIn(url);
_Instances.Add(url, instance);
}
else
instance = _Instances[url];
instance = new MonIn(url);
_Instances.Add(url, instance);
}
}
return instance;

View File

@ -110,6 +110,42 @@ public class Description : IDescription, Properties.IDescription
List<IDescription> IDescription.GetDescriptions(IFileRead fileRead, Logistics logistics, List<Test> tests, IProcessData iProcessData)
{
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;
}

View File

@ -63,7 +63,7 @@ public class FileRead : Properties.IFileRead
string Properties.IFileRead.CellInstanceConnectionName => _CellInstanceConnectionName;
string Properties.IFileRead.ParameterizedModelObjectDefinitionType => _ParameterizedModelObjectDefinitionType;
public FileRead(IDescription description, bool isEvent, ISMTP smtp, Dictionary<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(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<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted)
{
_SMTP = smtp;
_IsEvent = isEvent;
@ -106,7 +106,7 @@ public class FileRead : Properties.IFileRead
throw new Exception(cellInstanceConnectionName);
if (string.IsNullOrEmpty(equipmentDictionaryName) && isEvent)
throw new Exception(cellInstanceConnectionName);
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
if (!string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent && connectionCount > 1)
throw new Exception(cellInstanceConnectionName);
// if (string.IsNullOrEmpty(equipmentDictionaryName) && !isEvent)
// throw new Exception(cellInstanceConnectionName);
@ -163,7 +163,7 @@ public class FileRead : Properties.IFileRead
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())
if (results.Length == 0)
throw new Exception(cellInstanceConnectionName);
return results;
}
@ -171,7 +171,7 @@ public class FileRead : Properties.IFileRead
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())
if (results.Length == 0)
throw new Exception(cellInstanceConnectionName);
return results;
}
@ -203,7 +203,7 @@ public class FileRead : Properties.IFileRead
}
lock (threadExceptions)
{
if (threadExceptions.Any())
if (threadExceptions.Count != 0)
{
foreach (Exception item in threadExceptions)
_Log.Error(string.Concat(item.Message, Environment.NewLine, Environment.NewLine, item.StackTrace));
@ -241,7 +241,7 @@ public class FileRead : Properties.IFileRead
if (!_IsDuplicator)
WriteAllLines(to, results);
}
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Any())
if (extractResults is not null && extractResults.Item4 is not null && extractResults.Item4.Count != 0)
{
string itemFile;
List<string> directories = new();
@ -260,19 +260,21 @@ public class FileRead : Properties.IFileRead
return results;
}
protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory) where T : Properties.IDescription
protected static string GetTupleFile<T>(Logistics logistics, List<T> descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription
{
string result;
string rds;
string fileName;
string dateValue;
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;
else
rds = descriptions[0].RDS;
string[] segments = scopeInfo.FileName.Split(new string[] { "DateTime:" }, StringSplitOptions.RemoveEmptyEntries);
if (segments.Length == 0)
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds));
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileNameWithoutExtension.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity));
else
{
segments = segments[1].Split('%');
@ -284,7 +286,11 @@ public class FileRead : Properties.IFileRead
continue;
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('%'))
throw new Exception("Placeholder exists!");
@ -306,7 +312,7 @@ public class FileRead : Properties.IFileRead
preWait = dateTime.AddMilliseconds(1234).Ticks;
else
preWait = dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
if (!collection.Any())
if (collection.Count == 0)
duplicateFiles.Add(duplicateFile);
string fileName = Path.GetFileNameWithoutExtension(logistics.ReportFullPath);
string successFile = string.Concat(successDirectory, @"\", Path.GetFileName(logistics.ReportFullPath));
@ -317,7 +323,7 @@ public class FileRead : Properties.IFileRead
else if (!scopeInfo.FileName.Contains('%'))
tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc");
else
tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory);
tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile);
tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0];
duplicateFiles.Add(tupleFile);
if (_IsEAFHosted)
@ -416,10 +422,12 @@ public class FileRead : Properties.IFileRead
protected void WritePDSF(IFileRead fileRead, JsonElement[] jsonElements)
{
string directory;
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
if (!_CellInstanceConnectionName.StartsWith(_CellInstanceName) && _CellInstanceConnectionNameBase == _EquipmentType)
directory = Path.Combine(_TracePath, _EquipmentType, "Target", _CellInstanceName, _CellInstanceConnectionName);
directory = Path.Combine(_TracePath, _EquipmentType, "Target", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
else
directory = Path.Combine(_TracePath, _EquipmentType, "Source", _CellInstanceName, _CellInstanceConnectionName);
directory = Path.Combine(_TracePath, _EquipmentType, "Source", weekDirectory, _CellInstanceName, _CellInstanceConnectionName);
if (!Directory.Exists(directory))
_ = Directory.CreateDirectory(directory);
string file = Path.Combine(directory, string.Concat(_Logistics.MesEntity, "_", _Logistics.Sequence, ".ipdsf"));
@ -454,6 +462,7 @@ public class FileRead : Properties.IFileRead
protected void TriggerEvents(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, List<string> headerNames, Dictionary<string, string> keyValuePairs)
{
object value;
string segments;
string description;
List<object[]> list;
for (int i = 0; i < extractResults.Item3.Length; i++)
@ -461,10 +470,10 @@ public class FileRead : Properties.IFileRead
_Log.Debug(string.Concat("TriggerEvent - {", _Logistics.ReportFullPath, "} ", i, " of ", extractResults.Item3.Length));
foreach (JsonProperty jsonProperty in extractResults.Item3[i].EnumerateObject())
{
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.ContainsKey(jsonProperty.Name))
if (jsonProperty.Value.ValueKind != JsonValueKind.String || !keyValuePairs.TryGetValue(jsonProperty.Name, out segments))
description = string.Empty;
else
description = keyValuePairs[jsonProperty.Name].Split('|')[0];
description = segments.Split('|')[0];
if (!_UseCyclicalForDescription || headerNames.Contains(jsonProperty.Name))
value = jsonProperty.Value.ToString();
else
@ -496,10 +505,10 @@ public class FileRead : Properties.IFileRead
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.AllDirectories);
else
matches = Directory.GetFiles(_FileConnectorConfiguration.SourceFileLocation, segments.Last(), SearchOption.TopDirectoryOnly);
if (matches.Any())
if (matches.Length != 0)
break;
}
if (matches is null || !matches.Any())
if (matches is null || matches.Length == 0)
results = null;
else
{
@ -562,16 +571,99 @@ public class FileRead : Properties.IFileRead
}
}
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
}
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);
}
}
}
}
private void Shared1811(string to, FileInfo sourceFile)
{
if (!_IsDuplicator && _FileConnectorConfiguration.SourceFileFilter != "*" && sourceFile.Exists && sourceFile.Length < _MinFileLength)
{
string directoryName = Path.GetFileName(to);
string jobIdDirectory = Path.GetDirectoryName(to);
string jobIdDirectory = GetJobIdDirectory(to);
DateTime dateTime = DateTime.Now.AddMinutes(-15);
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
string destinationDirectory = string.Concat(jobIdDirectory, @"\_ Ignore 100 bytes\", weekDirectory, @"\", directoryName);
string destinationDirectory = Path.Combine(jobIdDirectory, "_ Ignore 100 bytes", weekDirectory, directoryName);
if (!Directory.Exists(destinationDirectory))
_ = Directory.CreateDirectory(destinationDirectory);
File.Move(sourceFile.FullName, string.Concat(destinationDirectory, @"\", sourceFile.Name));
@ -582,13 +674,13 @@ public class FileRead : Properties.IFileRead
{
if (!checkDirectory.Contains('_'))
continue;
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
continue;
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Any())
if (Directory.GetFiles(checkDirectory, "*", SearchOption.TopDirectoryOnly).Length != 0)
continue;
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Any())
if (Directory.GetDirectories(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
continue;
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Any())
if (Directory.GetFiles(checkDirectory, "*", SearchOption.AllDirectories).Length != 0)
continue;
if (new DirectoryInfo(checkDirectory).CreationTime > dateTime)
continue;
@ -596,6 +688,7 @@ public class FileRead : Properties.IFileRead
}
}
catch (Exception) { throw; }
DeleteEmptyTopDirectories(jobIdDirectory);
}
}
@ -605,7 +698,7 @@ public class FileRead : Properties.IFileRead
{
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);
}
}

View File

@ -91,7 +91,7 @@ public class Logistics : ILogistics
string[] segments;
_FileInfo = new(reportFullPath);
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
if (Logistics1.Count == 0 || !Logistics1[0].StartsWith("LOGISTICS_1"))
{
_NullData = null;
_JobID = "null";

View File

@ -23,7 +23,7 @@ public class ProcessDataStandardFormat
public static string GetPDSFText(IFileRead fileRead, Logistics logistics, JsonElement[] jsonElements, string logisticsText)
{
string result;
if (!jsonElements.Any())
if (jsonElements.Length == 0)
result = string.Empty;
else
{
@ -146,7 +146,7 @@ public class ProcessDataStandardFormat
string logistics = pdsf.Item1;
string[] columns = pdsf.Item2;
string[] bodyLines = pdsf.Item3;
if (!bodyLines.Any() || !bodyLines[0].Contains('\t'))
if (bodyLines.Length == 0 || !bodyLines[0].Contains('\t'))
results = JsonSerializer.Deserialize<JsonElement[]>("[]");
else
{
@ -211,9 +211,10 @@ public class ProcessDataStandardFormat
public static Tuple<string, Dictionary<Test, Dictionary<string, List<string>>>> GetTestDictionary(Tuple<string, string[], string[]> pdsf)
{
Dictionary<Test, Dictionary<string, List<string>>> results = new();
List<string> collection;
string testColumn = nameof(Test);
Dictionary<string, List<string>> keyValuePairs = GetDictionary(pdsf);
if (!keyValuePairs.ContainsKey(testColumn))
if (!keyValuePairs.TryGetValue(testColumn, out collection))
throw new Exception();
int min;
int max;
@ -221,9 +222,9 @@ public class ProcessDataStandardFormat
List<string> vs;
string columnKey;
Dictionary<Test, List<int>> tests = new();
for (int i = 0; i < keyValuePairs[testColumn].Count; i++)
for (int i = 0; i < collection.Count; i++)
{
if (Enum.TryParse(keyValuePairs[testColumn][i], out Test test))
if (Enum.TryParse(collection[i], out Test test))
{
if (!results.ContainsKey(test))
{
@ -325,7 +326,7 @@ public class ProcessDataStandardFormat
_ = line.Append(';');
}
}
if (!pairedParameterNames.Any())
if (pairedParameterNames.Count == 0)
{
_ = line.Remove(line.Length - 1, 1);
_ = result.AppendLine(line.ToString());

View File

@ -14,6 +14,7 @@ public enum Test
CandelaPSL = 38,
CandelaVerify = 37,
CDE = 24,
Climatec = 54, //Largest
CV = 3,
DailyRPMAverage = 19,
DailyRPMPLRatio = 20,
@ -21,7 +22,7 @@ public enum Test
Denton = 9,
DiffusionLength = 45,
GRATXTCenter = 51,
GRATXTEdge = 52, //Largest
GRATXTEdge = 52,
GrowthRateXML = 50,
Hall = 10,
HgCV = 23,
@ -38,6 +39,7 @@ public enum Test
RPMPLRatio = 17,
RPMXY = 15,
SP1 = 8,
SRP2100 = 53,
Tencor = 7,
UV = 35,
VerificationLehighton = 14,

View File

@ -0,0 +1,61 @@
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_52_0;
[TestClass]
public class DEP08SIHTRPLC : EAFLoggingUnitTesting
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
internal static string DummyRoot { get; private set; }
internal static DEP08SIHTRPLC EAFLoggingUnitTesting { get; private set; }
public DEP08SIHTRPLC() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
if (EAFLoggingUnitTesting is null)
throw new Exception();
}
public DEP08SIHTRPLC(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
{
}
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
EAFLoggingUnitTesting ??= new DEP08SIHTRPLC(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 true
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__DEP08SIHTRPLC__ZipFilesByDate()
{
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"));
}
}

View File

@ -0,0 +1,27 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Adaptation._Tests.Extract.Staging.v2_52_0;
[TestClass]
public class DEP08SIHTRPLC
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Staging.v2_52_0.DEP08SIHTRPLC _DEP08SIHTRPLC;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Staging.v2_52_0.DEP08SIHTRPLC.ClassInitialize(testContext);
_DEP08SIHTRPLC = CreateSelfDescription.Staging.v2_52_0.DEP08SIHTRPLC.EAFLoggingUnitTesting;
}
#if true
[Ignore]
#endif
[TestMethod]
public void Staging__v2_52_0__DEP08SIHTRPLC__ZipFilesByDate() => _DEP08SIHTRPLC.Staging__v2_52_0__DEP08SIHTRPLC__ZipFilesByDate();
}

View File

@ -305,7 +305,7 @@ public class AdaptationTesting : ISMTP
else
{
results = Directory.GetFiles(mbn.TextFileDirectory, "*.txt", SearchOption.TopDirectoryOnly);
if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && !results.Any())
if (!string.IsNullOrEmpty(mbn.Ticks) && _HasWaitForProperty && results.Length == 0)
{
_ = Process.Start("explorer.exe", mbn.TextFileDirectory);
File.WriteAllText(Path.Combine(mbn.TextFileDirectory, "_ Why.why"), string.Empty);
@ -373,9 +373,7 @@ public class AdaptationTesting : ISMTP
Tuple<string, CellInstanceVersion> result;
CellInstanceVersion cellInstanceVersion;
string cellInstanceServiceV2 = string.Concat("http://", _HostNameAndPort, "/CellInstanceServiceV2/", cellInstanceName, "/", cellInstanceVersionName, "/configuration");
if (_CellInstanceVersions.ContainsKey(cellInstanceServiceV2))
cellInstanceVersion = _CellInstanceVersions[cellInstanceServiceV2];
else
if (!_CellInstanceVersions.TryGetValue(cellInstanceServiceV2, out cellInstanceVersion))
{
cellInstanceVersion = GetCellInstanceVersion(cellInstanceServiceV2);
_CellInstanceVersions.Add(cellInstanceServiceV2, cellInstanceVersion);
@ -401,7 +399,7 @@ public class AdaptationTesting : ISMTP
}
}
}
if (!results.Any() || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName)))
if (results.Count == 0 || (!string.IsNullOrEmpty(cellInstanceConnectionName) && !results.ContainsKey(cellInstanceConnectionName)))
throw new Exception("Match not found (check test method name matches Mango)!");
return results;
}
@ -413,9 +411,8 @@ public class AdaptationTesting : ISMTP
result = componentModelComponentsIndexes.ElementAt(0).Value;
else
{
if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.ContainsKey(cellInstanceConnectionName))
if (componentModelComponentsIndexes is null || !componentModelComponentsIndexes.TryGetValue(cellInstanceConnectionName, out result))
throw new Exception();
result = componentModelComponentsIndexes[cellInstanceConnectionName];
}
return result;
}
@ -487,7 +484,7 @@ public class AdaptationTesting : ISMTP
else if (i == 1)
_ = stringBuilder.
AppendLine().
Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\messv02ecc1.ec.local\\EC_Characterization_Si\\Dummy\";").
Append("static ").Append(cellInstanceNameWithoutHyphen).AppendLine("() => DummyRoot = @\"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Dummy\";").
AppendLine().
Append("public ").Append(cellInstanceNameWithoutHyphen).AppendLine("() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)").
AppendLine("{").
@ -596,7 +593,7 @@ public class AdaptationTesting : ISMTP
throw new Exception();
_ = stringBuilder.Clear();
}
if (componentsCellComponentCellComponentEquipmentDictionaryNames.Any() && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy))
if (componentsCellComponentCellComponentEquipmentDictionaryNames.Count != 0 && string.IsNullOrEmpty(cellInstanceVersion.FrozenBy))
{
if (!cellInstanceVersion.CellCommunicatingRule.EndsWith(".Communicating") || !(from l in componentsCellComponentCellComponentEquipmentNames where l == cellInstanceVersion.CellCommunicatingRule.Split('.')[0] select true).Any())
throw new Exception($"{methodName} - CellCommunicatingRule not correct in Mango!");
@ -648,9 +645,7 @@ public class AdaptationTesting : ISMTP
Tuple<string, FileConnectorConfiguration> result;
FileConnectorConfiguration fileConnectorConfiguration;
string cellInstanceServiceV2With = string.Concat(cellInstanceVersionTuple.Item1, '/', cellInstanceConnectionName);
if (_FileConnectorConfigurations.ContainsKey(cellInstanceServiceV2With))
fileConnectorConfiguration = _FileConnectorConfigurations[cellInstanceServiceV2With];
else
if (!_FileConnectorConfigurations.TryGetValue(cellInstanceServiceV2With, out fileConnectorConfiguration))
{
Dictionary<string, int[]> componentModelComponentsIndexes = GetComponentModelComponentsIndexes(cellInstanceVersionTuple.Item2, cellInstanceConnectionName);
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
@ -696,9 +691,7 @@ public class AdaptationTesting : ISMTP
int[] cellInstanceConnectionNameIndexes = GetCellInstanceConnectionNameIndexes(cellInstanceConnectionName, componentModelComponentsIndexes);
ComponentsCellComponentCellComponent componentsCellComponentCellComponent = cellInstanceVersion.ComponentModel.Components[cellInstanceConnectionNameIndexes[0]].Children[cellInstanceConnectionNameIndexes[1]];
string equipmentTypeServiceV2 = string.Concat("http://", _HostNameAndPort, "/EquipmentTypeServiceV2/", componentsCellComponentCellComponent.Equipment.EquipmentType.Name, "/", componentsCellComponentCellComponent.Equipment.EquipmentType.Version, "/configuration");
if (_EquipmentTypeVersions.ContainsKey(equipmentTypeServiceV2))
equipmentTypeVersion = _EquipmentTypeVersions[equipmentTypeServiceV2];
else
if (!_EquipmentTypeVersions.TryGetValue(equipmentTypeServiceV2, out equipmentTypeVersion))
{
equipmentTypeVersion = GetEquipmentTypeVersion(equipmentTypeServiceV2);
_EquipmentTypeVersions.Add(equipmentTypeServiceV2, equipmentTypeVersion);
@ -763,7 +756,7 @@ public class AdaptationTesting : ISMTP
string[] results;
string equipmentDictionaryName;
string equipmentDictionaryVersionName;
if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || !equipmentTypeVersion.EventActionSequences.Any() || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any())
if (_SkipEquipmentDictionary || equipmentTypeVersion?.EventActionSequences is null || equipmentTypeVersion.EventActionSequences.Length == 0 || !(from l in equipmentTypeVersion.EventActionSequences where l.HandledEvent.StartsWith("Equipment.FileRead") select 1).Any())
{
equipmentDictionaryName = string.Empty;
equipmentDictionaryVersionName = string.Empty;
@ -834,9 +827,7 @@ public class AdaptationTesting : ISMTP
equipmentDictionaryVersion = null;
else
{
if (_EquipmentDictionaryVersions.ContainsKey(equipmentDictionaryServiceV2))
equipmentDictionaryVersion = _EquipmentDictionaryVersions[equipmentDictionaryServiceV2];
else
if (!_EquipmentDictionaryVersions.TryGetValue(equipmentDictionaryServiceV2, out equipmentDictionaryVersion))
{
equipmentDictionaryVersion = GetEquipmentDictionaryVersion(equipmentDictionaryServiceV2);
_EquipmentDictionaryVersions.Add(equipmentDictionaryServiceV2, equipmentDictionaryVersion);
@ -850,14 +841,15 @@ public class AdaptationTesting : ISMTP
{
Tuple<string, List<Tuple<string, string>>> result;
List<Tuple<string, string>> results;
List<Tuple<string, string>> collection;
if (_SkipEquipmentDictionary)
results = new List<Tuple<string, string>>();
else if (string.IsNullOrEmpty(equipmentDictionaryVersionTuple.Item1))
throw new Exception();
else if (equipmentDictionaryVersionTuple?.Item4?.Events?.Event is null)
results = new List<Tuple<string, string>>();
else if (_EquipmentDictionaryEventDescriptions.ContainsKey(equipmentDictionaryVersionTuple.Item1))
results = _EquipmentDictionaryEventDescriptions[equipmentDictionaryVersionTuple.Item1];
else if (_EquipmentDictionaryEventDescriptions.TryGetValue(equipmentDictionaryVersionTuple.Item1, out collection))
results = collection;
else
{
results = new List<Tuple<string, string>>();
@ -963,28 +955,36 @@ public class AdaptationTesting : ISMTP
}
if (_TestContext.FullyQualifiedTestClassName.Contains(nameof(Extract)))
{
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
try
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation);
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.ErrorTargetFileLocation);
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.SourceFileLocation);
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.TargetFileLocation);
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
}
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
catch (IOException ex)
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.SourceFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.SourceFileLocation);
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.TargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.TargetFileLocation);
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
if (!ex.Message.Contains("SMB1"))
throw;
}
}
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: false);
result = FileHandlers.CellInstanceConnectionName.Get(this, fileParameter, mbn.CellInstanceName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, dummyRuns, staticRuns, useCyclicalForDescription, connectionCount: cellInstanceVersionTuple.Item2.EquipmentConnections.Length);
return result;
}
@ -1001,7 +1001,7 @@ public class AdaptationTesting : ISMTP
string sourceFileLocation = string.Empty;
MethodBaseName mbn = GetMethodBaseName(methodBase);
string[] textFiles = GetTextFiles(mbn);
if (!textFiles.Any())
if (textFiles.Length == 0)
{
if (_HasWaitForProperty)
throw new Exception("Set text file!");
@ -1065,7 +1065,7 @@ public class AdaptationTesting : ISMTP
else
{
string[] files = Directory.GetFiles(ipdsfDirectory, searchPattern, SearchOption.TopDirectoryOnly);
if (files.Any())
if (files.Length != 0)
ipdsfFile = files[0];
else
ipdsfFile = searchPattern;
@ -1109,9 +1109,9 @@ public class AdaptationTesting : ISMTP
{
string[] pdsfFiles;
pdsfFiles = Directory.GetFiles(searchDirectory, searchPattern, SearchOption.TopDirectoryOnly);
if (!pdsfFiles.Any())
if (pdsfFiles.Length == 0)
_ = Process.Start("explorer.exe", searchDirectory);
Assert.IsTrue(pdsfFiles.Any(), "GetFiles check");
Assert.IsTrue(pdsfFiles.Length != 0, "GetFiles check");
results = GetLogisticsColumnsAndBody(pdsfFiles[0]);
}
Assert.IsFalse(string.IsNullOrEmpty(results.Item1));

View File

@ -2,7 +2,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.Json;
@ -74,7 +73,7 @@ public class UnitTesting
if (string.IsNullOrEmpty(result))
break;
checkFiles = Directory.GetFiles(result, "*.Tests.*proj", SearchOption.TopDirectoryOnly);
if (checkFiles.Any())
if (checkFiles.Length != 0)
break;
result = Path.GetDirectoryName(result);
}

View File

@ -2,8 +2,10 @@ using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
@ -38,6 +40,13 @@ public class DEP08SIHTRPLC : LoggingUnitTesting, IDisposable
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod]
public void TestDateTime()
{
@ -55,9 +64,9 @@ public class DEP08SIHTRPLC : LoggingUnitTesting, IDisposable
StringBuilder results = new();
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
{
new("DEP08SIHTRPLC", "v2.47.5"),
new("DEP08SIHTRPLC", "v2.52.0"),
};
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
@ -65,8 +74,31 @@ public class DEP08SIHTRPLC : LoggingUnitTesting, IDisposable
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = 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"));
}
[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();
}
}

View File

@ -2,8 +2,10 @@ using Adaptation._Tests.Shared;
using Microsoft.Extensions.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
@ -38,6 +40,13 @@ public class PLC : LoggingUnitTesting, IDisposable
LoggingUnitTesting?.Dispose();
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
[TestMethod]
public void TestDateTime()
{
@ -61,7 +70,7 @@ public class PLC : LoggingUnitTesting, IDisposable
new("R73-PLC", "v2.19.0"),
new("R74-PLC", "v2.19.0"),
};
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
string staging = "http://mestsa07ec.infineon.com:9003/CellInstanceServiceV2";
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
@ -69,8 +78,31 @@ public class PLC : LoggingUnitTesting, IDisposable
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
_ = 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"));
}
[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();
}
}

View File

@ -45,7 +45,7 @@
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
},
{
"Use": true,
"Use": false,
"Letter": "i",
"Share": "\\\\messdv002.na.infineon.com\\Candela",
"User": "INFINEON\\MESGaNEAF",
@ -115,14 +115,14 @@
"Password": "rzXkXdHKetDfsukhZKW0yA=="
},
{
"Use": true,
"Use": false,
"Letter": "s",
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
"User": "EC\\ECMESEAF",
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
},
{
"Use": true,
"Use": false,
"Letter": "t",
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
"User": "EC\\ECEDASvc",

View File

@ -45,7 +45,7 @@
"Password": "tVyC7uPHtScZR8NLInSaxQ=="
},
{
"Use": true,
"Use": false,
"Letter": "i",
"Share": "\\\\messdv002.na.infineon.com\\Candela",
"User": "INFINEON\\MESGaNEAF",
@ -115,14 +115,14 @@
"Password": "rzXkXdHKetDfsukhZKW0yA=="
},
{
"Use": true,
"Use": false,
"Letter": "s",
"Share": "\\\\messv02ecc1.ec.local\\EC_EAFRepository",
"User": "EC\\ECMESEAF",
"Password": "CUGygiPwahy4U3j+6KqqoMZ08STyVDR1rKm6MwPpt00="
},
{
"Use": true,
"Use": false,
"Letter": "t",
"Share": "\\\\messv02ecc1.ec.local\\EC_EDA",
"User": "EC\\ECEDASvc",

View File

@ -4,14 +4,8 @@
"BA-Extract.Staging.v2_43_0-DEP08SIHTRPLC": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~DEP08SIHTRPLC\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"BB-Extract.Staging.v2_43_0-DEP08SIHTRPLC-Staging__v2_43_0__DEP08SIHTRPLC__ZipFilesByDate": "dotnet test --runtime win-x64 --no-build --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_43_0 & ClassName~DEP08SIHTRPLC & Name~Staging__v2_43_0__DEP08SIHTRPLC__ZipFilesByDate\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")",
"Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"nuget-clear": "dotnet nuget locals all --clear",
"build": "dotnet build --runtime win-x64 --self-contained",
"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 ../DEP08SIHTRPLC.csproj",
"pull": "git pull",
"kanbn.board": "kanbn board",
"kanbn.board.json": "kanbn board -j > .kanbn/board.json",
"garbage-collect": "git gc"
}
}

View File

@ -144,7 +144,7 @@
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="Infineon.EAF.Runtime">
<Version>2.47.0</Version>
<Version>2.52.0</Version>
</PackageReference>
<PackageReference Include="Instances">
<Version>1.6.1</Version>

View File

@ -165,7 +165,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
Equipment.SelfDescriptionBuilder.AddParameterTypeDefinition(structuredType);
}
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)
{
@ -197,7 +197,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
FileConnectorConfiguration fileConnectorConfiguration = Mapper.Map(Configuration);
string parameterizedModelObjectDefinitionType = methodBase.DeclaringType.FullName;
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)
AddParameterRangeAndEvent();
}
@ -338,7 +338,7 @@ public partial class FileRead : FileReaderHandler, ISMTP
if (modelObjectParameterDefinitionJsonElement.ValueKind != JsonValueKind.Array)
throw new Exception();
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();
if (results?.Item2 is null)
throw new Exception();

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.47.5.0")]
[assembly: AssemblyFileVersion("2.47.5.0")]
[assembly: AssemblyVersion("2.52.0.0")]
[assembly: AssemblyFileVersion("2.52.0.0")]