Complete
This commit is contained in:
40
Adaptation/FileHandlers/RsM/Line10.cs
Normal file
40
Adaptation/FileHandlers/RsM/Line10.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Adaptation.FileHandlers.RsM;
|
||||
|
||||
internal record Line10
|
||||
{
|
||||
|
||||
[JsonConstructor]
|
||||
public Line10(string diamThScan, string diamStart, string diamEnd, string diamStep)
|
||||
{
|
||||
DiamThScan = diamThScan;
|
||||
DiamStart = diamStart;
|
||||
DiamEnd = diamEnd;
|
||||
DiamStep = diamStep;
|
||||
}
|
||||
|
||||
[JsonPropertyName("Diam ThScan")] public string DiamThScan { get; }
|
||||
[JsonPropertyName("Diam Start")] public string DiamStart { get; }
|
||||
[JsonPropertyName("Diam End")] public string DiamEnd { get; }
|
||||
[JsonPropertyName("Diam Step")] public string DiamStep { get; }
|
||||
|
||||
internal static Line10 Get(string[] segments)
|
||||
{
|
||||
Line10 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]);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Line10))]
|
||||
internal partial class Line10SourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user