Compare commits
	
		
			2 Commits
		
	
	
		
			42c264e68f
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 3c072d177a | |||
| 74461c147d | 
| @ -109,7 +109,7 @@ dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template | ||||
| dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name | ||||
| dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); | ||||
| dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. | ||||
| dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary | ||||
| dotnet_diagnostic.IDE0005.severity = none # Using directive is unnecessary | ||||
| dotnet_diagnostic.IDE0028.severity = none # IDE0028: Collection initialization can be simplified | ||||
| dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031) | ||||
| dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed | ||||
| @ -121,6 +121,7 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]cs | ||||
| dotnet_diagnostic.IDE0300.severity = none # IDE0300: Collection initialization can be simplified | ||||
| dotnet_diagnostic.IDE0301.severity = none #IDE0301: Collection initialization can be simplified | ||||
| dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified | ||||
| dotnet_diagnostic.MSTEST0015.severity = none # MSTEST0015: Test method {method} should not be ignored | ||||
| dotnet_diagnostic.MSTEST0037.severity = error # MSTEST0037: Use proper 'Assert' methods | ||||
| dotnet_diagnostic.SYSLIB1045.severity = none # SYSLIB1045: diagnostics for regex source generation | ||||
| dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning | ||||
|  | ||||
							
								
								
									
										32
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								Adaptation/.vscode/launch.json
									
									
									
									
										vendored
									
									
								
							| @ -4,33 +4,7 @@ | ||||
|       "name": ".NET Core Attach", | ||||
|       "type": "coreclr", | ||||
|       "request": "attach", | ||||
|       "processId": 22868 | ||||
|     }, | ||||
|     { | ||||
|       "type": "node", | ||||
|       "request": "launch", | ||||
|       "name": "node Launch Current Opened File", | ||||
|       "program": "${file}" | ||||
|     }, | ||||
|     { | ||||
|       "type": "bun", | ||||
|       "internalConsoleOptions": "neverOpen", | ||||
|       "request": "launch", | ||||
|       "name": "Debug File", | ||||
|       "program": "${file}", | ||||
|       "cwd": "${workspaceFolder}", | ||||
|       "stopOnEntry": false, | ||||
|       "watchMode": false | ||||
|     }, | ||||
|     { | ||||
|       "type": "bun", | ||||
|       "internalConsoleOptions": "neverOpen", | ||||
|       "request": "launch", | ||||
|       "name": "Run File", | ||||
|       "program": "${file}", | ||||
|       "cwd": "${workspaceFolder}", | ||||
|       "noDebug": true, | ||||
|       "watchMode": false | ||||
|     }, | ||||
|       "processId": 20292 | ||||
|     } | ||||
|   ] | ||||
| } | ||||
| } | ||||
|  | ||||
							
								
								
									
										133
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										133
									
								
								Adaptation/.vscode/tasks.json
									
									
									
									
										vendored
									
									
								
							| @ -1,19 +1,134 @@ | ||||
