Table of Contents

Class NotificationSeverity

Namespace
SharpConsoleUI.Core
Assembly
SharpConsoleUI.dll

Represents a notification severity level with associated visual properties such as colors and icons. Uses single-cell-width Unicode characters for reliable console rendering.

public class NotificationSeverity
Inheritance
NotificationSeverity
Inherited Members
Extension Methods

Fields

Danger

Danger/error severity with red theme. Icon: ✘ (U+2718).

public static readonly NotificationSeverity Danger

Field Value

NotificationSeverity

Info

Informational severity with blue theme. Icon: ● (U+25CF).

public static readonly NotificationSeverity Info

Field Value

NotificationSeverity

None

Generic notification with no specific severity.

public static readonly NotificationSeverity None

Field Value

NotificationSeverity

Success

Success severity with green theme. Icon: ✔ (U+2714).

public static readonly NotificationSeverity Success

Field Value

NotificationSeverity

Warning

Warning severity with yellow theme. Icon: ▲ (U+25B2).

public static readonly NotificationSeverity Warning

Field Value

NotificationSeverity

Properties

Icon

Gets the icon character for this severity level.

public string Icon { get; }

Property Value

string

Name

Gets the display name for this severity level.

public string? Name { get; }

Property Value

string

Severity

Gets the severity level enum value.

public NotificationSeverityEnum Severity { get; }

Property Value

NotificationSeverityEnum

Methods

ActiveBorderForegroundColor(ConsoleWindowSystem)

Gets the active border foreground color (always white).

public Color ActiveBorderForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

Returns

Color

ActiveTitleForegroundColor(ConsoleWindowSystem)

Gets the active title foreground color (always white).

public Color ActiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

Returns

Color

FromSeverity(NotificationSeverityEnum)

Gets a NotificationSeverity instance from a severity enum value.

public static NotificationSeverity FromSeverity(NotificationSeverityEnum severity)

Parameters

severity NotificationSeverityEnum

Returns

NotificationSeverity

Exceptions

NotImplementedException

Thrown if an unknown severity value is provided.

InactiveBorderForegroundColor(ConsoleWindowSystem)

Gets the inactive border foreground color (always white).

public Color InactiveBorderForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

Returns

Color

InactiveTitleForegroundColor(ConsoleWindowSystem)

Gets the inactive title foreground color (always white).

public Color InactiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

Returns

Color

WindowBackgroundColor(ConsoleWindowSystem)

Gets the window background color for this severity level based on the current theme.

public Color WindowBackgroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

Returns

Color