Inititial Commit
This commit is contained in:
parent
660b89c129
commit
c7995ffd4f
11
.gitignore
vendored
11
.gitignore
vendored
@ -331,10 +331,11 @@ ASALocalRun/
|
||||
##
|
||||
## Visual Studio Code
|
||||
##
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*/!.vscode/extensions.json
|
||||
*/!.vscode/launch.json
|
||||
*/!.vscode/settings.json
|
||||
*/!.vscode/tasks.json
|
||||
*/.vscode/*
|
||||
*/.vscode/ReportGenerator/*
|
||||
|
||||
*.lnk
|
||||
|
12
Adaptation/.config/dotnet-tools.json
Normal file
12
Adaptation/.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-reportgenerator-globaltool": {
|
||||
"version": "5.1.15",
|
||||
"commands": [
|
||||
"reportgenerator"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -76,12 +76,15 @@ 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.IDE0001.severity = warning # IDE0001: Simplify name
|
||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||
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.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)
|
||||
|
201
Adaptation/.vscode/format-report.json
vendored
201
Adaptation/.vscode/format-report.json
vendored
@ -1,200 +1 @@
|
||||
[
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "9e6e3881-2c77-41ba-83c3-c15a21699111"
|
||||
},
|
||||
"FileName": "ProcessData.cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\ProcessData.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 1,
|
||||
"CharNumber": 1,
|
||||
"DiagnosticId": "WHITESPACE",
|
||||
"FormatDescription": "Fix whitespace formatting."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "a32feb09-3c35-4534-8f83-436319852545"
|
||||
},
|
||||
"FileName": "FileRead.cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\OpenInsightMetrologyViewerAttachments\\FileRead.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 111,
|
||||
"CharNumber": 120,
|
||||
"DiagnosticId": "IDE0060",
|
||||
"FormatDescription": "warning IDE0060: Remove unused parameter \u0027descriptions\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "d629cdaf-aa21-4193-ae17-aecafca36ca6"
|
||||
},
|
||||
"FileName": "FileRead.cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\FileRead.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 13,
|
||||
"CharNumber": 1,
|
||||
"DiagnosticId": "IDE0005",
|
||||
"FormatDescription": "warning IDE0005: Using directive is unnecessary."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "d629cdaf-aa21-4193-ae17-aecafca36ca6"
|
||||
},
|
||||
"FileName": "FileRead.cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\FileRead.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 53,
|
||||
"CharNumber": 24,
|
||||
"DiagnosticId": "IDE0002",
|
||||
"FormatDescription": "warning IDE0002: Name can be simplified."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 16,
|
||||
"CharNumber": 33,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 15,
|
||||
"CharNumber": 36,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 17,
|
||||
"CharNumber": 36,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 19,
|
||||
"CharNumber": 36,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 18,
|
||||
"CharNumber": 36,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: Missing prefix: \u0027_\u0027"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "0d78829b-6f7b-4313-95dd-ca86ae3e359f"
|
||||
},
|
||||
"FileName": ".cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 21,
|
||||
"CharNumber": 24,
|
||||
"DiagnosticId": "IDE1006",
|
||||
"FormatDescription": "warning IDE1006: Naming rule violation: These words must begin with upper case characters: dd"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"DocumentId": {
|
||||
"ProjectId": {
|
||||
"Id": "7e6bb579-a63b-4b11-9de5-f86fc2f09c8d"
|
||||
},
|
||||
"Id": "d629cdaf-aa21-4193-ae17-aecafca36ca6"
|
||||
},
|
||||
"FileName": "FileRead.cs",
|
||||
"FilePath": "T:\\MESAFIBACKLOG\\06_SourceCode\\MESAFIBACKLOG\\Adaptation\\FileHandlers\\json\\FileRead.cs",
|
||||
"FileChanges": [
|
||||
{
|
||||
"LineNumber": 1,
|
||||
"CharNumber": 1,
|
||||
"DiagnosticId": "IDE0005",
|
||||
"FormatDescription": "Remove unnecessary import."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
[]
|
23
Adaptation/.vscode/settings.json
vendored
23
Adaptation/.vscode/settings.json
vendored
@ -21,26 +21,27 @@
|
||||
"Villach",
|
||||
"Vrng"
|
||||
],
|
||||
"coverage-gutters.coverageBaseDir": "../../../../MESAFIBACKLOG/05_TestResults/TestResults/**",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#9885b1",
|
||||
"activityBar.activeBackground": "#5d8f9e",
|
||||
"activityBar.activeBorder": "#dacec5",
|
||||
"activityBar.background": "#9885b1",
|
||||
"activityBar.background": "#5d8f9e",
|
||||
"activityBar.foreground": "#15202b",
|
||||
"activityBar.inactiveForeground": "#15202b99",
|
||||
"activityBarBadge.background": "#dacec5",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"sash.hoverBorder": "#9885b1",
|
||||
"statusBar.background": "#7e669d",
|
||||
"activityBarBadge.background": "#78476d",
|
||||
"activityBarBadge.foreground": "#e7e7e7",
|
||||
"sash.hoverBorder": "#5d8f9e",
|
||||
"statusBar.background": "#4a727e",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"statusBarItem.hoverBackground": "#9885b1",
|
||||
"statusBarItem.remoteBackground": "#7e669d",
|
||||
"statusBarItem.hoverBackground": "#5d8f9e",
|
||||
"statusBarItem.remoteBackground": "#4a727e",
|
||||
"statusBarItem.remoteForeground": "#e7e7e7",
|
||||
"titleBar.activeBackground": "#7e669d",
|
||||
"titleBar.activeBackground": "#4a727e",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveBackground": "#7e669d99",
|
||||
"titleBar.inactiveBackground": "#4a727e99",
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"commandCenter.border": "#e7e7e799"
|
||||
},
|
||||
"peacock.color": "#7e669d",
|
||||
"peacock.color": "#4a727e",
|
||||
"cSpell.enabled": false
|
||||
}
|
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.APC;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
|
@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly string _JobIdParentDirectory;
|
||||
private readonly string _JobIdArchiveParentDirectory;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
@ -114,11 +114,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveArchive(DateTime dateTime)
|
||||
#pragma warning disable IDE0060
|
||||
private void MoveArchive(string reportFullPath, DateTime dateTime)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
string logisticsSequence = _Logistics.Sequence.ToString();
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
string weekDirectory = $"{_Logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}{@"\"}{_Logistics.DateTimeFromSequence:yyyy-MM-dd}";
|
||||
@ -128,12 +127,17 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||
destinationArchiveDirectory = Path.Combine(destinationArchiveDirectory, Path.GetFileName(sourceDirectory));
|
||||
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||
if (!Directory.GetDirectories(jobIdDirectory).Any())
|
||||
File.Copy(reportFullPath, Path.Combine(destinationArchiveDirectory, Path.GetFileName(reportFullPath)));
|
||||
else
|
||||
{
|
||||
string[] matchDirectories = GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).ToArray();
|
||||
if (matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||
destinationArchiveDirectory = Path.Combine(destinationArchiveDirectory, Path.GetFileName(sourceDirectory));
|
||||
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
@ -146,7 +150,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
MoveArchive(dateTime);
|
||||
MoveArchive(reportFullPath, dateTime);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -9,22 +9,23 @@ 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(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(ConvertExcelToJson) => new ConvertExcelToJson.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(MoveMatchingFiles) => new MoveMatchingFiles.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(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(json) => new json.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted),
|
||||
nameof(APC) => new APC.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(Archive) => new Archive.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(ConvertExcelToJson) => new ConvertExcelToJson.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(DownloadExcelFile) => new DownloadExcelFile.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(Dummy) => new Dummy.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, 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),
|
||||
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(OpenInsightMetrologyViewerAttachments) => new OpenInsightMetrologyViewerAttachments.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(Processed) => new Processed.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(json) => new json.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
nameof(SPaCe) => new SPaCe.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
|
||||
_ => throw new Exception($"\"{cellInstanceConnectionName}\" not mapped")
|
||||
};
|
||||
return result;
|
||||
|
@ -18,8 +18,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private long? _TickOffset;
|
||||
private readonly string _SheetName;
|
||||
|
||||
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(), true, 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;
|
||||
@ -112,13 +112,15 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
string json = iProcessData.Details[0].ToString();
|
||||
string fileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, $"{_SheetName}.json");
|
||||
string fileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, $"{Path.GetFileNameWithoutExtension(reportFullPath)} - {_SheetName}{_FileConnectorConfiguration.TargetFileName}");
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
File.Delete(fileName);
|
||||
if (_IsEAFHosted)
|
||||
File.Delete(fileName);
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
File.WriteAllText(fileName, json);
|
||||
if (_IsEAFHosted)
|
||||
File.WriteAllText(fileName, json);
|
||||
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||
}
|
||||
return results;
|
||||
|
@ -134,7 +134,7 @@ public class ProcessData : IProcessData
|
||||
FIBacklogMesa[]? fIBacklogMesaCollection = JsonSerializer.Deserialize<FIBacklogMesa[]>(json, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
if (fIBacklogMesaCollection is null || !fIBacklogMesaCollection.Any())
|
||||
throw new NullReferenceException();
|
||||
json = JsonSerializer.Serialize(fIBacklogMesaCollection, new JsonSerializerOptions() { WriteIndented = true });
|
||||
json = JsonSerializer.Serialize(fIBacklogMesaCollection.OrderBy(l => l.Req), new JsonSerializerOptions() { WriteIndented = true });
|
||||
_Details.Add(json);
|
||||
}
|
||||
|
||||
|
166
Adaptation/FileHandlers/DownloadExcelFile/FileRead.cs
Normal file
166
Adaptation/FileHandlers/DownloadExcelFile/FileRead.cs
Normal file
@ -0,0 +1,166 @@
|
||||
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
|
||||
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Duplicator;
|
||||
using Adaptation.Shared.Methods;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Adaptation.FileHandlers.DownloadExcelFile;
|
||||
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private readonly Timer _Timer;
|
||||
private readonly string _IShareLink;
|
||||
private readonly HttpClient _HttpClient;
|
||||
|
||||
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;
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_HttpClient = new(new HttpClientHandler() { UseDefaultCredentials = true });
|
||||
_IShareLink = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, string.Concat("CellInstance.", cellInstanceName, ".iShare.Link"));
|
||||
if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process)
|
||||
_Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite);
|
||||
else
|
||||
{
|
||||
_Timer = new Timer(Callback, null, Timeout.Infinite, Timeout.Infinite);
|
||||
Callback(null);
|
||||
}
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
|
||||
|
||||
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
|
||||
|
||||
string IFileRead.GetEventDescription()
|
||||
{
|
||||
string result = _Description.GetEventDescription();
|
||||
return result;
|
||||
}
|
||||
|
||||
List<string> IFileRead.GetHeaderNames()
|
||||
{
|
||||
List<string> results = _Description.GetHeaderNames();
|
||||
return results;
|
||||
}
|
||||
|
||||
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
|
||||
{
|
||||
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
|
||||
return results;
|
||||
}
|
||||
|
||||
JsonProperty[] IFileRead.GetDefault()
|
||||
{
|
||||
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
|
||||
return results;
|
||||
}
|
||||
|
||||
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
|
||||
{
|
||||
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
|
||||
return results;
|
||||
}
|
||||
|
||||
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
|
||||
{
|
||||
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
if (string.IsNullOrEmpty(eventName))
|
||||
throw new Exception();
|
||||
_ReportFullPath = reportFullPath;
|
||||
DateTime dateTime = DateTime.Now;
|
||||
results = GetExtractResult(reportFullPath, dateTime);
|
||||
if (results.Item3 is null)
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
|
||||
if (results.Item3.Length > 0 && _IsEAFHosted)
|
||||
WritePDSF(this, results.Item3);
|
||||
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
|
||||
return results;
|
||||
}
|
||||
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
List<string> headerNames = _Description.GetHeaderNames();
|
||||
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
|
||||
results = ReExtract(this, headerNames, keyValuePairs);
|
||||
return results;
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime) => throw new Exception(string.Concat("See ", nameof(Callback)));
|
||||
|
||||
private void DownloadExcelFileAsync()
|
||||
{
|
||||
if (_HttpClient is null)
|
||||
throw new Exception();
|
||||
if (string.IsNullOrEmpty(_IShareLink))
|
||||
throw new Exception();
|
||||
string fileName = Path.Combine(_FileConnectorConfiguration.TargetFileLocation, _FileConnectorConfiguration.SourceFileFilter);
|
||||
if (File.Exists(fileName))
|
||||
File.Delete(fileName);
|
||||
Task<HttpResponseMessage> httpResponseMessageTask = _HttpClient.GetAsync(_IShareLink);
|
||||
httpResponseMessageTask.Wait();
|
||||
if (!httpResponseMessageTask.Result.IsSuccessStatusCode)
|
||||
throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString());
|
||||
Task<Stream> streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
||||
streamTask.Wait();
|
||||
if (!streamTask.Result.CanRead)
|
||||
throw new NullReferenceException(nameof(streamTask));
|
||||
using FileStream fileStream = new(fileName, FileMode.CreateNew);
|
||||
Task task = streamTask.Result.CopyToAsync(fileStream);
|
||||
task.Wait();
|
||||
}
|
||||
|
||||
private void Callback(object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_IsEAFHosted)
|
||||
DownloadExcelFileAsync();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||
try
|
||||
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
try
|
||||
{
|
||||
TimeSpan timeSpan = new(DateTime.Now.AddSeconds(_FileConnectorConfiguration.FileScanningIntervalInSeconds.Value).Ticks - DateTime.Now.Ticks);
|
||||
_ = _Timer.Change((long)timeSpan.TotalMilliseconds, Timeout.Infinite);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
string subject = string.Concat("Exception:", _CellInstanceConnectionName);
|
||||
string body = string.Concat(exception.Message, Environment.NewLine, Environment.NewLine, exception.StackTrace);
|
||||
try
|
||||
{ _SMTP.SendHighPriorityEmailMessage(subject, body); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -23,8 +23,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private int _LastDummyRunIndex;
|
||||
private readonly string[] _CellNames;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
|
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.IQSSi;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
@ -118,8 +118,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
|
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
@ -15,8 +16,8 @@ namespace Adaptation.FileHandlers.MoveMatchingFiles;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
@ -153,18 +154,36 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
||||
private static List<(string, string, string, string, string)> GetCollection(List<(string matchingFile, string checkFile)> collection)
|
||||
{
|
||||
long preWait;
|
||||
List<(string, string, string, string, string)> results = new();
|
||||
string errFile;
|
||||
string checkDirectory;
|
||||
string noWaitDirectory;
|
||||
foreach ((string matchingFile, string checkFile) in collection)
|
||||
{
|
||||
errFile = string.Concat(checkFile, ".err");
|
||||
checkDirectory = Path.GetDirectoryName(checkFile);
|
||||
if (!Directory.Exists(checkDirectory))
|
||||
_ = Directory.CreateDirectory(checkDirectory);
|
||||
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
||||
results.Add(new(matchingFile, checkFile, errFile, checkDirectory, noWaitDirectory));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
||||
{
|
||||
long preWait;
|
||||
List<(string checkFile, string errFile)> postCollection = new();
|
||||
foreach ((string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory) in GetCollection(collection))
|
||||
{
|
||||
File.Move(matchingFile, checkFile);
|
||||
if (Directory.Exists(noWaitDirectory))
|
||||
{
|
||||
postCollection.Add(new(checkFile, errFile));
|
||||
continue;
|
||||
}
|
||||
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
|
||||
else
|
||||
@ -182,10 +201,45 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!File.Exists(checkFile))
|
||||
break;
|
||||
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
|
||||
throw new Exception($"Not all files were consumned after {_BreakAfterSeconds} second(s)!");
|
||||
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
if (postCollection.Any())
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
StringBuilder stringBuilder = new();
|
||||
foreach ((string checkFile, string errFile) in postCollection)
|
||||
{
|
||||
if (File.Exists(errFile))
|
||||
_ = stringBuilder.AppendLine(File.ReadAllText(errFile));
|
||||
if (File.Exists(checkFile))
|
||||
_ = stringBuilder.AppendLine($"<{checkFile}> was not consumed by the end!");
|
||||
}
|
||||
if (stringBuilder.Length > 0)
|
||||
throw new Exception(stringBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreatePointerFile(int numberLength, string parentDirectory, List<string> matchingFiles)
|
||||
{
|
||||
#nullable enable
|
||||
string checkFile;
|
||||
string writeFile;
|
||||
string? directoryName;
|
||||
int parentDirectoryLength = parentDirectory.Length;
|
||||
foreach (string matchingFile in matchingFiles)
|
||||
{
|
||||
directoryName = Path.GetDirectoryName(matchingFile);
|
||||
if (directoryName is null)
|
||||
continue;
|
||||
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
|
||||
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
|
||||
if (File.Exists(writeFile))
|
||||
continue;
|
||||
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
@ -201,6 +255,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
||||
if (matchingFiles.Count != searchDirectories.Count)
|
||||
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
||||
try
|
||||
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
||||
catch (Exception) { }
|
||||
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
|
||||
MoveCollection(dateTime, collection);
|
||||
return results;
|
||||
|
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.OpenInsight;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
@ -103,16 +103,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private static void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<Description> descriptions, Test[] tests)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (reportFullPath is null)
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
{ }
|
||||
if (tests is null)
|
||||
{ }
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
|
@ -16,8 +16,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private readonly string _OpenInsightMetrologyViewerAPI;
|
||||
|
||||
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;
|
||||
@ -106,11 +106,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void SendData(DateTime dateTime, List<Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
if (_OpenInsightMetrologyViewerAPI is null)
|
||||
{ }
|
||||
// WSRequest wsRequest = new(this, _Logistics, descriptions);
|
||||
// (string json, WS.Results wsResults) = WS.SendData(_OpenInsightMetrologyViewerAPI, wsRequest);
|
||||
|
@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly string _JobIdParentDirectory;
|
||||
private readonly string _OpenInsightMetrologyViewerAPI;
|
||||
|
||||
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;
|
||||
@ -108,12 +108,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void PostOpenInsightMetrologyViewerAttachments(string reportFullPath, DateTime dateTime, List<Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (string.IsNullOrEmpty(reportFullPath))
|
||||
{ }
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
@ -129,6 +127,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
lock (_StaticRuns)
|
||||
_ = _StaticRuns.Remove(_Logistics.Sequence);
|
||||
}
|
||||
if (_OpenInsightMetrologyViewerAPI is null)
|
||||
{ }
|
||||
// OpenInsightMetrologyViewer.WSRequest.PostOpenInsightMetrologyViewerAttachments(this, _Logistics, _OpenInsightMetrologyViewerAPI, dateTime, json, descriptions, matchDirectories[0]);
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly string _JobIdParentDirectory;
|
||||
private readonly string _JobIdProcessParentDirectory;
|
||||
|
||||
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;
|
||||
@ -108,23 +108,22 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0060
|
||||
private void DirectoryMove(string reportFullPath, DateTime dateTime, List<Description> descriptions)
|
||||
#pragma warning restore IDE0060
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
if (descriptions is null)
|
||||
{ }
|
||||
FileInfo fileInfo = new(reportFullPath);
|
||||
|
||||
_ = _Logistics.Sequence.ToString();
|
||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories = GetInProcessDirectory(jobIdDirectory);
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
if (matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
||||
if (_JobIdProcessParentDirectory is null)
|
||||
{ }
|
||||
// OpenInsightMetrologyViewer.WSRequest wsRequest = new(this, _Logistics, descriptions);
|
||||
// JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
|
||||
// string json = JsonSerializer.Serialize(wsRequest, wsRequest.GetType(), jsonSerializerOptions);
|
||||
|
@ -14,8 +14,8 @@ namespace Adaptation.FileHandlers.SPaCe;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
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;
|
||||
@ -116,8 +116,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
|
||||
Tuple<string, string[], string[]> pdsf = ProcessDataStandardFormat.GetLogisticsColumnsAndBody(reportFullPath);
|
||||
_Logistics = new Logistics(reportFullPath, pdsf.Item1);
|
||||
|
@ -20,7 +20,7 @@ namespace Adaptation.FileHandlers.json;
|
||||
public class FileRead : Shared.FileRead, IFileRead
|
||||
{
|
||||
|
||||
private long? _TickOffset;
|
||||
private string _Json;
|
||||
private readonly string _API;
|
||||
private readonly string _Query;
|
||||
private readonly string _Project;
|
||||
@ -28,17 +28,18 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly HttpClient _HttpClient;
|
||||
private readonly WorkItemTrackingHttpClient _WorkItemTrackingHttpClient;
|
||||
|
||||
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;
|
||||
_Json = string.Empty;
|
||||
_NullData = string.Empty;
|
||||
_Logistics = new(this);
|
||||
if (_FileParameter is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_ModelObjectParameterDefinitions is null)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (_IsDuplicator)
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
string cellInstanceNamed = string.Concat("CellInstance.", cellInstanceName);
|
||||
MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json");
|
||||
@ -50,7 +51,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string baseAddress = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, $"{cellInstanceNamed}.HttpClient.BaseAddress");
|
||||
byte[] bytes = Encoding.ASCII.GetBytes($":{pat}");
|
||||
string base64 = Convert.ToBase64String(bytes);
|
||||
_HttpClient = new() { BaseAddress = new(baseAddress) };
|
||||
_HttpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) };
|
||||
_HttpClient.DefaultRequestHeaders.Authorization = new("Basic", base64);
|
||||
_HttpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue);
|
||||
VssBasicCredential credential = new("", pat);
|
||||
@ -127,19 +128,19 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||
_Logistics = new Logistics(this);
|
||||
string json = File.ReadAllText(reportFullPath);
|
||||
if (_Json == json)
|
||||
results.Item4.Add(_Logistics.FileInfo);
|
||||
else
|
||||
{
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _HttpClient, _BasePage, _API, _Query, _WorkItemTrackingHttpClient, _Project);
|
||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _HttpClient, _BasePage, _API, _Query, _WorkItemTrackingHttpClient, _Project, json);
|
||||
if (iProcessData is not ProcessData _)
|
||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||
if (!iProcessData.Details.Any())
|
||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||
_Json = json;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -23,11 +24,11 @@ public class ProcessData : IProcessData
|
||||
|
||||
List<object> Shared.Properties.IProcessData.Details => _Details;
|
||||
|
||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, HttpClient httpClient, string basePage, string api, string query, WorkItemTrackingHttpClient workItemTrackingHttpClient, string project)
|
||||
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, HttpClient httpClient, string basePage, string api, string query, WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string json)
|
||||
{
|
||||
fileInfoCollection.Clear();
|
||||
_Details = new List<object>();
|
||||
Parse(fileRead, logistics, fileInfoCollection, httpClient, basePage, api, query, workItemTrackingHttpClient, project);
|
||||
Parse(fileRead, logistics, fileInfoCollection, httpClient, basePage, api, query, workItemTrackingHttpClient, project, json);
|
||||
}
|
||||
|
||||
string IProcessData.GetCurrentReactor(IFileRead fileRead, Logistics logistics, Dictionary<string, string> reactors)
|
||||
@ -40,45 +41,33 @@ public class ProcessData : IProcessData
|
||||
|
||||
#nullable enable
|
||||
|
||||
private static Root GetRoot(HttpClient httpClient, string basePage, string api, int id)
|
||||
{
|
||||
Root result;
|
||||
Task<HttpResponseMessage> httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, "/workItems/", id));
|
||||
httpResponseMessageTask.Wait();
|
||||
if (!httpResponseMessageTask.Result.IsSuccessStatusCode)
|
||||
throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString());
|
||||
Task<Stream> streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
||||
streamTask.Wait();
|
||||
if (!streamTask.Result.CanRead)
|
||||
{
|
||||
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(streamTask.Result);
|
||||
if (jsonElement is null)
|
||||
throw new NullReferenceException(nameof(jsonElement));
|
||||
}
|
||||
Root? root = JsonSerializer.Deserialize<Root>(streamTask.Result, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
streamTask.Result.Dispose();
|
||||
if (root is null || root.Fields is null)
|
||||
throw new NullReferenceException(nameof(root));
|
||||
result = root;
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void AddPatch(JsonPatchDocument document, string path, object value) => document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value });
|
||||
|
||||
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, HttpClient httpClient, string basePage, string api, string query, WorkItemTrackingHttpClient workItemTrackingHttpClient, string project)
|
||||
private static Dictionary<string, FIBacklogMesa> GetFIBacklogMesaCollection(string json, string keySection)
|
||||
{
|
||||
if (fileRead is null)
|
||||
throw new NullReferenceException();
|
||||
if (logistics is null)
|
||||
throw new NullReferenceException();
|
||||
if (fileInfoCollection is null)
|
||||
throw new NullReferenceException();
|
||||
Root raw;
|
||||
ViewModels.WorkItem view;
|
||||
string json = File.ReadAllText(logistics.ReportFullPath);
|
||||
FIBacklogMesa[]? fIBacklogMesaCollection = JsonSerializer.Deserialize<FIBacklogMesa[]>(json, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
if (fIBacklogMesaCollection is null || !fIBacklogMesaCollection.Any())
|
||||
Dictionary<string, FIBacklogMesa> results = new();
|
||||
string key;
|
||||
FIBacklogMesa[]? fiBacklogMesaCollection;
|
||||
fiBacklogMesaCollection = JsonSerializer.Deserialize<FIBacklogMesa[]>(json, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
if (fiBacklogMesaCollection is null || !fiBacklogMesaCollection.Any())
|
||||
throw new NullReferenceException();
|
||||
foreach (FIBacklogMesa fIBacklogMesa in fiBacklogMesaCollection)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fIBacklogMesa.Requestor))
|
||||
continue;
|
||||
if (string.IsNullOrEmpty(fIBacklogMesa.Req))
|
||||
continue;
|
||||
key = $"{fIBacklogMesa.Requestor.Split(' ').First()}{keySection}{fIBacklogMesa.Req}";
|
||||
if (results.ContainsKey(key))
|
||||
continue;
|
||||
results.Add(key, fIBacklogMesa);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private static string GetIds(HttpClient httpClient, string basePage, string api, string query)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
Task<HttpResponseMessage> httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query));
|
||||
httpResponseMessageTask.Wait();
|
||||
if (!httpResponseMessageTask.Result.IsSuccessStatusCode)
|
||||
@ -86,35 +75,101 @@ public class ProcessData : IProcessData
|
||||
Task<Stream> streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
||||
streamTask.Wait();
|
||||
if (!streamTask.Result.CanRead)
|
||||
{
|
||||
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(streamTask.Result);
|
||||
if (jsonElement is null)
|
||||
throw new NullReferenceException(nameof(jsonElement));
|
||||
}
|
||||
throw new NullReferenceException(nameof(streamTask));
|
||||
WIQL.Root? root = JsonSerializer.Deserialize<WIQL.Root>(streamTask.Result, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true });
|
||||
streamTask.Result.Dispose();
|
||||
if (root is null || root.WorkItems is null)
|
||||
throw new NullReferenceException(nameof(root));
|
||||
foreach (WIQL.WorkItem workItem in root.WorkItems)
|
||||
_ = result.Append(workItem.Id).Append(',');
|
||||
if (result.Length > 0)
|
||||
_ = result.Remove(result.Length - 1, 1);
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private static Value[] GetWorkItems(HttpClient httpClient, string basePage, string api, string ids)
|
||||
{
|
||||
Value[]? results;
|
||||
// List<Value> results = new();
|
||||
// Value? value;
|
||||
Task<HttpResponseMessage> httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}"));
|
||||
httpResponseMessageTask.Wait();
|
||||
if (!httpResponseMessageTask.Result.IsSuccessStatusCode)
|
||||
throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString());
|
||||
Task<Stream> streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync();
|
||||
streamTask.Wait();
|
||||
if (!streamTask.Result.CanRead)
|
||||
throw new NullReferenceException(nameof(streamTask));
|
||||
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(streamTask.Result);
|
||||
if (jsonElement is null || jsonElement.Value.ValueKind != JsonValueKind.Object)
|
||||
throw new NullReferenceException(nameof(jsonElement));
|
||||
results = JsonSerializer.Deserialize<Value[]>(jsonElement.Value.EnumerateObject().Last().Value);
|
||||
if (results is null || !results.Any())
|
||||
throw new NullReferenceException(nameof(results));
|
||||
return results;
|
||||
}
|
||||
|
||||
private static Value[] GetExtra(string keySection, IReadOnlyList<Value> workItems, Dictionary<string, FIBacklogMesa> keyToFIBacklogMesa)
|
||||
{
|
||||
List<Value> results = new();
|
||||
foreach (Value value in workItems)
|
||||
{
|
||||
raw = GetRoot(httpClient, basePage, api, workItem.Id);
|
||||
view = new(raw);
|
||||
_Details.Add(view);
|
||||
if (workItem.Id == 308759)
|
||||
break;
|
||||
if (!value.Fields.SystemTitle.Contains(keySection))
|
||||
continue;
|
||||
if (keyToFIBacklogMesa.Remove(value.Fields.SystemTitle))
|
||||
continue;
|
||||
results.Add(value);
|
||||
}
|
||||
JsonPatchDocument document = new();
|
||||
AddPatch(document, "/fields/System.Title", "Title");
|
||||
AddPatch(document, "/fields/System.Description", "Description");
|
||||
AddPatch(document, "/fields/System.AssignedTo", "Mike.Phares@infineon.com");
|
||||
AddPatch(document, "/fields/System.AreaPath", string.Concat(project, @"\OI"));
|
||||
AddPatch(document, "/fields/System.IterationPath", string.Concat(project, @"\CMP"));
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
private static string GetDescription(FIBacklogMesa fiBacklogMesa, DateTime dateTime) =>
|
||||
$"Req:{fiBacklogMesa.Req}; Submitted:{(dateTime == DateTime.MinValue ? fiBacklogMesa.Submitted : dateTime.ToString("d-MMM-yy"))}; Requestor:{fiBacklogMesa.Requestor}; AssignedTo:{fiBacklogMesa.AssignedTo}; SecondResource:{fiBacklogMesa.SecondResource}; Systems:{fiBacklogMesa.SystemS}; ";
|
||||
|
||||
private void Parse(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, HttpClient httpClient, string basePage, string api, string query, WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string json)
|
||||
{
|
||||
if (fileRead is null)
|
||||
throw new NullReferenceException();
|
||||
if (logistics is null)
|
||||
throw new NullReferenceException();
|
||||
if (fileInfoCollection is null)
|
||||
throw new NullReferenceException();
|
||||
int counter = 0;
|
||||
DateTime dateTime;
|
||||
string description;
|
||||
string keySection = " UAT for ";
|
||||
string ids = GetIds(httpClient, basePage, api, query);
|
||||
Value[] workItems = GetWorkItems(httpClient, basePage, api, ids);
|
||||
Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem> workItemTask;
|
||||
workItemTask = workItemTrackingHttpClient.CreateWorkItemAsync(document, project, "Bug");
|
||||
workItemTask.Wait();
|
||||
if (workItemTask.Result is null)
|
||||
Dictionary<string, FIBacklogMesa> keyToFIBacklogMesa = GetFIBacklogMesaCollection(json, keySection);
|
||||
int count = keyToFIBacklogMesa.Count;
|
||||
Value[] extra = GetExtra(keySection, workItems, keyToFIBacklogMesa);
|
||||
if (count != extra.Length)
|
||||
{ }
|
||||
// workItemTask = workItemTrackingHttpClient.UpdateWorkItemAsync(document, project, "Bug");
|
||||
if (count != keyToFIBacklogMesa.Count)
|
||||
{ }
|
||||
_Details.AddRange(workItems);
|
||||
foreach (KeyValuePair<string, FIBacklogMesa> keyValuePair in keyToFIBacklogMesa)
|
||||
{
|
||||
if (counter > 5)
|
||||
break;
|
||||
JsonPatchDocument document = new();
|
||||
if (!DateTime.TryParse(keyValuePair.Value.Submitted, out dateTime))
|
||||
dateTime = DateTime.MinValue;
|
||||
AddPatch(document, "/fields/System.AreaPath", project);
|
||||
description = GetDescription(keyValuePair.Value, dateTime);
|
||||
AddPatch(document, "/fields/System.Title", keyValuePair.Key);
|
||||
AddPatch(document, "/fields/System.Description", description);
|
||||
AddPatch(document, "/fields/System.IterationPath", $"{project}\\(Default)");
|
||||
// AddPatch(document, "/fields/System.AssignedTo", "Mike.Phares@infineon.com");
|
||||
if (!fileRead.IsEAFHosted)
|
||||
continue;
|
||||
workItemTask = workItemTrackingHttpClient.CreateWorkItemAsync(document, project, "Task");
|
||||
workItemTask.Wait();
|
||||
counter++;
|
||||
if (workItemTask.Result is null)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
using Adaptation.FileHandlers.json.WorkItems;
|
||||
using System;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.ViewModels;
|
||||
|
||||
public class WorkItem
|
||||
{
|
||||
|
||||
public string AreaPath { get; set; } // { init; get; }
|
||||
public string AssignedToDisplayName { get; set; } // { init; get; }
|
||||
public int CommentCount { get; set; } // { init; get; }
|
||||
public string CreatedDate { get; set; } // { init; get; }
|
||||
public string ClosedDate { get; set; } // { init; get; }
|
||||
public string Description { get; set; } // { init; get; }
|
||||
public string Discussion { get; set; } // { init; get; }
|
||||
public string Effort { get; set; } // { init; get; }
|
||||
public string HypertextReference { get; set; } // { init; get; }
|
||||
public int Id { get; set; } // { init; get; }
|
||||
public string IterationPath { get; set; } // { init; get; }
|
||||
public string Req { get; set; } // { init; get; }
|
||||
public string ResolvedDate { get; set; } // { init; get; }
|
||||
public string Priority { get; set; } // { init; get; }
|
||||
public string State { get; set; } // { init; get; }
|
||||
public string Tags { get; set; } // { init; get; }
|
||||
public string TargetDate { get; set; } // { init; get; }
|
||||
public string Title { get; set; } // { init; get; }
|
||||
public string WorkItemType { get; set; } // { init; get; }
|
||||
|
||||
public WorkItem(Root raw)
|
||||
{
|
||||
string req;
|
||||
string[] words;
|
||||
if (string.IsNullOrEmpty(raw.Fields.SystemHistory))
|
||||
words = Array.Empty<string>();
|
||||
else
|
||||
words = raw.Fields.SystemHistory.Split(' ');
|
||||
if (words.Length < 3 || words[0] != "Req" || words[1] != ":")
|
||||
req = raw.Id.ToString();
|
||||
else
|
||||
req = words[2].Split('<')[0];
|
||||
string systemAreaPath = raw.Fields.SystemAreaPath.Replace(@"Mesa_FI\", string.Empty);
|
||||
string iterationPath = raw.Fields.SystemIterationPath.Replace(@"Mesa_FI\", string.Empty);
|
||||
string hypertextReference = string.IsNullOrEmpty(raw.Links?.Html?.Href) ? string.Empty : raw.Links.Html.Href;
|
||||
string systemAssignedToDisplayName = raw.Fields.SystemAssignedTo is null ? string.Empty : raw.Fields.SystemAssignedTo.DisplayName;
|
||||
string effort = raw.Fields.MicrosoftVSTSSchedulingEffort < 0.1 ? "" : Math.Floor(raw.Fields.MicrosoftVSTSSchedulingEffort).ToString("0");
|
||||
string createdDate = raw.Fields.SystemCreatedDate == DateTime.MinValue ? string.Empty : raw.Fields.SystemCreatedDate.ToString("dd-MMM-yy");
|
||||
string closedDate = raw.Fields.MicrosoftVSTSCommonClosedDate == DateTime.MinValue ? string.Empty : raw.Fields.MicrosoftVSTSCommonClosedDate.ToString("dd-MMM-yy");
|
||||
string resolvedDate = raw.Fields.MicrosoftVSTSCommonResolvedDate == DateTime.MinValue ? string.Empty : raw.Fields.MicrosoftVSTSCommonResolvedDate.ToString("dd-MMM-yy");
|
||||
string targetDate = raw.Fields.MicrosoftVSTSSchedulingTargetDate == DateTime.MinValue ? string.Empty : raw.Fields.MicrosoftVSTSSchedulingTargetDate.ToString("dd-MMM-yy");
|
||||
string priority = raw.Fields.SystemWorkItemType == "Bug" ? "BugFix" : raw.Fields.MicrosoftVSTSCommonPriority switch
|
||||
{
|
||||
1 => "High",
|
||||
2 => "Med",
|
||||
3 => "Low",
|
||||
4 => "TBD",
|
||||
_ => throw new NotImplementedException(),
|
||||
};
|
||||
AreaPath = systemAreaPath;
|
||||
AssignedToDisplayName = systemAssignedToDisplayName;
|
||||
CommentCount = raw.Fields.SystemCommentCount;
|
||||
CreatedDate = createdDate;
|
||||
ClosedDate = closedDate;
|
||||
Description = raw.Fields.SystemDescription;
|
||||
Discussion = raw.Fields.SystemHistory;
|
||||
Effort = effort;
|
||||
HypertextReference = hypertextReference;
|
||||
Id = raw.Id;
|
||||
IterationPath = iterationPath;
|
||||
Priority = priority;
|
||||
Req = req;
|
||||
ResolvedDate = resolvedDate;
|
||||
State = raw.Fields.SystemState;
|
||||
Tags = raw.Fields.SystemTags;
|
||||
TargetDate = targetDate;
|
||||
Title = raw.Fields.SystemTitle;
|
||||
WorkItemType = raw.Fields.SystemWorkItemType;
|
||||
}
|
||||
|
||||
}
|
@ -9,5 +9,5 @@ public class Avatar
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
public string Href { get; } // { init; get; }
|
||||
}
|
@ -6,39 +6,25 @@ namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
public class Fields
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Fields(string systemAreaPath,
|
||||
public Fields(
|
||||
string systemAreaPath,
|
||||
string systemTeamProject,
|
||||
string systemIterationPath,
|
||||
string systemWorkItemType,
|
||||
string systemState,
|
||||
string systemReason,
|
||||
User systemAssignedTo,
|
||||
SystemAssignedTo systemAssignedTo,
|
||||
DateTime systemCreatedDate,
|
||||
User systemCreatedBy,
|
||||
SystemCreatedBy systemCreatedBy,
|
||||
DateTime systemChangedDate,
|
||||
User systemChangedBy,
|
||||
SystemChangedBy systemChangedBy,
|
||||
int systemCommentCount,
|
||||
string systemTitle,
|
||||
string systemBoardColumn,
|
||||
bool systemBoardColumnDone,
|
||||
DateTime microsoftVSTSCommonStateChangeDate,
|
||||
DateTime microsoftVSTSCommonActivatedDate,
|
||||
User microsoftVSTSCommonActivatedBy,
|
||||
DateTime microsoftVSTSCommonResolvedDate,
|
||||
User microsoftVSTSCommonResolvedBy,
|
||||
DateTime microsoftVSTSCommonClosedDate,
|
||||
User microsoftVSTSCommonClosedBy,
|
||||
int microsoftVSTSCommonPriority,
|
||||
double microsoftVSTSSchedulingEffort,
|
||||
DateTime microsoftVSTSSchedulingTargetDate,
|
||||
double microsoftVSTSCommonStackRank,
|
||||
string microsoftVSTSCommonValueArea,
|
||||
string wEF81590F0A22C04FEF834957660F5F0C58KanbanColumn,
|
||||
bool wEF81590F0A22C04FEF834957660F5F0C58KanbanColumnDone,
|
||||
string systemDescription,
|
||||
string systemHistory,
|
||||
string systemTags,
|
||||
string href)
|
||||
string systemTags
|
||||
)
|
||||
{
|
||||
SystemAreaPath = systemAreaPath;
|
||||
SystemTeamProject = systemTeamProject;
|
||||
@ -53,123 +39,60 @@ public class Fields
|
||||
SystemChangedBy = systemChangedBy;
|
||||
SystemCommentCount = systemCommentCount;
|
||||
SystemTitle = systemTitle;
|
||||
SystemBoardColumn = systemBoardColumn;
|
||||
SystemBoardColumnDone = systemBoardColumnDone;
|
||||
MicrosoftVSTSCommonStateChangeDate = microsoftVSTSCommonStateChangeDate;
|
||||
MicrosoftVSTSCommonActivatedDate = microsoftVSTSCommonActivatedDate;
|
||||
MicrosoftVSTSCommonActivatedBy = microsoftVSTSCommonActivatedBy;
|
||||
MicrosoftVSTSCommonResolvedDate = microsoftVSTSCommonResolvedDate;
|
||||
MicrosoftVSTSCommonResolvedBy = microsoftVSTSCommonResolvedBy;
|
||||
MicrosoftVSTSCommonClosedDate = microsoftVSTSCommonClosedDate;
|
||||
MicrosoftVSTSCommonClosedBy = microsoftVSTSCommonClosedBy;
|
||||
MicrosoftVSTSCommonPriority = microsoftVSTSCommonPriority;
|
||||
MicrosoftVSTSSchedulingEffort = microsoftVSTSSchedulingEffort;
|
||||
MicrosoftVSTSSchedulingTargetDate = microsoftVSTSSchedulingTargetDate;
|
||||
MicrosoftVSTSCommonStackRank = microsoftVSTSCommonStackRank;
|
||||
MicrosoftVSTSCommonValueArea = microsoftVSTSCommonValueArea;
|
||||
WEF81590F0A22C04FEF834957660F5F0C58KanbanColumn = wEF81590F0A22C04FEF834957660F5F0C58KanbanColumn;
|
||||
WEF81590F0A22C04FEF834957660F5F0C58KanbanColumnDone = wEF81590F0A22C04FEF834957660F5F0C58KanbanColumnDone;
|
||||
SystemDescription = systemDescription;
|
||||
SystemHistory = systemHistory;
|
||||
SystemTags = systemTags;
|
||||
Href = href;
|
||||
}
|
||||
|
||||
[JsonPropertyName("System.AreaPath")]
|
||||
public string SystemAreaPath { get; set; } // { init; get; }
|
||||
public string SystemAreaPath { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.TeamProject")]
|
||||
public string SystemTeamProject { get; set; } // { init; get; }
|
||||
public string SystemTeamProject { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.IterationPath")]
|
||||
public string SystemIterationPath { get; set; } // { init; get; }
|
||||
public string SystemIterationPath { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.WorkItemType")]
|
||||
public string SystemWorkItemType { get; set; } // { init; get; }
|
||||
public string SystemWorkItemType { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.State")]
|
||||
public string SystemState { get; set; } // { init; get; }
|
||||
public string SystemState { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.Reason")]
|
||||
public string SystemReason { get; set; } // { init; get; }
|
||||
public string SystemReason { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.AssignedTo")]
|
||||
public User SystemAssignedTo { get; set; } // { init; get; }
|
||||
public SystemAssignedTo SystemAssignedTo { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.CreatedDate")]
|
||||
public DateTime SystemCreatedDate { get; set; } // { init; get; }
|
||||
public DateTime SystemCreatedDate { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.CreatedBy")]
|
||||
public User SystemCreatedBy { get; set; } // { init; get; }
|
||||
public SystemCreatedBy SystemCreatedBy { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.ChangedDate")]
|
||||
public DateTime SystemChangedDate { get; set; } // { init; get; }
|
||||
public DateTime SystemChangedDate { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.ChangedBy")]
|
||||
public User SystemChangedBy { get; set; } // { init; get; }
|
||||
public SystemChangedBy SystemChangedBy { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.CommentCount")]
|
||||
public int SystemCommentCount { get; set; } // { init; get; }
|
||||
public int SystemCommentCount { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.Title")]
|
||||
public string SystemTitle { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.BoardColumn")]
|
||||
public string SystemBoardColumn { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.BoardColumnDone")]
|
||||
public bool SystemBoardColumnDone { get; set; } // { init; get; }
|
||||
public string SystemTitle { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.StateChangeDate")]
|
||||
public DateTime MicrosoftVSTSCommonStateChangeDate { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ActivatedDate")]
|
||||
public DateTime MicrosoftVSTSCommonActivatedDate { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ActivatedBy")]
|
||||
public User MicrosoftVSTSCommonActivatedBy { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ResolvedDate")]
|
||||
public DateTime MicrosoftVSTSCommonResolvedDate { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ResolvedBy")]
|
||||
public User MicrosoftVSTSCommonResolvedBy { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ClosedDate")]
|
||||
public DateTime MicrosoftVSTSCommonClosedDate { get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ClosedBy")]
|
||||
public User MicrosoftVSTSCommonClosedBy { get; }
|
||||
public DateTime MicrosoftVSTSCommonStateChangeDate { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.Priority")]
|
||||
public int MicrosoftVSTSCommonPriority { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Scheduling.Effort")]
|
||||
public double MicrosoftVSTSSchedulingEffort { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Scheduling.TargetDate")]
|
||||
public DateTime MicrosoftVSTSSchedulingTargetDate { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.StackRank")]
|
||||
public double MicrosoftVSTSCommonStackRank { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("Microsoft.VSTS.Common.ValueArea")]
|
||||
public string MicrosoftVSTSCommonValueArea { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("WEF_81590F0A22C04FEF834957660F5F0C58_Kanban.Column")]
|
||||
public string WEF81590F0A22C04FEF834957660F5F0C58KanbanColumn { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("WEF_81590F0A22C04FEF834957660F5F0C58_Kanban.Column.Done")]
|
||||
public bool WEF81590F0A22C04FEF834957660F5F0C58KanbanColumnDone { get; set; } // { init; get; }
|
||||
public int MicrosoftVSTSCommonPriority { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.Description")]
|
||||
public string SystemDescription { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.History")]
|
||||
public string SystemHistory { get; set; } // { init; get; }
|
||||
public string SystemDescription { get; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("System.Tags")]
|
||||
public string SystemTags { get; set; } // { init; get; }
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
public string SystemTags { get; } // { init; get; }
|
||||
}
|
@ -9,5 +9,5 @@ public class Html
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
public string Href { get; } // { init; get; }
|
||||
}
|
@ -6,32 +6,9 @@ public class Links
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Links(
|
||||
Avatar avatar,
|
||||
Self self,
|
||||
WorkItemUpdates workItemUpdates,
|
||||
WorkItemRevisions workItemRevisions,
|
||||
WorkItemComments workItemComments,
|
||||
Html html,
|
||||
WorkItemType workItemType,
|
||||
Fields fields
|
||||
)
|
||||
{
|
||||
Avatar = avatar;
|
||||
Self = self;
|
||||
WorkItemUpdates = workItemUpdates;
|
||||
WorkItemRevisions = workItemRevisions;
|
||||
WorkItemComments = workItemComments;
|
||||
Html = html;
|
||||
WorkItemType = workItemType;
|
||||
Fields = fields;
|
||||
}
|
||||
Avatar avatar
|
||||
) => Avatar = avatar;
|
||||
|
||||
public Avatar Avatar { get; set; } // { init; get; }
|
||||
public Self Self { get; set; } // { init; get; }
|
||||
public WorkItemUpdates WorkItemUpdates { get; set; } // { init; get; }
|
||||
public WorkItemRevisions WorkItemRevisions { get; set; } // { init; get; }
|
||||
public WorkItemComments WorkItemComments { get; set; } // { init; get; }
|
||||
public Html Html { get; set; } // { init; get; }
|
||||
public WorkItemType WorkItemType { get; set; } // { init; get; }
|
||||
public Fields Fields { get; set; } // { init; get; }
|
||||
[JsonPropertyName("avatar")]
|
||||
public Avatar Avatar { get; }
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Root
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Root(
|
||||
int id,
|
||||
int rev,
|
||||
Fields fields,
|
||||
Links links,
|
||||
string url
|
||||
)
|
||||
{
|
||||
Id = id;
|
||||
Rev = rev;
|
||||
Fields = fields;
|
||||
Links = links;
|
||||
Url = url;
|
||||
}
|
||||
|
||||
public int Id { get; set; } // { init; get; }
|
||||
public int Rev { get; set; } // { init; get; }
|
||||
public Fields Fields { get; set; } // { init; get; }
|
||||
|
||||
[JsonPropertyName("_links")]
|
||||
public Links Links { get; set; } // { init; get; }
|
||||
public string Url { get; set; } // { init; get; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Self
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Self(
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
}
|
47
Adaptation/FileHandlers/json/WorkItems/SystemAssignedTo.cs
Normal file
47
Adaptation/FileHandlers/json/WorkItems/SystemAssignedTo.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class SystemAssignedTo
|
||||
{
|
||||
[JsonConstructor]
|
||||
public SystemAssignedTo(
|
||||
string displayName,
|
||||
string url,
|
||||
Links links,
|
||||
string id,
|
||||
string uniqueName,
|
||||
string imageUrl,
|
||||
string descriptor
|
||||
)
|
||||
{
|
||||
DisplayName = displayName;
|
||||
Url = url;
|
||||
Links = links;
|
||||
Id = id;
|
||||
UniqueName = uniqueName;
|
||||
ImageUrl = imageUrl;
|
||||
Descriptor = descriptor;
|
||||
}
|
||||
|
||||
[JsonPropertyName("displayName")]
|
||||
public string DisplayName { get; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; }
|
||||
|
||||
[JsonPropertyName("_links")]
|
||||
public Links Links { get; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; }
|
||||
|
||||
[JsonPropertyName("uniqueName")]
|
||||
public string UniqueName { get; }
|
||||
|
||||
[JsonPropertyName("imageUrl")]
|
||||
public string ImageUrl { get; }
|
||||
|
||||
[JsonPropertyName("descriptor")]
|
||||
public string Descriptor { get; }
|
||||
}
|
47
Adaptation/FileHandlers/json/WorkItems/SystemChangedBy.cs
Normal file
47
Adaptation/FileHandlers/json/WorkItems/SystemChangedBy.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class SystemChangedBy
|
||||
{
|
||||
[JsonConstructor]
|
||||
public SystemChangedBy(
|
||||
string displayName,
|
||||
string url,
|
||||
Links links,
|
||||
string id,
|
||||
string uniqueName,
|
||||
string imageUrl,
|
||||
string descriptor
|
||||
)
|
||||
{
|
||||
DisplayName = displayName;
|
||||
Url = url;
|
||||
Links = links;
|
||||
Id = id;
|
||||
UniqueName = uniqueName;
|
||||
ImageUrl = imageUrl;
|
||||
Descriptor = descriptor;
|
||||
}
|
||||
|
||||
[JsonPropertyName("displayName")]
|
||||
public string DisplayName { get; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; }
|
||||
|
||||
[JsonPropertyName("_links")]
|
||||
public Links Links { get; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; }
|
||||
|
||||
[JsonPropertyName("uniqueName")]
|
||||
public string UniqueName { get; }
|
||||
|
||||
[JsonPropertyName("imageUrl")]
|
||||
public string ImageUrl { get; }
|
||||
|
||||
[JsonPropertyName("descriptor")]
|
||||
public string Descriptor { get; }
|
||||
}
|
47
Adaptation/FileHandlers/json/WorkItems/SystemCreatedBy.cs
Normal file
47
Adaptation/FileHandlers/json/WorkItems/SystemCreatedBy.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class SystemCreatedBy
|
||||
{
|
||||
[JsonConstructor]
|
||||
public SystemCreatedBy(
|
||||
string displayName,
|
||||
string url,
|
||||
Links links,
|
||||
string id,
|
||||
string uniqueName,
|
||||
string imageUrl,
|
||||
string descriptor
|
||||
)
|
||||
{
|
||||
DisplayName = displayName;
|
||||
Url = url;
|
||||
Links = links;
|
||||
Id = id;
|
||||
UniqueName = uniqueName;
|
||||
ImageUrl = imageUrl;
|
||||
Descriptor = descriptor;
|
||||
}
|
||||
|
||||
[JsonPropertyName("displayName")]
|
||||
public string DisplayName { get; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; }
|
||||
|
||||
[JsonPropertyName("_links")]
|
||||
public Links Links { get; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; }
|
||||
|
||||
[JsonPropertyName("uniqueName")]
|
||||
public string UniqueName { get; }
|
||||
|
||||
[JsonPropertyName("imageUrl")]
|
||||
public string ImageUrl { get; }
|
||||
|
||||
[JsonPropertyName("descriptor")]
|
||||
public string Descriptor { get; }
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class User
|
||||
{
|
||||
[JsonConstructor]
|
||||
public User(
|
||||
string displayName,
|
||||
string url,
|
||||
Links links,
|
||||
string id,
|
||||
string uniqueName,
|
||||
string imageUrl,
|
||||
string descriptor
|
||||
)
|
||||
{
|
||||
DisplayName = displayName;
|
||||
Url = url;
|
||||
Links = links;
|
||||
Id = id;
|
||||
UniqueName = uniqueName;
|
||||
ImageUrl = imageUrl;
|
||||
Descriptor = descriptor;
|
||||
}
|
||||
|
||||
public string DisplayName { get; set; } // { init; get; }
|
||||
public string Url { get; set; } // { init; get; }
|
||||
public Links Links { get; set; } // { init; get; }
|
||||
public string Id { get; set; } // { init; get; }
|
||||
public string UniqueName { get; set; } // { init; get; }
|
||||
public string ImageUrl { get; set; } // { init; get; }
|
||||
public string Descriptor { get; set; } // { init; get; }
|
||||
}
|
32
Adaptation/FileHandlers/json/WorkItems/Value.cs
Normal file
32
Adaptation/FileHandlers/json/WorkItems/Value.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class Value
|
||||
{
|
||||
[JsonConstructor]
|
||||
public Value(
|
||||
int id,
|
||||
int rev,
|
||||
Fields fields,
|
||||
string url
|
||||
)
|
||||
{
|
||||
Id = id;
|
||||
Rev = rev;
|
||||
Fields = fields;
|
||||
Url = url;
|
||||
}
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; }
|
||||
|
||||
[JsonPropertyName("rev")]
|
||||
public int Rev { get; }
|
||||
|
||||
[JsonPropertyName("fields")]
|
||||
public Fields Fields { get; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class WorkItemComments
|
||||
{
|
||||
[JsonConstructor]
|
||||
public WorkItemComments(
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class WorkItemRevisions
|
||||
{
|
||||
[JsonConstructor]
|
||||
public WorkItemRevisions(
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class WorkItemType
|
||||
{
|
||||
[JsonConstructor]
|
||||
public WorkItemType(
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||
|
||||
public class WorkItemUpdates
|
||||
{
|
||||
[JsonConstructor]
|
||||
public WorkItemUpdates(
|
||||
string href
|
||||
) => Href = href;
|
||||
|
||||
public string Href { get; set; } // { init; get; }
|
||||
}
|
163
Adaptation/MESAFIBACKLOG-Development.yml
Normal file
163
Adaptation/MESAFIBACKLOG-Development.yml
Normal file
@ -0,0 +1,163 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- Development
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MESAFIBACKLOG-Development
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net7.0
|
||||
echo %coreVersion%
|
||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||
echo $(CoreVersion)
|
||||
displayName: CoreVersion
|
||||
|
||||
- script: |
|
||||
set configuration=Debug
|
||||
echo %configuration%
|
||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||
echo $(Configuration)
|
||||
displayName: Configuration
|
||||
|
||||
- script: |
|
||||
set nugetSource=https://messa017.infineon.com/v3/index.json
|
||||
echo %nugetSource%
|
||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||
echo $(NugetSource)
|
||||
displayName: NugetSource
|
||||
|
||||
- script: |
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: GitCommitSeven
|
||||
|
||||
- script: |
|
||||
echo $(Build.BuildId)
|
||||
echo $(Build.Reason)
|
||||
echo $(Build.Repository.Id)
|
||||
echo $(Build.Repository.Name)
|
||||
echo $(Build.SourceVersion)
|
||||
echo $(CoreVersion)
|
||||
echo $(Configuration)
|
||||
echo $(NugetSource)
|
||||
echo $(GitCommitSeven)
|
||||
REM echo $(pipelinePassword)
|
||||
displayName: "Echo Check"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||
displayName: "Nuget Clear"
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Safe storage of app secrets - Adaptation"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Build - Adaptation"
|
||||
|
||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
||||
displayName: "PowerShell Script"
|
||||
continueOnError: true
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Test"
|
||||
|
||||
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
||||
displayName: "Move Results"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Tool Restore"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
enabled: false
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results **/*.trx"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "**/*.trx"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results */coverage.cobertura.xml"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "*/coverage.cobertura.xml"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||
|
||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||
displayName: "Create work item"
|
||||
inputs:
|
||||
teamProject: "Mesa_FI"
|
||||
workItemType: Bug
|
||||
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
|
||||
assignedTo: "$(Build.RequestedForId)"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Publish"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
|
||||
displayName: "MSBuild Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
|
||||
displayName: MSBuild
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
||||
displayName: "Commit Id"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\Framework4.8'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Tests"
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Adaptation"
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
||||
displayName: "Force Fail"
|
||||
enabled: false
|
@ -11,7 +11,7 @@
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VSTestLogger>trx</VSTestLogger>
|
||||
@ -33,51 +33,8 @@
|
||||
<DefineConstants>Linux</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="7.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.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
||||
<PackageReference Include="Instances" Version="2.0.0" />
|
||||
<PackageReference Include="RoboSharp" Version="1.2.8" />
|
||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.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>
|
||||
@ -85,6 +42,42 @@
|
||||
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.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.4" />
|
||||
<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.TeamFoundationServer.Client" Version="16.205.1" />
|
||||
<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="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="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="Tesseract" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="appsettings.json">
|
||||
|
161
Adaptation/MESAFIBACKLOG.yml
Normal file
161
Adaptation/MESAFIBACKLOG.yml
Normal file
@ -0,0 +1,161 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MESAFIBACKLOG
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net7.0
|
||||
echo %coreVersion%
|
||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||
echo $(CoreVersion)
|
||||
displayName: CoreVersion
|
||||
|
||||
- script: |
|
||||
set configuration=Release
|
||||
echo %configuration%
|
||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||
echo $(Configuration)
|
||||
displayName: Configuration
|
||||
|
||||
- script: |
|
||||
set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json
|
||||
echo %nugetSource%
|
||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||
echo $(NugetSource)
|
||||
displayName: NugetSource
|
||||
|
||||
- script: |
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: GitCommitSeven
|
||||
|
||||
- script: |
|
||||
echo $(Build.BuildId)
|
||||
echo $(Build.Reason)
|
||||
echo $(Build.Repository.Id)
|
||||
echo $(Build.Repository.Name)
|
||||
echo $(Build.SourceVersion)
|
||||
echo $(CoreVersion)
|
||||
echo $(Configuration)
|
||||
echo $(NugetSource)
|
||||
echo $(GitCommitSeven)
|
||||
REM echo $(pipelinePassword)
|
||||
displayName: "Echo Check"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||
displayName: "Nuget Clear"
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Safe storage of app secrets - Adaptation"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Build - Adaptation"
|
||||
|
||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
||||
displayName: "PowerShell Script"
|
||||
continueOnError: true
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Test"
|
||||
|
||||
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
||||
displayName: "Move Results"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Tool Restore"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
enabled: false
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results **/*.trx"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "**/*.trx"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results */coverage.cobertura.xml"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "*/coverage.cobertura.xml"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)/TestResults"
|
||||
|
||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||
displayName: "Create work item"
|
||||
inputs:
|
||||
teamProject: "Mesa_FI"
|
||||
workItemType: Bug
|
||||
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
|
||||
assignedTo: "$(Build.RequestedForId)"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Publish"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
|
||||
displayName: "MSBuild Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
|
||||
displayName: MSBuild
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
||||
displayName: "Commit Id"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\Framework4.8'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
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'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
|
||||
OverWrite: true
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Tests"
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Adaptation"
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
||||
displayName: "Force Fail"
|
||||
enabled: false
|
@ -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);
|
||||
@ -266,13 +266,14 @@ public class FileRead : Properties.IFileRead
|
||||
string rds;
|
||||
string dateValue;
|
||||
string rdsPlaceholder = "%RDS%";
|
||||
string mesEntityPlaceholder = "%MesEntity%";
|
||||
if (!descriptions.Any() || 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 +285,7 @@ public class FileRead : Properties.IFileRead
|
||||
continue;
|
||||
datePlaceholder = string.Concat('%', segment, '%');
|
||||
}
|
||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(datePlaceholder, dateValue));
|
||||
result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue));
|
||||
}
|
||||
if (result.Contains('%'))
|
||||
throw new Exception("Placeholder exists!");
|
||||
|
@ -59,7 +59,7 @@ public class Logistics : ILogistics
|
||||
throw new Exception();
|
||||
_NullData = fileRead.NullData;
|
||||
_FileInfo = new(reportFullPath);
|
||||
DateTime dateTime = new (_FileInfo.LastWriteTime.Ticks + tickOffset);
|
||||
DateTime dateTime = new(_FileInfo.LastWriteTime.Ticks + tickOffset);
|
||||
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
|
||||
dateTime = dateTime.AddTicks(-1);
|
||||
_JobID = fileRead.CellInstanceName;
|
||||
|
@ -30,7 +30,7 @@ public partial class WS
|
||||
};
|
||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson);
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
}
|
||||
if (!results.Success)
|
||||
results.Errors.Add(results.ToString());
|
||||
@ -44,8 +44,7 @@ public partial class WS
|
||||
_ = stringBuilder.AppendLine(exception.Message);
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
if (results.Errors is null)
|
||||
results.Errors = new List<string>();
|
||||
results.Errors ??= new List<string>();
|
||||
results.Errors.Add(stringBuilder.ToString());
|
||||
}
|
||||
return new(resultsJson, results);
|
||||
|
@ -91,8 +91,7 @@ public class ProcessDataStandardFormat
|
||||
string segment;
|
||||
List<string> body = new();
|
||||
StringBuilder logistics = new();
|
||||
if (lines is null)
|
||||
lines = File.ReadAllLines(reportFullPath);
|
||||
lines ??= File.ReadAllLines(reportFullPath);
|
||||
string[] segments;
|
||||
if (lines.Length < 7)
|
||||
segments = Array.Empty<string>();
|
||||
@ -276,8 +275,7 @@ public class ProcessDataStandardFormat
|
||||
public static string GetLines(Logistics logistics, Properties.IScopeInfo scopeInfo, List<string> names, Dictionary<string, List<string>> keyValuePairs, string dateFormat, string timeFormat, List<string> pairedParameterNames, bool useDateTimeFromSequence = true, string format = "", List<string> ignoreParameterNames = null)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (ignoreParameterNames is null)
|
||||
ignoreParameterNames = new List<string>();
|
||||
ignoreParameterNames ??= new List<string>();
|
||||
if (useDateTimeFromSequence && !string.IsNullOrEmpty(format))
|
||||
throw new Exception();
|
||||
else if (!useDateTimeFromSequence && string.IsNullOrEmpty(format))
|
||||
@ -318,7 +316,7 @@ public class ProcessDataStandardFormat
|
||||
_ = line.Append(logistics.DateTimeFromSequence.ToString(timeFormat));
|
||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnDate && keyValuePair.Value[r].Length == format.Length)
|
||||
_ = line.Append(DateTime.ParseExact(keyValuePair.Value[r], format, CultureInfo.InvariantCulture).ToString(dateFormat));
|
||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.ContainsKey(string.Concat(keyValuePair.Key, firstDuplicate)) && keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r].Length == format.Length)
|
||||
else if (!useDateTimeFromSequence && keyValuePair.Key == columnTime && keyValuePairs.TryGetValue(string.Concat(keyValuePair.Key, firstDuplicate), out List<string> value) && value[r].Length == format.Length)
|
||||
_ = line.Append(DateTime.ParseExact(keyValuePairs[string.Concat(keyValuePair.Key, firstDuplicate)][r], format, CultureInfo.InvariantCulture).ToString(timeFormat));
|
||||
else if (string.IsNullOrEmpty(keyValuePair.Value[r]) || keyValuePair.Value[r] == nullData)
|
||||
_ = line.Append(nullData);
|
||||
@ -357,8 +355,7 @@ public class ProcessDataStandardFormat
|
||||
if (string.IsNullOrEmpty(lines[i]))
|
||||
continue;
|
||||
segments = lines[i].Split(inputSeparator);
|
||||
if (currentGroup is null)
|
||||
currentGroup = segments.Length;
|
||||
currentGroup ??= segments.Length;
|
||||
if (segments.Length != currentGroup)
|
||||
{
|
||||
currentGroup = segments.Length;
|
||||
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG_EQPT : EAFLoggingUnitTesting
|
||||
@ -33,8 +33,7 @@ public class BACKLOG_EQPT : EAFLoggingUnitTesting
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new BACKLOG_EQPT(testContext);
|
||||
EAFLoggingUnitTesting ??= new BACKLOG_EQPT(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -44,19 +43,17 @@ public class BACKLOG_EQPT : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG_EQPT__ConvertExcelToJson()
|
||||
public void Staging__v2_49_0__BACKLOG_EQPT__DownloadExcelFile()
|
||||
{
|
||||
string check = "*.xlsx";
|
||||
string check = ".xlsx";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_43_0;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG : EAFLoggingUnitTesting
|
||||
@ -33,8 +33,7 @@ public class BACKLOG : EAFLoggingUnitTesting
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
EAFLoggingUnitTesting = new BACKLOG(testContext);
|
||||
EAFLoggingUnitTesting ??= new BACKLOG(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
@ -44,19 +43,17 @@ public class BACKLOG : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
if (EAFLoggingUnitTesting.Logger is not null)
|
||||
EAFLoggingUnitTesting.Logger.LogInformation("Cleanup");
|
||||
if (EAFLoggingUnitTesting is not null)
|
||||
EAFLoggingUnitTesting.Dispose();
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG__json()
|
||||
public void Staging__v2_49_0__BACKLOG__ConvertExcelToJson()
|
||||
{
|
||||
string check = "*.json";
|
||||
string check = "*.xlsx";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
@ -0,0 +1,63 @@
|
||||
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_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class MESAFIBACKLOG : EAFLoggingUnitTesting
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static string DummyRoot { get; private set; }
|
||||
internal static MESAFIBACKLOG EAFLoggingUnitTesting { get; private set; }
|
||||
|
||||
static MESAFIBACKLOG() => DummyRoot = @"\\messv02ecc1.ec.local\EC_Characterization_Si\Dummy";
|
||||
|
||||
public MESAFIBACKLOG() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
|
||||
{
|
||||
if (EAFLoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MESAFIBACKLOG(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
EAFLoggingUnitTesting ??= new MESAFIBACKLOG(testContext);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize"));
|
||||
string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName);
|
||||
File.WriteAllText(fileNameAndText[0], fileNameAndText[1]);
|
||||
File.WriteAllText(fileNameAndText[2], fileNameAndText[3]);
|
||||
}
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__MESAFIBACKLOG__json()
|
||||
{
|
||||
string check = "*.json";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_0;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_0.BACKLOG_EQPT _BACKLOG_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_0.BACKLOG_EQPT.ClassInitialize(testContext);
|
||||
_BACKLOG_EQPT = CreateSelfDescription.Staging.v2_43_0.BACKLOG_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG_EQPT__ConvertExcelToJson() => _BACKLOG_EQPT.Staging__v2_43_0__BACKLOG_EQPT__ConvertExcelToJson();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG_EQPT__ConvertExcelToJson637961178824025822__Normal()
|
||||
{
|
||||
string check = "*.xlsx";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_BACKLOG_EQPT.Staging__v2_43_0__BACKLOG_EQPT__ConvertExcelToJson();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_BACKLOG_EQPT.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _BACKLOG_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _BACKLOG_EQPT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
}
|
||||
|
||||
}
|
54
Adaptation/_Tests/Extract/Staging/v2.49.0/BACKLOG-EQPT.cs
Normal file
54
Adaptation/_Tests/Extract/Staging/v2.49.0/BACKLOG-EQPT.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG_EQPT
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_49_0.BACKLOG_EQPT _BACKLOG_EQPT;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_49_0.BACKLOG_EQPT.ClassInitialize(testContext);
|
||||
_BACKLOG_EQPT = CreateSelfDescription.Staging.v2_49_0.BACKLOG_EQPT.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__BACKLOG_EQPT__DownloadExcelFile() => _BACKLOG_EQPT.Staging__v2_49_0__BACKLOG_EQPT__DownloadExcelFile();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__BACKLOG_EQPT__DownloadExcelFile637961178824025822__Normal()
|
||||
{
|
||||
string check = ".xlsx";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_BACKLOG_EQPT.Staging__v2_49_0__BACKLOG_EQPT__DownloadExcelFile();
|
||||
_ = _BACKLOG_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
for (int i = 0; i < int.MinValue; i++)
|
||||
Thread.Sleep(500);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,7 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_43_0;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class BACKLOG
|
||||
@ -17,31 +17,38 @@ public class BACKLOG
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_43_0.BACKLOG _BACKLOG;
|
||||
private static CreateSelfDescription.Staging.v2_49_0.BACKLOG _BACKLOG;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_43_0.BACKLOG.ClassInitialize(testContext);
|
||||
_BACKLOG = CreateSelfDescription.Staging.v2_43_0.BACKLOG.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_49_0.BACKLOG.ClassInitialize(testContext);
|
||||
_BACKLOG = CreateSelfDescription.Staging.v2_49_0.BACKLOG.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG__json() => _BACKLOG.Staging__v2_43_0__BACKLOG__json();
|
||||
|
||||
#if true
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_43_0__BACKLOG__json637961251829737445__Normal()
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
string check = "*.json";
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__BACKLOG__ConvertExcelToJson() => _BACKLOG.Staging__v2_49_0__BACKLOG__ConvertExcelToJson();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__BACKLOG__ConvertExcelToJson637961178824025822__Normal()
|
||||
{
|
||||
string check = "*.xlsx";
|
||||
bool validatePDSF = false;
|
||||
_BACKLOG.Staging__v2_43_0__BACKLOG__json();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_BACKLOG.Staging__v2_49_0__BACKLOG__ConvertExcelToJson();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_BACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _BACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _BACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
@ -49,6 +56,7 @@ public class BACKLOG
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
62
Adaptation/_Tests/Extract/Staging/v2.49.0/MESAFIBACKLOG.cs
Normal file
62
Adaptation/_Tests/Extract/Staging/v2.49.0/MESAFIBACKLOG.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using Adaptation.Shared;
|
||||
using Adaptation.Shared.Methods;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_49_0;
|
||||
|
||||
[TestClass]
|
||||
public class MESAFIBACKLOG
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_49_0.MESAFIBACKLOG _MESAFIBACKLOG;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_49_0.MESAFIBACKLOG.ClassInitialize(testContext);
|
||||
_MESAFIBACKLOG = CreateSelfDescription.Staging.v2_49_0.MESAFIBACKLOG.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__MESAFIBACKLOG__json() => _MESAFIBACKLOG.Staging__v2_49_0__MESAFIBACKLOG__json();
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_49_0__MESAFIBACKLOG__json637961251829737445__Normal()
|
||||
{
|
||||
string check = "*.json";
|
||||
bool validatePDSF = false;
|
||||
_MESAFIBACKLOG.Staging__v2_49_0__MESAFIBACKLOG__json();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
|
||||
Assert.IsNotNull(extractResult.Item3);
|
||||
Assert.IsNotNull(extractResult.Item4);
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -621,14 +621,10 @@ public class AdaptationTesting : ISMTP
|
||||
result = JsonSerializer.Deserialize<FileConnectorConfiguration>(json, jsonSerializerOptions);
|
||||
if (string.IsNullOrEmpty(result.SourceFileFilter))
|
||||
result.SourceFileFilter = string.Empty;
|
||||
if (result.ErrorTargetFileLocation is null)
|
||||
result.ErrorTargetFileLocation = string.Empty;
|
||||
if (result.SourceFileLocation is null)
|
||||
result.SourceFileLocation = string.Empty;
|
||||
if (result.TargetFileLocation is null)
|
||||
result.TargetFileLocation = string.Empty;
|
||||
if (result.FolderAgeCheckIndividualSubFolders is null)
|
||||
result.FolderAgeCheckIndividualSubFolders = false;
|
||||
result.ErrorTargetFileLocation ??= string.Empty;
|
||||
result.SourceFileLocation ??= string.Empty;
|
||||
result.TargetFileLocation ??= string.Empty;
|
||||
result.FolderAgeCheckIndividualSubFolders ??= false;
|
||||
result.ConnectionSettings = new List<ConnectionSetting>();
|
||||
result.SourceFileFilters = result.SourceFileFilter.Split('|').ToList();
|
||||
if (componentsCellComponentCellComponent.Equipment?.ConnectionSettings is not null)
|
||||
@ -988,7 +984,7 @@ public class AdaptationTesting : ISMTP
|
||||
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable
|
||||
base(testContext, declaringType)
|
||||
{
|
||||
_LoggerFactory = new LoggerFactory();
|
||||
if (testContext is null || declaringType is null)
|
||||
if (testContext is null || declaringType is null || _IsEnvironment is null)
|
||||
{
|
||||
_ConfigurationRoot = null;
|
||||
_DefaultLogLevel = null;
|
||||
|
@ -29,41 +29,46 @@ public class UnitTesting
|
||||
{
|
||||
string waitFor = "\"WaitFor\":";
|
||||
string projectDirectory = GetProjectDirectory(testContext);
|
||||
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
|
||||
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
if (!Directory.Exists(vsCodeDirectory))
|
||||
_ = Directory.CreateDirectory(vsCodeDirectory);
|
||||
string launchText = GetLaunchText();
|
||||
File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText);
|
||||
if (_HasWaitForProperty)
|
||||
if (string.IsNullOrEmpty(projectDirectory))
|
||||
_IsEnvironment = null;
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
|
||||
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
if (!Directory.Exists(vsCodeDirectory))
|
||||
_ = Directory.CreateDirectory(vsCodeDirectory);
|
||||
string launchText = GetLaunchText();
|
||||
File.WriteAllText(Path.Combine(vsCodeDirectory, "launch.json"), launchText);
|
||||
if (_HasWaitForProperty)
|
||||
{
|
||||
if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
if (!_TestContextPropertiesAsJson.Contains($"{waitFor} \"Debugger.IsAttached\"") || Debugger.IsAttached)
|
||||
break;
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
MethodBase methodBase = declaringType.GetMethod(testContext.TestName);
|
||||
if (methodBase is not null)
|
||||
{
|
||||
TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute<TestCategoryAttribute>();
|
||||
if (testCategoryAttribute is not null)
|
||||
MethodBase methodBase = declaringType.GetMethod(testContext.TestName);
|
||||
if (methodBase is not null)
|
||||
{
|
||||
foreach (string testCategory in testCategoryAttribute.TestCategories)
|
||||
_IsEnvironment = new IsEnvironment(testCategory);
|
||||
TestCategoryAttribute testCategoryAttribute = methodBase.GetCustomAttribute<TestCategoryAttribute>();
|
||||
if (testCategoryAttribute is not null)
|
||||
{
|
||||
foreach (string testCategory in testCategoryAttribute.TestCategories)
|
||||
_IsEnvironment = new IsEnvironment(testCategory);
|
||||
}
|
||||
}
|
||||
_IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
}
|
||||
if (_IsEnvironment is null)
|
||||
_IsEnvironment = new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
_IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetProjectDirectory(TestContext testContext)
|
||||
{
|
||||
string result;
|
||||
string[] checkFiles = null;
|
||||
string[] checkFiles;
|
||||
result = Path.GetDirectoryName(testContext.DeploymentDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
@ -74,8 +79,6 @@ public class UnitTesting
|
||||
break;
|
||||
result = Path.GetDirectoryName(result);
|
||||
}
|
||||
if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any())
|
||||
throw new Exception(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -34,10 +34,17 @@ public class BACKLOG : LoggingUnitTesting, IDisposable
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
private static void NonThrowTryCatch()
|
||||
{
|
||||
try
|
||||
{ throw new Exception(); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestDateTime()
|
||||
{
|
||||
@ -45,7 +52,7 @@ public class BACKLOG : LoggingUnitTesting, IDisposable
|
||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -55,8 +62,8 @@ public class BACKLOG : LoggingUnitTesting, IDisposable
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("BACKLOG", "v2.43.0"),
|
||||
new("BACKLOG-EQPT", "v2.43.0"),
|
||||
new("BACKLOG", "v2.49.0"),
|
||||
new("BACKLOG-EQPT", "v2.49.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
@ -68,6 +75,7 @@ public class BACKLOG : LoggingUnitTesting, IDisposable
|
||||
}
|
||||
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
NonThrowTryCatch();
|
||||
}
|
||||
|
||||
}
|
@ -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();
|
||||
|
@ -11,7 +11,8 @@
|
||||
<RootNamespace>MESAFIBACKLOG</RootNamespace>
|
||||
<AssemblyName>MESAFIBACKLOG</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<RuntimeIdentifier Condition="'$(Configuration)' == 'Debug'">win-x86</RuntimeIdentifier>
|
||||
<RuntimeIdentifier Condition="'$(Configuration)' == 'Release'">win</RuntimeIdentifier>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@ -102,11 +103,11 @@
|
||||
<Compile Include="Adaptation\FileHandlers\ConvertExcelToJson\FIBacklogMesa.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\ConvertExcelToJson\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\ConvertExcelToJson\ProcessData.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\DownloadExcelFile\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\Dummy\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\IQSSi\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\ProcessData.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\ViewModels\WorkItem.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WIQL\Column.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WIQL\Field.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WIQL\Root.cs" />
|
||||
@ -116,13 +117,10 @@
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Fields.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Html.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Links.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Root.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Self.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\User.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\WorkItemComments.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\WorkItemRevisions.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\WorkItemType.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\WorkItemUpdates.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\SystemAssignedTo.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\SystemChangedBy.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\SystemCreatedBy.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Value.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\MoveMatchingFiles\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewerAttachments\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />
|
||||
@ -176,7 +174,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.EAF.Runtime">
|
||||
<Version>2.47.0</Version>
|
||||
<Version>2.49.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.TeamFoundationServer.Client">
|
||||
<Version>16.205.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json">
|
||||
<Version>6.0.3</Version>
|
||||
|
@ -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.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.47.0.0")]
|
||||
[assembly: AssemblyVersion("2.49.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.49.0.0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user