| { | ||||
|     "version": "2.0.0", | ||||
|     "inputs": [ | ||||
|         { | ||||
|             "default": "Development", | ||||
|             "description": "Which ASP Net Core Environment?", | ||||
|             "id": "ASPNETCORE_ENVIRONMENT", | ||||
|             "options": [ | ||||
|                 "Development", | ||||
|                 "Production" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{AssemblyTitle}", | ||||
|             "description": "What Assembly Title?", | ||||
|             "id": "AssemblyTitle", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{Build.BuildId}", | ||||
|             "description": "Which Build BuildId?", | ||||
|             "id": "Build.BuildId", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{Build.Reason}", | ||||
|             "description": "Which Build Reason?", | ||||
|             "id": "Build.Reason", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{Build.Repository.Id}", | ||||
|             "description": "Which Build Repository Id?", | ||||
|             "id": "Build.Repository.Id", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{Build.Repository.Name}", | ||||
|             "description": "Which Build Repository Name?", | ||||
|             "id": "Build.Repository.Name", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{Build.SourceVersion}", | ||||
|             "description": "Which Build Source Version?", | ||||
|             "id": "Build.SourceVersion", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "Debug", | ||||
|             "description": "Which Configuration?", | ||||
|             "id": "Configuration", | ||||
|             "options": [ | ||||
|                 "Debug", | ||||
|                 "Release" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "net8.0", | ||||
|             "description": "Which Core Version?", | ||||
|             "id": "CoreVersion", | ||||
|             "options": [ | ||||
|                 "net8.0" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", | ||||
|             "description": "Which MS Build?", | ||||
|             "id": "MSBuild", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/", | ||||
|             "description": "Which Nuget Source?", | ||||
|             "id": "NugetSource", | ||||
|             "type": "promptString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "win-x64", | ||||
|             "description": "Which Runtime?", | ||||
|             "id": "Runtime", | ||||
|             "options": [ | ||||
|                 "win-x64", | ||||
|                 "win-x32", | ||||
|                 "linux-x64", | ||||
|                 "linux-x32" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "L:/", | ||||
|             "description": "Which System DefaultWorkingDirectory?", | ||||
|             "id": "System.DefaultWorkingDirectory", | ||||
|             "options": [ | ||||
|                 "L:/", | ||||
|                 "D:/", | ||||
|                 "C:/" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "v4.8", | ||||
|             "description": "Which Core Target Framework Version?", | ||||
|             "id": "TargetFrameworkVersion", | ||||
|             "options": [ | ||||
|                 "v4.8" | ||||
|             ], | ||||
|             "type": "pickString" | ||||
|         }, | ||||
|         { | ||||
|             "default": "{UserSecretsId}", | ||||
|             "description": "Which Core User Secrets Id?", | ||||
|             "id": "UserSecretsId", | ||||
|             "type": "promptString" | ||||
|         } | ||||
|     ], | ||||
|     "tasks": [ | ||||
|         { | ||||
|             "label": "Build", | ||||
|             "command": "dotnet", | ||||
|             "type": "process", | ||||
|             "args": [ | ||||
|                 "build", | ||||
|                 "/property:GenerateFullPaths=true", | ||||
|                 "/consoleloggerparameters:NoSummary" | ||||
|                 "build" | ||||
|             ], | ||||
|             "problemMatcher": "$msCompile" | ||||
|         }, | ||||
|         { | ||||
|             "label": "Test-Debug", | ||||
|             "label": "Test Debug", | ||||
|             "command": "dotnet", | ||||
|             "type": "process", | ||||
|             "args": [ | ||||
| @ -24,7 +139,7 @@ | ||||
|             "problemMatcher": "$msCompile" | ||||
|         }, | ||||
|         { | ||||
|             "label": "Test-Release", | ||||
|             "label": "Test Release", | ||||
|             "command": "dotnet", | ||||
|             "type": "process", | ||||
|             "args": [ | ||||
| @ -50,7 +165,7 @@ | ||||
|             "problemMatcher": "$msCompile" | ||||
|         }, | ||||
|         { | ||||
|             "label": "Format-Whitespaces", | ||||
|             "label": "Format Whitespaces", | ||||
|             "command": "dotnet", | ||||
|             "type": "process", | ||||
|             "args": [ | ||||
| @ -87,13 +202,13 @@ | ||||
|             "problemMatcher": "$msCompile" | ||||
|         }, | ||||
|         { | ||||
|             "label": "Project", | ||||
|             "label": "Code Project", | ||||
|             "type": "shell", | ||||
|             "command": "code ../MESAFIBACKLOG.csproj", | ||||
|             "problemMatcher": [] | ||||
|         }, | ||||
|         { | ||||
|             "label": "Readme", | ||||
|             "label": "Code Read Me", | ||||
|             "type": "shell", | ||||
|             "command": "code ../README.md", | ||||
|             "problemMatcher": [] | ||||
| @ -113,7 +228,7 @@ | ||||
|             "problemMatcher": [] | ||||
|         }, | ||||
|         { | ||||
|             "label": "Git Config", | ||||
|             "label": "Code Git Config", | ||||
|             "type": "shell", | ||||
|             "command": "code ../.git/config", | ||||
|             "problemMatcher": [] | ||||
|  | ||||
| @ -189,7 +189,8 @@ public class FileRead : Shared.FileRead, IFileRead | ||||
|                            timeCriticality: fields.MicrosoftVSTSCommonTimeCriticality is null or 0 ? null : (long)fields.MicrosoftVSTSCommonTimeCriticality, | ||||
|                            title: fields.SystemTitle.Trim(), | ||||
|                            violation: null, | ||||
|                            weightedShortestJobFirst: fields.CustomWSJF is null or 0 ? null : (long)fields.CustomWSJF, | ||||
|                            weightedShortestJobFirst: fields.CustomWSJF is null or 0 ? null : fields.CustomWSJF, | ||||
|                            weightedShortestJobFirstFibonacci: fields.CustomWSJFFib is null or 0 ? null : fields.CustomWSJFFib, | ||||
|                            workItemType: fields.SystemWorkItemType); | ||||
|             results.Add(workItem.Id, workItem); | ||||
|         } | ||||
|  | ||||
| @ -142,8 +142,8 @@ function updateRecordCoD(b: any, r: any, t: any, c: any, e: any, w: any, workIte | ||||
|             let effort = workItem.Effort; | ||||
|             let businessValue = workItem.BusinessValue; | ||||
|             let timeCriticality = workItem.TimeCriticality; | ||||
|             let weightedShortestJobFirst = workItem.WeightedShortestJobFirst.toFixed(2); | ||||
|             let riskReductionMinusOpportunityEnablement = workItem.RiskReductionMinusOpportunityEnablement; | ||||
|             let weightedShortestJobFirst = workItem.WeightedShortestJobFirst == undefined ? null : workItem.WeightedShortestJobFirst.toFixed(2); | ||||
|             workItem.CumulativeStoryPoints = ' '; | ||||
|             workItem.TotalStoryPoints = totalStoryPoints + ' User Story Point(s)'; | ||||
|             workItem.AbsoluteDelta = data.Effort == undefined || data.Effort.FibonacciAverage == undefined || totalStoryPoints == undefined || totalStoryPoints === 0 ? ' ' : round(Math.abs(data.Effort.FibonacciAverage - ((totalStoryPoints / highestTotalStoryPoints) * 5)), 1); | ||||
|  | ||||
| @ -142,8 +142,8 @@ function updateRecordCoD(b, r, t, c, e, w, workItem, highestTotalStoryPoints, da | ||||
|             let effort = workItem.Effort; | ||||
|             let businessValue = workItem.BusinessValue; | ||||
|             let timeCriticality = workItem.TimeCriticality; | ||||
|             let weightedShortestJobFirst = workItem.WeightedShortestJobFirst.toFixed(2); | ||||
|             let riskReductionMinusOpportunityEnablement = workItem.RiskReductionMinusOpportunityEnablement; | ||||
|             let weightedShortestJobFirst = workItem.WeightedShortestJobFirst == undefined ? null : workItem.WeightedShortestJobFirst.toFixed(2); | ||||
|             workItem.CumulativeStoryPoints = ' '; | ||||
|             workItem.TotalStoryPoints = totalStoryPoints + ' User Story Point(s)'; | ||||
|             workItem.AbsoluteDelta = data.Effort == undefined || data.Effort.FibonacciAverage == undefined || totalStoryPoints == undefined || totalStoryPoints === 0 ? ' ' : round(Math.abs(data.Effort.FibonacciAverage - ((totalStoryPoints / highestTotalStoryPoints) * 5)), 1); | ||||
|  | ||||
| @ -9,20 +9,21 @@ internal class Fields | ||||
| #nullable enable | ||||
|  | ||||
|     [JsonConstructor] | ||||
|     public Fields(float? customRRminusOE, | ||||
|     public Fields(decimal? customRRminusOE, | ||||
|                   CustomRequester? customRequester, | ||||
|                   float? customWSJF, | ||||
|                   decimal? customWSJF, | ||||
|                   decimal? customWSJFFib, | ||||
|                   DateTime microsoftVSTSCommonActivatedDate, | ||||
|                   float? microsoftVSTSCommonBusinessValue, | ||||
|                   decimal? microsoftVSTSCommonBusinessValue, | ||||
|                   DateTime microsoftVSTSCommonClosedDate, | ||||
|                   int microsoftVSTSCommonPriority, | ||||
|                   DateTime microsoftVSTSCommonResolvedDate, | ||||
|                   DateTime microsoftVSTSCommonStateChangeDate, | ||||
|                   float? microsoftVSTSCommonTimeCriticality, | ||||
|                   float? microsoftVSTSSchedulingEffort, | ||||
|                   float? microsoftVSTSSchedulingRemainingWork, | ||||
|                   decimal? microsoftVSTSCommonTimeCriticality, | ||||
|                   decimal? microsoftVSTSSchedulingEffort, | ||||
|                   decimal? microsoftVSTSSchedulingRemainingWork, | ||||
|                   DateTime microsoftVSTSSchedulingStartDate, | ||||
|                   float? microsoftVSTSSchedulingStoryPoints, | ||||
|                   decimal? microsoftVSTSSchedulingStoryPoints, | ||||
|                   DateTime microsoftVSTSSchedulingTargetDate, | ||||
|                   string systemAreaPath, | ||||
|                   SystemAssignedTo systemAssignedTo, | ||||
| @ -45,6 +46,7 @@ internal class Fields | ||||
|         CustomRRminusOE = customRRminusOE; | ||||
|         CustomRequester = customRequester; | ||||
|         CustomWSJF = customWSJF; | ||||
|         CustomWSJFFib = customWSJFFib; | ||||
|         MicrosoftVSTSCommonActivatedDate = microsoftVSTSCommonActivatedDate; | ||||
|         MicrosoftVSTSCommonBusinessValue = microsoftVSTSCommonBusinessValue; | ||||
|         MicrosoftVSTSCommonClosedDate = microsoftVSTSCommonClosedDate; | ||||
| @ -76,20 +78,21 @@ internal class Fields | ||||
|         SystemWorkItemType = systemWorkItemType; | ||||
|     } | ||||
|  | ||||
|     [JsonPropertyName("Custom.RRminusOE")] public float? CustomRRminusOE { get; } | ||||
|     [JsonPropertyName("Custom.RRminusOE")] public decimal? CustomRRminusOE { get; } | ||||
|     [JsonPropertyName("Custom.Requester")] public CustomRequester? CustomRequester { get; } | ||||
|     [JsonPropertyName("Custom.WSJF")] public float? CustomWSJF { get; } | ||||
|     [JsonPropertyName("Custom.WSJF")] public decimal? CustomWSJF { get; } | ||||
|     [JsonPropertyName("Custom.WSJFFib")] public decimal? CustomWSJFFib { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.ActivatedDate")] public DateTime MicrosoftVSTSCommonActivatedDate { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.BusinessValue")] public float? MicrosoftVSTSCommonBusinessValue { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.BusinessValue")] public decimal? MicrosoftVSTSCommonBusinessValue { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.ClosedDate")] public DateTime MicrosoftVSTSCommonClosedDate { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.Priority")] public int MicrosoftVSTSCommonPriority { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.ResolvedDate")] public DateTime MicrosoftVSTSCommonResolvedDate { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.StateChangeDate")] public DateTime MicrosoftVSTSCommonStateChangeDate { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.TimeCriticality")] public float? MicrosoftVSTSCommonTimeCriticality { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.Effort")] public float? MicrosoftVSTSSchedulingEffort { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.RemainingWork")] public float? MicrosoftVSTSSchedulingRemainingWork { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Common.TimeCriticality")] public decimal? MicrosoftVSTSCommonTimeCriticality { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.Effort")] public decimal? MicrosoftVSTSSchedulingEffort { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.RemainingWork")] public decimal? MicrosoftVSTSSchedulingRemainingWork { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.StartDate")] public DateTime MicrosoftVSTSSchedulingStartDate { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.StoryPoints")] public float? MicrosoftVSTSSchedulingStoryPoints { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.StoryPoints")] public decimal? MicrosoftVSTSSchedulingStoryPoints { get; } | ||||
|     [JsonPropertyName("Microsoft.VSTS.Scheduling.TargetDate")] public DateTime MicrosoftVSTSSchedulingTargetDate { get; } | ||||
|     [JsonPropertyName("System.AreaPath")] public string SystemAreaPath { get; } | ||||
|     [JsonPropertyName("System.AssignedTo")] public SystemAssignedTo? SystemAssignedTo { get; } | ||||
|  | ||||
| @ -62,6 +62,7 @@ internal class Record | ||||
|                                 title: record.WorkItem.Title, | ||||
|                                 violation: record.WorkItem.Violation is null ? violation : record.WorkItem.Violation, | ||||
|                                 weightedShortestJobFirst: record.WorkItem.WeightedShortestJobFirst, | ||||
|                                 weightedShortestJobFirstFibonacci: record.WorkItem.WeightedShortestJobFirstFibonacci, | ||||
|                                 workItemType: record.WorkItem.WorkItemType); | ||||
|         result = new(workItem, record.Parent, Array.Empty<Record>(), Array.Empty<Record>(), Array.Empty<Record>(), record.Tag); | ||||
|         return result; | ||||
|  | ||||
| @ -37,7 +37,8 @@ internal class WorkItem | ||||
|                     long? timeCriticality, | ||||
|                     string title, | ||||
|                     string? violation, | ||||
|                     long? weightedShortestJobFirst, | ||||
|                     decimal? weightedShortestJobFirst, | ||||
|                     decimal? weightedShortestJobFirstFibonacci, | ||||
|                     string workItemType) | ||||
|     { | ||||
|         ActivatedDate = activatedDate; | ||||
| @ -69,6 +70,7 @@ internal class WorkItem | ||||
|         Title = title; | ||||
|         Violation = violation; | ||||
|         WeightedShortestJobFirst = weightedShortestJobFirst; | ||||
|         WeightedShortestJobFirstFibonacci = weightedShortestJobFirstFibonacci; | ||||
|         WorkItemType = workItemType; | ||||
|     } | ||||
|  | ||||
| @ -105,6 +107,7 @@ internal class WorkItem | ||||
|                               title: workItem.Title, | ||||
|                               violation: workItem.Violation, | ||||
|                               weightedShortestJobFirst: workItem.WeightedShortestJobFirst, | ||||
|                               weightedShortestJobFirstFibonacci: workItem.WeightedShortestJobFirstFibonacci, | ||||
|                               workItemType: workItem.WorkItemType); | ||||
|         return result; | ||||
|     } | ||||
| @ -140,6 +143,7 @@ internal class WorkItem | ||||
|                                                          title: workItem.Title, | ||||
|                                                          violation: workItem.Violation, | ||||
|                                                          weightedShortestJobFirst: workItem.WeightedShortestJobFirst, | ||||
|                                                          weightedShortestJobFirstFibonacci: workItem.WeightedShortestJobFirstFibonacci, | ||||
|                                                          workItemType: workItem.WorkItemType); | ||||
|         return result; | ||||
|     } | ||||
| @ -172,7 +176,8 @@ internal class WorkItem | ||||
|     [JsonPropertyName("TimeCriticality")] public long? TimeCriticality { get; } | ||||
|     [JsonPropertyName("Title")] public string Title { get; } | ||||
|     [JsonPropertyName("Violation")] public string? Violation { get; } | ||||
|     [JsonPropertyName("WeightedShortestJobFirst")] public long? WeightedShortestJobFirst { get; } | ||||
|     [JsonPropertyName("WeightedShortestJobFirst")] public decimal? WeightedShortestJobFirst { get; } | ||||
|     [JsonPropertyName("WeightedShortestJobFirstFibonacci")] public decimal? WeightedShortestJobFirstFibonacci { get; } | ||||
|     [JsonPropertyName("WorkItemType")] public string WorkItemType { get; } | ||||
|  | ||||
| } | ||||
|  | ||||
| @ -399,7 +399,8 @@ internal class ProcessDataStandardFormat | ||||
|             lines.Add(line); | ||||
|         } | ||||
|         string? json = null; | ||||
|         if (processDataStandardFormat.Footer is not null && processDataStandardFormat.Footer.Count > 0) { | ||||
|         if (processDataStandardFormat.Footer is not null && processDataStandardFormat.Footer.Count > 0) | ||||
|         { | ||||
|             Dictionary<string, string> footerKeyValuePairs = GetFooterKeyValuePairs(processDataStandardFormat.Footer); | ||||
|             Dictionary<string, Dictionary<string, string>> logisticKeyValuePairs = GetLogisticKeyValuePairs(processDataStandardFormat.Footer, footerKeyValuePairs); | ||||
|             json = JsonSerializer.Serialize(logisticKeyValuePairs, DictionaryStringDictionaryStringStringSourceGenerationContext.Default.DictionaryStringDictionaryStringString); | ||||
| @ -439,51 +440,72 @@ internal class ProcessDataStandardFormat | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
|     private static Dictionary<string, string> GetFooterKeyValuePairs(ReadOnlyCollection<string> footerLines) { | ||||
|     private static Dictionary<string, string> GetFooterKeyValuePairs(ReadOnlyCollection<string> footerLines) | ||||
|     { | ||||
|         Dictionary<string, string> results = new(); | ||||
|         string[] segments; | ||||
|         foreach (string footerLine in footerLines) { | ||||
|         foreach (string footerLine in footerLines) | ||||
|         { | ||||
|             segments = footerLine.Split('\t'); | ||||
|             if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) { | ||||
|             if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) | ||||
|             { | ||||
|                 continue; | ||||
|             } | ||||
|             if (segments[1].Contains(';')) { | ||||
|             if (segments[1].Contains(';')) | ||||
|             { | ||||
|                 continue; | ||||
|             } else { | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if (results.ContainsKey(segments[0])) | ||||
|                 { | ||||
|                     continue; | ||||
|                 } | ||||
|                 results.Add(segments[0], segments[1]); | ||||
|             } | ||||
|         } | ||||
|         return results; | ||||
|     } | ||||
|  | ||||
|     private static Dictionary<string, Dictionary<string, string>> GetLogisticKeyValuePairs(ReadOnlyCollection<string> footerLines, Dictionary<string, string> footerKeyValuePairs) { | ||||
|     private static Dictionary<string, Dictionary<string, string>> GetLogisticKeyValuePairs(ReadOnlyCollection<string> footerLines, Dictionary<string, string> footerKeyValuePairs) | ||||
|     { | ||||
|         Dictionary<string, Dictionary<string, string>> results = new(); | ||||
|         string[] segments; | ||||
|         string[] subSegments; | ||||
|         string[] subSubSegments; | ||||
|         Dictionary<string, string>? keyValue; | ||||
|         results.Add("Footer", footerKeyValuePairs); | ||||
|         foreach (string footerLine in footerLines) { | ||||
|         foreach (string footerLine in footerLines) | ||||
|         { | ||||
|             segments = footerLine.Split('\t'); | ||||
|             if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) { | ||||
|             if (segments.Length != 2 || string.IsNullOrEmpty(segments[1].Trim())) | ||||
|             { | ||||
|                 continue; | ||||
|             } | ||||
|             if (!segments[1].Contains(';') || !segments[1].Contains('=')) { | ||||
|             if (!segments[1].Contains(';') || !segments[1].Contains('=')) | ||||
|             { | ||||
|                 continue; | ||||
|             } else { | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 subSegments = segments[1].Split(';'); | ||||
|                 if (subSegments.Length < 1) { | ||||
|                 if (subSegments.Length < 1) | ||||
|                 { | ||||
|                     continue; | ||||
|                 } | ||||
|                 if (!results.TryGetValue(segments[0], out keyValue)) { | ||||
|                 if (!results.TryGetValue(segments[0], out keyValue)) | ||||
|                 { | ||||
|                     results.Add(segments[0], new()); | ||||
|                     if (!results.TryGetValue(segments[0], out keyValue)) { | ||||
|                     if (!results.TryGetValue(segments[0], out keyValue)) | ||||
|                     { | ||||
|                         throw new Exception(); | ||||
|                     } | ||||
|                 } | ||||
|                 foreach (string segment in subSegments) { | ||||
|                 foreach (string segment in subSegments) | ||||
|                 { | ||||
|                     subSubSegments = segment.Split('='); | ||||
|                     if (subSubSegments.Length != 2) { | ||||
|                     if (subSubSegments.Length != 2) | ||||
|                     { | ||||
|                         continue; | ||||
|                     } | ||||
|                     keyValue.Add(subSubSegments[0], subSubSegments[1]); | ||||
| @ -843,5 +865,6 @@ internal partial class JsonElementCollectionSourceGenerationContext : JsonSerial | ||||
|  | ||||
| [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] | ||||
| [JsonSerializable(typeof(Dictionary<string, Dictionary<string, string>>))] | ||||
| internal partial class DictionaryStringDictionaryStringStringSourceGenerationContext : JsonSerializerContext { | ||||
| internal partial class DictionaryStringDictionaryStringStringSourceGenerationContext : JsonSerializerContext | ||||
| { | ||||
| } | ||||
		Reference in New Issue
	
	Block a user