Class ConsoleChecker
Console sanity checking module
Inheritance
Namespace: Terminaux.Base.Checks
Assembly: Terminaux.dll
Syntax
public static class ConsoleChecker
Properties
| Edit this page View SourceHomePath
Platform-dependent home path
Declaration
public static string HomePath { get; }
Property Value
Type | Description |
---|---|
string |
IsDumb
Is the console a dumb console?
Declaration
public static bool IsDumb { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceAddToCheckWhitelist(Assembly)
Adds the assembly to the check whitelist
Declaration
public static void AddToCheckWhitelist(Assembly asm)
Parameters
Type | Name | Description |
---|---|---|
Assembly | asm | Assembly to add |
CheckConsole()
Checks the running console for sanity, like the incompatible consoles, insane console types, etc.
Declaration
public static void CheckConsole()
CheckConsoleSize(int, int)
Checks the console size with edge cases
Declaration
public static bool CheckConsoleSize(int minimumWidth = 80, int minimumHeight = 24)
Parameters
Type | Name | Description |
---|---|---|
int | minimumWidth | Minimum console window width to check |
int | minimumHeight | Minimum console window height to check |
Returns
Type | Description |
---|---|
bool |
CheckConsoleSizePrompt(int, int)
Checks the console size with edge cases, prompting the user to resize the screen if the minimum console size requirements is not satisfied.
Declaration
public static void CheckConsoleSizePrompt(int minimumWidth = 80, int minimumHeight = 24)
Parameters
Type | Name | Description |
---|---|---|
int | minimumWidth | Minimum console window width to check |
int | minimumHeight | Minimum console window height to check |
IsConHost()
Checks whether this current application is running off ConHost or not
Declaration
public static bool IsConHost()
Returns
Type | Description |
---|---|
bool | True if running off ConHost; otherwise, false. Always false on Linux systems. |
IsConsole256Colors()
Does the console support 256 colors?
Declaration
public static bool IsConsole256Colors()
Returns
Type | Description |
---|---|
bool |
RemoveFromCheckWhitelist(Assembly)
Removes the assembly from the check whitelist
Declaration
public static void RemoveFromCheckWhitelist(Assembly asm)
Parameters
Type | Name | Description |
---|---|---|
Assembly | asm | Assembly to remove |