46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
using System.Collections.ObjectModel;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Adaptation.FileHandlers.RsM;
|
|
|
|
internal record Line2
|
|
{
|
|
|
|
[JsonConstructor]
|
|
public Line2(string fileName, string project, string recipeName, string lotID, string wfrID, string is_TF_DataFile)
|
|
{
|
|
FileName = fileName;
|
|
Project = project;
|
|
RecipeName = recipeName;
|
|
LotID = lotID;
|
|
WfrID = wfrID;
|
|
Is_TF_DataFile = is_TF_DataFile;
|
|
}
|
|
|
|
[JsonPropertyName("FileName")] public string FileName { get; }
|
|
[JsonPropertyName("Proj")] public string Project { get; }
|
|
[JsonPropertyName("Rcpe")] public string RecipeName { get; }
|
|
[JsonPropertyName("LotID")] public string LotID { get; }
|
|
[JsonPropertyName("WfrID")] public string WfrID { get; }
|
|
[JsonPropertyName("Is_TF_DataFile")] public string Is_TF_DataFile { get; }
|
|
|
|
internal static Line2 Get(string[] segments)
|
|
{
|
|
Line2 result;
|
|
ReadOnlyCollection<string> collection = Run.GetCollection(segments);
|
|
result = new(collection.Count < 1 ? string.Empty : collection[0],
|
|
collection.Count < 2 ? string.Empty : collection[1],
|
|
collection.Count < 3 ? string.Empty : collection[2],
|
|
collection.Count < 4 ? string.Empty : collection[3],
|
|
collection.Count < 5 ? string.Empty : collection[4],
|
|
collection.Count < 6 ? string.Empty : collection[5]);
|
|
return result;
|
|
}
|
|
|
|
}
|
|
|
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
[JsonSerializable(typeof(Line2))]
|
|
internal partial class Line2SourceGenerationContext : JsonSerializerContext
|
|
{
|
|
} |