Table of Contents

CliStyle Struct

Definition

Namespace
DotMake.CommandLine
Assembly
DotMake.CommandLine.dll

Represents color and text decoration.

public readonly record struct CliStyle : IEquatable<CliStyle>
Implements

Constructors

CliStyle()

Initializes a new instance of the CliStyle class.

CliStyle(CliColor?, CliColor?, CliDecoration?)

Initializes a new instance of the CliStyle class.

Properties

Background

Gets the background color.

Decoration

Gets the text decoration.

Foreground

Gets the foreground color.

Plain

Gets a CliStyle with the default colors and without text decoration.

Methods

Combine(CliStyle)

Combines this style with another one.

GetHashCode()

Returns the hash code for this instance.

Operators

implicit operator CliStyle(CliColor)

Implicitly converts CliColor into a CliStyle with a foreground color.

Extension Methods

StyleExtensions.Background(CliStyle, CliColor)

Represents color and text decoration.

StyleExtensions.Decoration(CliStyle, CliDecoration)

Represents color and text decoration.

StyleExtensions.Foreground(CliStyle, CliColor)

Represents color and text decoration.