TerminalEnvironment
ConsoleMonster.Capabilities
An immutable snapshot of the process inputs used by capability detection.
Inheritance
- object
- TerminalEnvironment
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Method TerminalEnvironment.Capture
Accepted by parameters 1
- Constructor CapabilityDetector.CapabilityDetector
Constructors
public TerminalEnvironment(IReadOnlyDictionary<string, string>? environmentVariables = null, bool isOutputRedirected = false, bool isWindows = false, int windowsBuild = 0, bool isConsoleHandle = false, bool? virtualTerminalEnabled = null, string? consoleFontFace = null, bool consoleFontIsRaster = false, int windowWidth = 0, int windowHeight = 0, bool isInputRedirected = false) #Creates a snapshot, copying variables with the platform's name comparison.
Parameters
- environmentVariables System.Collections.Generic.IReadOnlyDictionary<string, string>? = null
- Environment variables; absent entries behave as empty strings.
- isOutputRedirected bool = false
- Whether stdout is redirected.
- isWindows bool = false
- Whether the host is Windows.
- windowsBuild int = 0
- Windows build number, or zero when unknown.
- isConsoleHandle bool = false
- Whether GetConsoleMode succeeded for stdout.
- virtualTerminalEnabled bool? = null
- Result of enabling VT, or null when not attempted.
- consoleFontFace string? = null
- Console font face, if available.
- consoleFontIsRaster bool = false
- Whether the font is raster.
- windowWidth int = 0
- Visible columns, or zero when unavailable.
- windowHeight int = 0
- Visible rows, or zero when unavailable.
- isInputRedirected bool = false
- Whether standard input is redirected.
Methods
public static TerminalEnvironment Capture() #Captures real process inputs, enabling Windows VT output without changing code pages.
Inherited Methods
Properties
public IReadOnlyDictionary<string, string> EnvironmentVariables { get; } #Copied environment variables, case-insensitive on Windows.
public bool IsConsoleHandle { get; } #Whether GetConsoleMode succeeded for stdout.
public bool? VirtualTerminalEnabled { get; } #Result of enabling VT, or null when not attempted.
public string? ConsoleFontFace { get; } #Console font face, when available.
public bool ConsoleFontIsRaster { get; } #Whether the console font is raster.
public int WindowWidth { get; } #Visible columns, or zero when unavailable.
public bool IsInputRedirected { get; } #Whether standard input is redirected.
public bool HighContrast { get; } #Whether the Windows system High Contrast setting is enabled in this snapshot.