Refactor OpenInsight file handling to utilize JsonElement for data processing and enhance serialization with JsonSourceGeneration. Updated methods across multiple classes to improve data handling and reduce dependencies on ProcessDataStandardFormat.
This commit is contained in:
@ -4,59 +4,60 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.RsM;
|
||||
|
||||
public class Description : IDescription, Shared.Properties.IDescription
|
||||
{
|
||||
|
||||
public int Test { get; set; }
|
||||
public int Count { get; set; }
|
||||
public int Index { get; set; }
|
||||
[JsonPropertyName("EventId")] public int Test { get; set; }
|
||||
[JsonPropertyName("Count")] public int Count { get; set; }
|
||||
[JsonPropertyName("Index")] public int Index { get; set; }
|
||||
//
|
||||
public string EventName { get; set; }
|
||||
public string NullData { get; set; }
|
||||
public string JobID { get; set; }
|
||||
public string Sequence { get; set; }
|
||||
public string MesEntity { get; set; }
|
||||
[JsonPropertyName("MesEntity")] public string MesEntity { get; set; }
|
||||
public string ReportFullPath { get; set; }
|
||||
public string ProcessJobID { get; set; }
|
||||
public string MID { get; set; }
|
||||
//
|
||||
public string Date { get; set; }
|
||||
public string Employee { get; set; }
|
||||
public string Lot { get; set; }
|
||||
public string PSN { get; set; }
|
||||
public string Reactor { get; set; }
|
||||
public string Recipe { get; set; }
|
||||
[JsonPropertyName("Date")] public string Date { get; set; }
|
||||
[JsonPropertyName("Operator")] public string Employee { get; set; }
|
||||
[JsonPropertyName("Lot")] public string Lot { get; set; }
|
||||
[JsonPropertyName("PSN")] public string PSN { get; set; }
|
||||
[JsonPropertyName("Reactor")] public string Reactor { get; set; }
|
||||
[JsonPropertyName("RecipeName")] public string Recipe { get; set; }
|
||||
//
|
||||
public string AutoOptimizeGain { get; set; }
|
||||
public string AutoProbeHeightSet { get; set; }
|
||||
public string Avg { get; set; }
|
||||
public string DataReject { get; set; }
|
||||
public string DLRatio { get; set; }
|
||||
public string Merit { get; set; }
|
||||
public string Pt { get; set; }
|
||||
public string R { get; set; }
|
||||
public string ResistivitySpec { get; set; }
|
||||
public string Rs { get; set; }
|
||||
public string SemiRadial { get; set; }
|
||||
public string StdDev { get; set; }
|
||||
public string T { get; set; }
|
||||
public string Temp { get; set; }
|
||||
[JsonPropertyName("AutoOptimizeGain")] public string AutoOptimizeGain { get; set; }
|
||||
[JsonPropertyName("AutoProbeHeightSet")] public string AutoProbeHeightSet { get; set; }
|
||||
[JsonPropertyName("Avg")] public string Avg { get; set; }
|
||||
[JsonPropertyName("DataRejectSigma")] public string DataReject { get; set; }
|
||||
[JsonPropertyName("DLRatio")] public string DLRatio { get; set; }
|
||||
[JsonPropertyName("MeritGOF")] public string Merit { get; set; }
|
||||
[JsonPropertyName("InferredPoint")] public string Pt { get; set; }
|
||||
[JsonPropertyName("R")] public string R { get; set; }
|
||||
[JsonPropertyName("ResistivitySpec")] public string ResistivitySpec { get; set; }
|
||||
[JsonPropertyName("Rs")] public string Rs { get; set; }
|
||||
[JsonPropertyName("SemiRadial")] public string SemiRadial { get; set; }
|
||||
[JsonPropertyName("StandardDeviationPercentage")] public string StdDev { get; set; }
|
||||
[JsonPropertyName("Th")] public string T { get; set; }
|
||||
[JsonPropertyName("Temp")] public string Temp { get; set; }
|
||||
//
|
||||
public string Engineer { get; set; }
|
||||
public string EquipId { get; set; }
|
||||
public string FileName { get; set; }
|
||||
[JsonPropertyName("Engineer")] public string Engineer { get; set; }
|
||||
[JsonPropertyName("Equipment")] public string EquipId { get; set; }
|
||||
[JsonPropertyName("TheFileName")] public string FileName { get; set; }
|
||||
public string HeaderUniqueId { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Layer { get; set; }
|
||||
public string RDS { get; set; }
|
||||
public string Run { get; set; }
|
||||
[JsonPropertyName("Layer")] public string Layer { get; set; }
|
||||
[JsonPropertyName("RDS")] public string RDS { get; set; }
|
||||
[JsonPropertyName("Title")] public string Run { get; set; }
|
||||
public string UniqueId { get; set; }
|
||||
public string Zone { get; set; }
|
||||
[JsonPropertyName("Zone")] public string Zone { get; set; }
|
||||
//
|
||||
public string SheetRhoVariation { get; set; }
|
||||
[JsonPropertyName("SheetRhoVariation")] public string SheetRhoVariation { get; set; }
|
||||
|
||||
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||
|
||||
@ -314,4 +315,16 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
|
||||
internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt";
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Description))]
|
||||
internal partial class DescriptionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||
[JsonSerializable(typeof(Description[]))]
|
||||
internal partial class DescriptionArraySourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user