namespace Spectre.Console; /// /// Represents console capabilities. /// public sealed class Capabilities : IReadOnlyCapabilities { private readonly IAnsiConsoleOutput _out; /// /// Gets or sets the color system. /// public ColorSystem ColorSystem { get; set; } /// /// Gets or sets a value indicating whether or not /// the console supports VT/ANSI control codes. /// public bool Ansi { get; set; } /// /// Gets or sets a value indicating whether or not /// the console support links. /// public bool Links { get; set; } /// /// Gets or sets a value indicating whether or not /// this is a legacy console (cmd.exe) on an OS /// prior to Windows 10. /// /// /// Only relevant when running on Microsoft Windows. /// public bool Legacy { get; set; } /// /// Gets a value indicating whether or not /// the output is a terminal. /// [Obsolete("Use Profile.Out.IsTerminal instead")] public bool IsTerminal => _out.IsTerminal; /// /// Gets or sets a value indicating whether /// or not the console supports interaction. /// public bool Interactive { get; set; } /// /// Gets or sets a value indicating whether /// or not the console supports Unicode. /// public bool Unicode { get; set; } /// /// Gets or sets a value indicating whether /// or not the console supports alternate buffers. /// public bool AlternateBuffer { get; set; } /// /// Initializes a new instance of the /// class. /// internal Capabilities(IAnsiConsoleOutput @out) { _out = @out ?? throw new ArgumentNullException(nameof(@out)); } }