Editor/Layers/ArchKind.cs
using System.Text.Json.Serialization;
namespace Sunless.Architecture;
// A layer's kind, contributed rather than enumerated, so a module can bring one this editor has never heard of.
// The ident IS the name already on disk - kinds have always serialized through a string converter - so every plan
// written before this type existed reads with no conversion at all.
[JsonConverter( typeof( ArchKindConverter ) )]
public readonly partial record struct ArchKind( string Ident ) {
public static readonly ArchKind None = new( "" );
public bool Known => !string.IsNullOrEmpty( Ident );
public override string ToString() => Ident;
}