PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Backends.​ConsoleConsole­Theme
Open sandboxFocus

ConsoleTheme Class

A simple implementation of a color theme that allows only for two colors per LogLevel.

Inheritance
ConsoleTheme
Implements
IConsoleTheme
Namespace: PostSharp.Patterns.Diagnostics.Backends.Console
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class ConsoleTheme : Object, IConsoleTheme

Constructors

Name Description
ConsoleTheme(ConsoleTheme)

Initializes a new ConsoleTheme and copies all values from a given other ConsoleTheme.

ConsoleTheme(Boolean)

Initializes a new ConsoleTheme.

Properties

Name Description
HightlightedStyles

Gets the styles used for highlighted text.

NormalStyles

Gets the styles used for normal text.

SupportsAnsiCodes

Determines whether the theme supports VT escape codes.

Methods

Name Description
AddHightlightedItem(ConsoleThemeItem)

Specifies that a ConsoleThemeItem should be formatted using the hightlighted style.

Clone()

Returns an editable copy of the current ConsoleTheme.

Freeze()

Prevents modifications in the current ConsoleTheme.

GetStyle(String, LogLevel, LogRecordKind, ConsoleThemeItem)

Gets the ConsoleThemeStyle for a specific theme item.

RemoveHighlightedItem(ConsoleThemeItem)

Specifies that a ConsoleThemeItem should be formatted using the normal style.

Explicit Interface Implementations

Name Description
IConsoleTheme.SupportsThemeItems

Determines whether the theme supports differentiating the style according to the ConsoleThemeItem.