public static ShellTextStyler Set(ShellTextStyle style) { if (style == ShellTextStyle.None) { throw new ArgumentOutOfRangeException(nameof(style)); } var styler = new ShellTextStyler(style, _currentStyle); _currentStyle = style; SetCore(style, true); return(styler); }
public static void Initialize(ShellOptions options) { if (IsInitialized) { return; } IsInitialized = true; Options = options; Console.OutputEncoding = Options.Encoding; ShellColorizer.Initialize(Options.DefaultForegroundColor, Options.DefaultBackgroundColor); ShellTextStyler.Initialize(); }