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