Switched to xml for InfinityQS export

This commit is contained in:
2025-08-26 10:01:45 -07:00
parent 7007207ede
commit a71c0c3a5a
23 changed files with 1869 additions and 999 deletions

View File

@ -25,7 +25,6 @@ public class ProcessData : IProcessData
public ProcessData(IFileRead fileRead, Logistics logistics, List<FileInfo> fileInfoCollection, CommaSeparatedValuesConfiguration commaSeparatedValuesConfiguration, MetaData metaData)
{
JobID = logistics.JobID;
fileInfoCollection.Clear();
_Details = new List<object>();
MesEntity = logistics.MesEntity;
Parse(fileRead, logistics, fileInfoCollection, commaSeparatedValuesConfiguration, metaData);
@ -49,9 +48,13 @@ public class ProcessData : IProcessData
if (description.Test != (int)tests[i])
throw new Exception();
}
FileInfo fileInfo = new($"{logistics.ReportFullPath}.descriptions.json");
List<Description> fileReadDescriptions = (from l in descriptions select (Description)l).ToList();
string json = JsonSerializer.Serialize(fileReadDescriptions, fileReadDescriptions.GetType());
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json);
File.WriteAllText(fileInfo.FullName, json);
File.SetLastWriteTime(fileInfo.FullName, logistics.DateTimeFromSequence);
fileInfoCollection.Add(fileInfo);
JsonElement[] jsonElements = JsonSerializer.Deserialize<JsonElement[]>(json) ?? throw new Exception();
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(logistics.Logistics1[0], tests.ToArray(), jsonElements, fileInfoCollection);
return results;
}