MET08DDUPSFS6420 - v2.43.0 - SPC and APC Bug Fix

This commit is contained in:
2022-06-08 12:53:30 -07:00
parent fed51ad754
commit acbbb75404
15 changed files with 145 additions and 177 deletions

View File

@ -629,16 +629,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;