PairsAttribute
namespace Griff.Scenes;
public sealed class PairsAttribute : RowsAttributeA list of names, each with a value: “Sword: 30” a line (or “Sword = 30”, Separator), as a dictionary holds them. The Inspector lists them a row each, the name and its value (a number to drag or a color to pick when they all are) side by side, to set, add, remove and reorder; a name given twice is flagged. It’s what a list of strings with no editor of its own gets when every line reads so (see GenericFields); mark one with it ([Pairs]) to say so while it’s empty.
Properties
Section titled “Properties”Columns
Section titled “Columns”public override IReadOnlyList<RowColumn> Columns { get; }Example
Section titled “Example”public override string Example { get; }public string Key { get; init; }What the names are called, over their column: “Name” unless it says.
public override string Noun { get; }Separator
Section titled “Separator”public string Separator { get; init; }What’s between a name and its value: “:” (“Sword: 30”) unless it says (“=” for “Sword = 30”).
Separators
Section titled “Separators”protected override char[] Separators { get; }public string Value { get; init; }What the values are called, over their column: “Value” unless it says.
Values
Section titled “Values”public CellKind Values { get; init; }What the values are: Text unless it says (Number, Color).
Methods
Section titled “Methods”Describe
Section titled “Describe”public override string Describe()Problem
Section titled “Problem”public override string? Problem(Component component, object? value)public override IReadOnlyList<string>? Read(string row)public override string Write(IReadOnlyList<string> cells)