namespace Spectre.Console.Testing { /// /// Contains extensions for . /// public static class TestConsoleExtensions { /// /// Sets the console's color system. /// /// The console. /// The color system to use. /// The same instance so that multiple calls can be chained. public static TestConsole Colors(this TestConsole console, ColorSystem colors) { console.Profile.Capabilities.ColorSystem = colors; return console; } /// /// Sets whether or not ANSI is supported. /// /// The console. /// Whether or not VT/ANSI control codes are supported. /// The same instance so that multiple calls can be chained. public static TestConsole SupportsAnsi(this TestConsole console, bool enable) { console.Profile.Capabilities.Ansi = enable; return console; } /// /// Makes the console interactive. /// /// The console. /// The same instance so that multiple calls can be chained. public static TestConsole Interactive(this TestConsole console) { console.Profile.Capabilities.Interactive = true; return console; } /// /// Sets the console width. /// /// The console. /// The console width. /// The same instance so that multiple calls can be chained. public static TestConsole Width(this TestConsole console, int width) { console.Profile.Width = width; return console; } /// /// Turns on emitting of VT/ANSI sequences. /// /// The console. /// The same instance so that multiple calls can be chained. public static TestConsole EmitAnsiSequences(this TestConsole console) { console.SetCursor(null); console.EmitAnsiSequences = true; return console; } } }