Complete
This commit is contained in:
58
Adaptation/FileHandlers/RsM/Line7.cs
Normal file
58
Adaptation/FileHandlers/RsM/Line7.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.RsM;
|
||||
|
||||
internal record Line7
|
||||
{
|
||||
|
||||
[JsonConstructor]
|
||||
public Line7(string areaOrDiamScan, string waferShape, string bNBand, string templateFile, string xSize, string ySize, string calibrationFactor, string msmtMode, string dataType, string dataUnit)
|
||||
{
|
||||
AreaOrDiamScan = areaOrDiamScan;
|
||||
WaferShape = waferShape;
|
||||
BNBand = bNBand;
|
||||
TemplateFile = templateFile;
|
||||
XSize = xSize;
|
||||
YSize = ySize;
|
||||
CalibrationFactor = calibrationFactor;
|
||||
MsmtMode = msmtMode;
|
||||
DataType = dataType;
|
||||
DataUnit = dataUnit;
|
||||
}
|
||||
|
||||
[JsonPropertyName("AreaOrDiamScan")] public string AreaOrDiamScan { get; }
|
||||
[JsonPropertyName("WaferShape")] public string WaferShape { get; }
|
||||
[JsonPropertyName("dNBand")] public string BNBand { get; }
|
||||
[JsonPropertyName("TemplateFile")] public string TemplateFile { get; }
|
||||
[JsonPropertyName("xsize")] public string XSize { get; }
|
||||
[JsonPropertyName("ysize")] public string YSize { get; }
|
||||
[JsonPropertyName("CalibFactor")] public string CalibrationFactor { get; }
|
||||
[JsonPropertyName("MsmtMode")] public string MsmtMode { get; }
|
||||
[JsonPropertyName("DataType")] public string DataType { get; }
|
||||
[JsonPropertyName("DataUnit")] public string DataUnit { get; }
|
||||
|
||||
internal static Line7 Get(string[] segments)
|
||||
{
|
||||
Line7 result;
|
||||
ReadOnlyCollection<string> collection = Complete.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],
|
||||
collection.Count < 7 ? string.Empty : collection[6],
|
||||
collection.Count < 8 ? string.Empty : collection[7],
|
||||
collection.Count < 9 ? string.Empty : collection[8],
|
||||
collection.Count < 10 ? string.Empty : collection[9]);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Line7))]
|
||||
internal partial class Line7SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user