Skip to content

ListOfAttribute

namespace Griff.Scenes;
public sealed class ListOfAttribute : RowsAttribute

Marks a string as a list of one thing per row (no counts): each a name picked from what the project has, or one of a fixed few (Choices), in order, separated by commas or what Separator says.

public string[]? Choices { get; init; }

The fixed few to pick from, when it’s those.

public bool Colors { get; init; }

They’re colors (“#F2607E #F2BC4B”).

public override IReadOnlyList<RowColumn> Columns { get; }
public override string Example { get; }
protected override string Joiner { get; }
public override string Noun { get; }
public string Separator { get; init; }

What separates them: a comma unless it says (” “ for colors).

protected override char[] Separators { get; }
public string What { get; init; }

What each is called: “Tool”, “Color”.

public override string Describe()
public override IReadOnlyList<string>? Read(string row)
public override string Write(IReadOnlyList<string> cells)