Class MutableTheme
- Namespace
- SharpConsoleUI.Themes
- Assembly
- SharpConsoleUI.dll
A fully settable ITheme used as the working buffer and result of theme derivation (see From(ITheme)). Every theme member is mutable, so a derived theme can override any subset of colors after copying a base theme via CopyFrom(ITheme).
public sealed class MutableTheme : ThemeBase, ITheme
- Inheritance
-
MutableTheme
- Implements
- Inherited Members
- Extension Methods
Remarks
Derives from ThemeBase, so a bare new MutableTheme() is a blank canvas
(transparent/default member values) rather than inheriting any concrete theme's values. This
makes a member that CopyFrom(ITheme) forgets to copy visibly wrong instead of silently
adopting some base theme's value. It exposes settable Name/Description via
NameValue/DescriptionValue for the builder/generator.
Constructors
MutableTheme()
Creates a blank mutable theme (transparent/default member values).
public MutableTheme()
Properties
DescriptionValue
Sets the theme description (alias of Description).
public string DescriptionValue { get; set; }
Property Value
NameValue
Sets the theme name (alias of Name for the builder/generator).
public string NameValue { get; set; }
Property Value
Methods
CopyFrom(ITheme)
Copies every ITheme member value from source into this theme.
Hand-written (reflection-free, AOT-safe). When adding a new ITheme member, ADD IT
HERE — the CopyFrom completeness test will fail until you do.
public MutableTheme CopyFrom(ITheme source)
Parameters
sourceIThemeThe theme to copy all member values from.
Returns
- MutableTheme
This instance (for chaining).