Class ColorConsole
Sets the console color in the constructor and resets it in the dispose
Implements
Inherited Members
Namespace: NUnit.Common
Assembly: nunitlite.dll
Syntax
public class ColorConsole : IDisposable
Constructors
View SourceColorConsole(ColorStyle)
Initializes a new instance of the ColorConsole class.
Declaration
public ColorConsole(ColorStyle style)
Parameters
Type | Name | Description |
---|---|---|
ColorStyle | style | The color style to use. |
Methods
View SourceDispose()
If color is enabled, restores the console colors to their defaults
Declaration
public void Dispose()
GetColor(ColorStyle)
By using styles, we can keep everything consistent
Declaration
public static ConsoleColor GetColor(ColorStyle style)
Parameters
Type | Name | Description |
---|---|---|
ColorStyle | style |
Returns
Type | Description |
---|---|
ConsoleColor |