MET08RESIMAPCDE - v2.43.0 - SPC and APC Bug Fix

This commit is contained in:
2022-06-10 09:39:38 -07:00
parent 2e660ec384
commit 044b0e2bcd
18 changed files with 119 additions and 167 deletions

View File

@ -434,16 +434,20 @@ public class ProcessData : IProcessData
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
}
#nullable enable
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
{
List<Description> results = new();
Description description;
Description? description;
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
foreach (JsonElement jsonElement in jsonElements)
{
if (jsonElement.ValueKind != JsonValueKind.Object)
throw new Exception();
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
if (description is null)
continue;
results.Add(description);
}
return results;