Search Results for

    Show / Hide Table of Contents

    Class ColorConsole

    Sets the console color in the constructor and resets it in the dispose

    Inheritance
    object
    ColorConsole
    Implements
    IDisposable
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Common
    Assembly: nunitlite.dll
    Syntax
    public class ColorConsole : IDisposable

    Constructors

    View Source

    ColorConsole(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 Source

    Dispose()

    If color is enabled, restores the console colors to their defaults

    Declaration
    public void Dispose()
    View Source

    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

    Implements

    IDisposable
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0