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,54 +4,54 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.Stratus;
|
||||
|
||||
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 MID { get; set; } // [JsonPropertyName("Cassette")]
|
||||
//
|
||||
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("DateTime")] public string Date { get; set; }
|
||||
[JsonPropertyName("Employee")] public string Employee { get; set; }
|
||||
[JsonPropertyName("Batch")] public string Lot { get; set; }
|
||||
[JsonPropertyName("PSN")] public string PSN { get; set; }
|
||||
[JsonPropertyName("Reactor")] public string Reactor { get; set; }
|
||||
[JsonPropertyName("Recipe")] public string Recipe { get; set; }
|
||||
//
|
||||
public string Cassette { get; set; }
|
||||
public string GradeStdDev { get; set; }
|
||||
[JsonPropertyName("Cassette")] public string Cassette { get; set; }
|
||||
[JsonPropertyName("GradeStdDev")] public string GradeStdDev { get; set; }
|
||||
public string HeaderUniqueId { get; set; }
|
||||
public string Layer { get; set; }
|
||||
public string MeanThickness { get; set; }
|
||||
public string PassFail { get; set; }
|
||||
public string RDS { get; set; }
|
||||
public string Slot { get; set; }
|
||||
public string Title { get; set; }
|
||||
[JsonPropertyName("Layer")] public string Layer { get; set; }
|
||||
[JsonPropertyName("GradeMean")] public string MeanThickness { get; set; }
|
||||
[JsonPropertyName("PassFail")] public string PassFail { get; set; }
|
||||
[JsonPropertyName("RDS")] public string RDS { get; set; }
|
||||
[JsonPropertyName("Slot")] public string Slot { get; set; }
|
||||
public string Title { get; set; } // [JsonPropertyName("Batch")]
|
||||
public string UniqueId { get; set; }
|
||||
public string Wafer { get; set; }
|
||||
public string Zone { get; set; }
|
||||
[JsonPropertyName("Text")] public string Wafer { get; set; }
|
||||
[JsonPropertyName("Zone")] public string Zone { get; set; }
|
||||
//
|
||||
public string Mean { get; set; }
|
||||
public string Position { get; set; }
|
||||
public string StdDev { get; set; }
|
||||
public string Thickness { get; set; }
|
||||
[JsonPropertyName("Mean")] public string Mean { get; set; }
|
||||
[JsonPropertyName("StdDev")] public string StdDev { get; set; }
|
||||
[JsonPropertyName("Site")] public string Thickness { get; set; }
|
||||
//
|
||||
public string ThicknessSlotOne { get; set; }
|
||||
public string ThicknessSlotTwentyFive { get; set; }
|
||||
public string DeltaThicknessSlotsOneAndTwentyFive { get; set; }
|
||||
public string PercentDeltaThicknessSlotsOneAndTwentyFive { get; set; }
|
||||
[JsonPropertyName("ThicknessSlotOne")] public string ThicknessSlotOne { get; set; }
|
||||
[JsonPropertyName("ThicknessSlotTwentyFive")] public string ThicknessSlotTwentyFive { get; set; }
|
||||
[JsonPropertyName("Actual Delta Thick Pts 1 and 25")] public string DeltaThicknessSlotsOneAndTwentyFive { get; set; }
|
||||
[JsonPropertyName("% Delta Thick Pts 1 and 25")] public string PercentDeltaThicknessSlotsOneAndTwentyFive { get; set; }
|
||||
|
||||
string IDescription.GetEventDescription() => "File Has been read and parsed";
|
||||
|
||||
@ -113,7 +113,7 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
List<string> results = new()
|
||||
{
|
||||
nameof(Mean),
|
||||
nameof(Position),
|
||||
nameof(Slot),
|
||||
nameof(StdDev),
|
||||
nameof(Thickness)
|
||||
};
|
||||
@ -218,7 +218,6 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
Zone = processData.Zone,
|
||||
//
|
||||
Mean = detail.Mean,
|
||||
Position = detail.Position,
|
||||
StdDev = detail.StdDev,
|
||||
Thickness = detail.Thickness,
|
||||
//
|
||||
@ -278,7 +277,6 @@ public class Description : IDescription, Shared.Properties.IDescription
|
||||
Zone = nameof(Zone),
|
||||
//
|
||||
Mean = nameof(Mean),
|
||||
Position = nameof(Position),
|
||||
StdDev = nameof(StdDev),
|
||||
Thickness = nameof(Thickness),
|
||||
//
|
||||
@ -292,4 +290,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