Search Results for

    Show / Hide Table of Contents

    Class TextWriterColor

    Console text writer with color support

    Inheritance
    object
    TextWriterColor
    Namespace: Terminaux.Writer.ConsoleWriters
    Assembly: Terminaux.dll
    Syntax
    public static class TextWriterColor

    Methods

    Render(string, params object[])

    Renders text and returns the sequence needed to print text to the terminal prompt.

    Declaration
    public static string Render(string Text, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    object[] vars

    Variables to format the message before it's written.

    Returns
    Type Description
    string

    Render(string, ThemeColorType, params object[])

    Renders text and returns the sequence needed to print text to the terminal prompt with custom color support.

    Declaration
    public static string Render(string Text, ThemeColorType color = ThemeColorType.NeutralText, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    ThemeColorType color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    Returns
    Type Description
    string

    Render(string, ThemeColorType, ThemeColorType, params object[])

    Renders text and returns the sequence needed to print text to the terminal prompt with custom color support.

    Declaration
    public static string Render(string Text, ThemeColorType ForegroundColor = ThemeColorType.NeutralText, ThemeColorType BackgroundColor = ThemeColorType.Background, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    ThemeColorType ForegroundColor

    A foreground color that will be changed to.

    ThemeColorType BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    Returns
    Type Description
    string

    RenderColor(string, Color, params object[])

    Renders text and returns the sequence needed to print text to the terminal prompt with custom color support.

    Declaration
    public static string RenderColor(string Text, Color color, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    Color color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    Returns
    Type Description
    string

    RenderColorBack(string, Color, Color, params object[])

    Renders text and returns the sequence needed to print text to the terminal prompt with custom color support.

    Declaration
    public static string RenderColorBack(string Text, Color ForegroundColor, Color BackgroundColor, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    Color ForegroundColor

    A foreground color that will be changed to.

    Color BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    Returns
    Type Description
    string

    Write(string, bool, params object[])

    Outputs the text into the terminal prompt.

    Declaration
    public static void Write(string Text, bool Line, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    bool Line

    Whether to print a new line or not

    object[] vars

    Variables to format the message before it's written.

    Write(string, bool, ThemeColorType, params object[])

    Outputs the text into the terminal prompt, and sets colors as needed.

    Declaration
    public static void Write(string Text, bool Line, ThemeColorType colorType = ThemeColorType.NeutralText, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    bool Line

    Whether to print a new line or not

    ThemeColorType colorType

    A type of colors that will be changed.

    object[] vars

    Variables to format the message before it's written.

    Write(string, bool, ThemeColorType, ThemeColorType, params object[])

    Outputs the text into the terminal prompt, and sets colors as needed.

    Declaration
    public static void Write(string Text, bool Line, ThemeColorType colorTypeForeground = ThemeColorType.NeutralText, ThemeColorType colorTypeBackground = ThemeColorType.Background, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    bool Line

    Whether to print a new line or not

    ThemeColorType colorTypeForeground

    A type of colors that will be changed for the foreground color.

    ThemeColorType colorTypeBackground

    A type of colors that will be changed for the background color.

    object[] vars

    Variables to format the message before it's written.

    Write(string, params object[])

    Outputs the text into the terminal prompt.

    Declaration
    public static void Write(string Text, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    object[] vars

    Variables to format the message before it's written.

    Write(string, ThemeColorType, params object[])

    Outputs the text into the terminal prompt, and sets colors as needed.

    Declaration
    public static void Write(string Text, ThemeColorType colorType = ThemeColorType.NeutralText, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    ThemeColorType colorType

    A type of colors that will be changed.

    object[] vars

    Variables to format the message before it's written.

    Write(string, ThemeColorType, ThemeColorType, params object[])

    Outputs the text into the terminal prompt, and sets colors as needed.

    Declaration
    public static void Write(string Text, ThemeColorType colorTypeForeground = ThemeColorType.NeutralText, ThemeColorType colorTypeBackground = ThemeColorType.Background, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    ThemeColorType colorTypeForeground

    A type of colors that will be changed for the foreground color.

    ThemeColorType colorTypeBackground

    A type of colors that will be changed for the background color.

    object[] vars

    Variables to format the message before it's written.

    WriteColor(string, bool, Color, params object[])

    Outputs the text into the terminal prompt with custom color support.

    Declaration
    public static void WriteColor(string Text, bool Line, Color color, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    bool Line

    Whether to print a new line or not

    Color color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteColor(string, Color, params object[])

    Outputs the text into the terminal prompt with custom color support.

    Declaration
    public static void WriteColor(string Text, Color color, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    Color color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteColorBack(string, bool, Color, Color, params object[])

    Outputs the text into the terminal prompt with custom color support.

    Declaration
    public static void WriteColorBack(string Text, bool Line, Color ForegroundColor, Color BackgroundColor, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    bool Line

    Whether to print a new line or not

    Color ForegroundColor

    A foreground color that will be changed to.

    Color BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteColorBack(string, Color, Color, params object[])

    Outputs the text into the terminal prompt with custom color support.

    Declaration
    public static void WriteColorBack(string Text, Color ForegroundColor, Color BackgroundColor, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    Color ForegroundColor

    A foreground color that will be changed to.

    Color BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, bool, params object[])

    Outputs the text into the terminal prompt. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, bool Line, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    bool Line

    Whether to print a new line or not

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, bool, ThemeColorType, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, bool Line, ThemeColorType color = ThemeColorType.Input, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    bool Line

    Whether to print a new line or not

    ThemeColorType color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, bool, ThemeColorType, ThemeColorType, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, bool Line, ThemeColorType ForegroundColor = ThemeColorType.Input, ThemeColorType BackgroundColor = ThemeColorType.Background, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    bool Line

    Whether to print a new line or not

    ThemeColorType ForegroundColor

    A foreground color that will be changed to.

    ThemeColorType BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, params object[])

    Outputs the text into the terminal prompt. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, ThemeColorType, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, ThemeColorType color = ThemeColorType.Input, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    ThemeColorType color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReader(string, TermReaderSettings?, ThemeColorType, ThemeColorType, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReader(string Text, TermReaderSettings? settings, ThemeColorType ForegroundColor = ThemeColorType.Input, ThemeColorType BackgroundColor = ThemeColorType.Background, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    ThemeColorType ForegroundColor

    A foreground color that will be changed to.

    ThemeColorType BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReaderColor(string, TermReaderSettings?, bool, Color, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReaderColor(string Text, TermReaderSettings? settings, bool Line, Color color, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    bool Line

    Whether to print a new line or not

    Color color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReaderColor(string, TermReaderSettings?, Color, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReaderColor(string Text, TermReaderSettings? settings, Color color, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    Color color

    A color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReaderColorBack(string, TermReaderSettings?, bool, Color, Color, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReaderColorBack(string Text, TermReaderSettings? settings, bool Line, Color ForegroundColor, Color BackgroundColor, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    bool Line

    Whether to print a new line or not

    Color ForegroundColor

    A foreground color that will be changed to.

    Color BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    WriteForReaderColorBack(string, TermReaderSettings?, Color, Color, params object[])

    Outputs the text into the terminal prompt with custom color support. Use for TermReader custom bindings.

    Declaration
    public static void WriteForReaderColorBack(string Text, TermReaderSettings? settings, Color ForegroundColor, Color BackgroundColor, params object[] vars)
    Parameters
    Type Name Description
    string Text

    A sentence that will be written to the terminal prompt. Supports {0}, {1}, ...

    TermReaderSettings settings

    Terminal reader settings

    Color ForegroundColor

    A foreground color that will be changed to.

    Color BackgroundColor

    A background color that will be changed to.

    object[] vars

    Variables to format the message before it's written.

    In this article
    Back to top Generated by DocFX