29 lines
731 B
C#
29 lines
731 B
C#
using System.Collections.ObjectModel;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Adaptation.FileHandlers.RsM;
|
|
|
|
internal record Line3
|
|
{
|
|
|
|
[JsonConstructor]
|
|
public Line3(string directory) =>
|
|
Directory = directory;
|
|
|
|
[JsonPropertyName("Directory")] public string Directory { get; }
|
|
|
|
internal static Line3 Get(string[] segments)
|
|
{
|
|
Line3 result;
|
|
ReadOnlyCollection<string> collection = Run.GetCollection(segments);
|
|
result = new(collection.Count < 1 ? string.Empty : collection[0]);
|
|
return result;
|
|
}
|
|
|
|
}
|
|
|
|
[JsonSourceGenerationOptions(WriteIndented = true)]
|
|
[JsonSerializable(typeof(Line3))]
|
|
internal partial class Line3SourceGenerationContext : JsonSerializerContext
|
|
{
|
|
} |