Class ThemeBuilder
- Namespace
- SharpConsoleUI.Themes
- Assembly
- SharpConsoleUI.dll
Fluent builder produced by From(ITheme). Mutates a working MutableTheme and returns it from Build() (no copy, no freeze — the result stays mutable by design).
public sealed class ThemeBuilder
- Inheritance
-
ThemeBuilder
- Inherited Members
- Extension Methods
Methods
Build()
Returns the built (mutable) theme.
public MutableTheme Build()
Returns
- MutableTheme
The working MutableTheme.
With(Action<MutableTheme>)
Applies mutate to the working theme so you can override any member(s).
Multiple calls accumulate.
public ThemeBuilder With(Action<MutableTheme> mutate)
Parameters
mutateAction<MutableTheme>An action that mutates the working MutableTheme.
Returns
- ThemeBuilder
This builder (for chaining).
Exceptions
- ArgumentNullException
mutateis null.
WithDescription(string)
Sets the derived theme's Description.
public ThemeBuilder WithDescription(string description)
Parameters
descriptionstringThe theme description. Null/empty leaves the copied base description unchanged.
Returns
- ThemeBuilder
This builder (for chaining).
WithName(string)
Sets the derived theme's Name.
public ThemeBuilder WithName(string name)
Parameters
namestringThe theme name. Null/empty leaves the copied base name unchanged.
Returns
- ThemeBuilder
This builder (for chaining).