Class CliTableStyles
Convenience facade over the predefined table style presets. CliTableStylePreset is
the source of truth: aliases canonicalize to city presets, and each city preset maps to a
CliTableStyleRecipe. Every factory resolves a recipe through an ITheme
(the CurrentTheme by default) and returns a fresh, fully-resolved
CliTableStyle that can be applied with ApplyStyle(CliTableStyle).
These are presets, not a separate styling system: a recipe defines structure and theme roles
only, and the active theme supplies the colours. The result is a plain CliTableStyle,
so callers keep full customization freedom afterwards. For a custom preset, derive a
CliTableStyleRecipe with a with expression and resolve it directly.
String-based overloads are a name boundary only (config/plugins/help): they parse to a CliTableStylePreset and delegate to the enum-based methods.
public static class CliTableStyles
- Inheritance
-
CliTableStyles
- Inherited Members
Properties
AliasMap
Each alias preset mapped to the city preset it canonicalizes to (e.g. Default → Roma).
public static IReadOnlyDictionary<CliTableStylePreset, CliTableStylePreset> AliasMap { get; }
Property Value
AliasNames
Names of the alias presets (derived from the enum).
public static IReadOnlyList<string> AliasNames { get; }
Property Value
AliasPresets
The boring alias presets (each canonicalizes to a city preset).
public static IReadOnlyList<CliTableStylePreset> AliasPresets { get; }
Property Value
CityNames
Names of the city presets (derived from the enum).
public static IReadOnlyList<string> CityNames { get; }
Property Value
CityPresets
The nine city presets (the actual recipes).
public static IReadOnlyList<CliTableStylePreset> CityPresets { get; }
Property Value
PresetNames
Names of all presets (derived from the enum; for docs/help/config).
public static IReadOnlyList<string> PresetNames { get; }
Property Value
Presets
All presets, in menu order (aliases first, then cities).
public static IReadOnlyList<CliTableStylePreset> Presets { get; }
Property Value
Methods
Canonicalize(CliTableStylePreset)
Canonicalizes a preset: alias presets map to their target city preset; city presets are returned
unchanged.
public static CliTableStylePreset Canonicalize(CliTableStylePreset preset)
Parameters
presetCliTableStylePreset
Returns
Create(CliTableStylePreset, ITheme?, CliTableOrientation)
Builds a table style for a preset, resolving its recipe through
theme
(the CurrentTheme when null). The requested
orientation is honoured for universal presets and ignored for
orientation-locked ones (Parma, Verona).public static CliTableStyle Create(CliTableStylePreset preset, ITheme? theme = null, CliTableOrientation orientation = CliTableOrientation.Vertical)
Parameters
presetCliTableStylePresetthemeIThemeorientationCliTableOrientation
Returns
Create(string, ITheme?, CliTableOrientation)
Builds a table style by preset name. Accepts any CliTableStylePreset name
(city or alias), case-insensitively.
public static CliTableStyle Create(string presetName, ITheme? theme = null, CliTableOrientation orientation = CliTableOrientation.Vertical)
Parameters
presetNamestringthemeIThemeorientationCliTableOrientation
Returns
Exceptions
- ArgumentException
- The name is not a known preset (e.g. a removed tasting variant).
GetRecipe(CliTableStylePreset)
Returns the CliTableStyleRecipe for a preset, canonicalizing aliases first.
public static CliTableStyleRecipe GetRecipe(CliTableStylePreset preset)
Parameters
presetCliTableStylePreset
Returns
Exceptions
- ArgumentOutOfRangeException
- The value is not a defined preset.
GetRecipe(string)
Returns the recipe for a preset name (city or alias), case-insensitively.
public static CliTableStyleRecipe GetRecipe(string presetName)
Parameters
presetNamestring
Returns
Exceptions
- ArgumentException
- The name is not a known preset.
OrientationSupport(CliTableStylePreset)
Returns which orientations a preset supports (aliases canonicalize first).
public static CliTableStyleOrientationSupport OrientationSupport(CliTableStylePreset preset)
Parameters
presetCliTableStylePreset
Returns
OrientationSupport(string)
Returns which orientations a preset name supports (city or alias), case-insensitively.
public static CliTableStyleOrientationSupport OrientationSupport(string presetName)
Parameters
presetNamestring
Returns
Exceptions
- ArgumentException
- The name is not a known preset.
Parse(string)
Parses a preset name to a CliTableStylePreset, case-insensitively. Numeric input
and unknown names (including removed tasting variants such as Venezia/Firenze/Pisa) are rejected.
public static CliTableStylePreset Parse(string presetName)
Parameters
presetNamestring
Returns
Exceptions
- ArgumentException
- The name is not a known preset.