API Reference
Class
TerminalEnvironment
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, Boolean isOutputRedirected = false, Boolean isWindows = false, Int32 windowsBuild = 0, Boolean isConsoleHandle = false, Boolean? virtualTerminalEnabled = null, String? consoleFontFace = null, Boolean consoleFontIsRaster = false, Int32 windowWidth = 0, Int32 windowHeight = 0, Boolean isInputRedirected = false) #Creates a snapshot, copying variables with the platform's name comparison.
Parameters
- environmentVariables System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>? = null
- Environment variables; absent entries behave as empty strings.
- isOutputRedirected System.Boolean = false
- Whether stdout is redirected.
- isWindows System.Boolean = false
- Whether the host is Windows.
- windowsBuild System.Int32 = 0
- Windows build number, or zero when unknown.
- isConsoleHandle System.Boolean = false
- Whether GetConsoleMode succeeded for stdout.
- virtualTerminalEnabled System.Boolean? = null
- Result of enabling VT, or null when not attempted.
- consoleFontFace System.String? = null
- Console font face, if available.
- consoleFontIsRaster System.Boolean = false
- Whether the font is raster.
- windowWidth System.Int32 = 0
- Visible columns, or zero when unavailable.
- windowHeight System.Int32 = 0
- Visible rows, or zero when unavailable.
- isInputRedirected System.Boolean = false
- Whether standard input is redirected.
Methods
public static TerminalEnvironment Capture() #Returns:
TerminalEnvironmentCaptures real process inputs, enabling Windows VT output without changing code pages.
Returns
A snapshot for deterministic detection.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public IReadOnlyDictionary<String, String> EnvironmentVariables { get; } #Copied environment variables, case-insensitive on Windows.
public Boolean IsConsoleHandle { get; } #Whether GetConsoleMode succeeded for stdout.
public Boolean? VirtualTerminalEnabled { get; } #Result of enabling VT, or null when not attempted.
public String? ConsoleFontFace { get; } #Console font face, when available.
public Boolean ConsoleFontIsRaster { get; } #Whether the console font is raster.
public Int32 WindowWidth { get; } #Visible columns, or zero when unavailable.
public Int32 WindowHeight { get; } #Visible rows, or zero when unavailable.
public Boolean IsInputRedirected { get; } #Whether standard input is redirected.