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.

public class NotificationSeverity
Inheritance
NotificationSeverity
Inherited Members

Fields

Danger

Represents a danger/error notification severity with a red visual theme.

public static readonly NotificationSeverity Danger

Field Value

NotificationSeverity

Info

Represents an informational notification severity with a blue visual theme.

public static readonly NotificationSeverity Info

Field Value

NotificationSeverity

None

Represents a generic notification with no specific severity.

public static readonly NotificationSeverity None

Field Value

NotificationSeverity

Severity

Gets the severity level enum value.

public NotificationSeverityEnum Severity

Field Value

NotificationSeverityEnum

Success

Represents a success notification severity with a green visual theme.

public static readonly NotificationSeverity Success

Field Value

NotificationSeverity

Warning

Represents a warning notification severity with a yellow visual theme.

public static readonly NotificationSeverity Warning

Field Value

NotificationSeverity

Properties

Icon

Gets the icon associated with 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

Methods

ActiveBorderForegroundColor(ConsoleWindowSystem)

Gets the active border foreground color for this severity level.

public Color ActiveBorderForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

The console window system to get theme colors from.

Returns

Color

The foreground color for active window borders.

ActiveTitleForegroundColor(ConsoleWindowSystem)

Gets the active title foreground color for this severity level.

public Color ActiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

The console window system to get theme colors from.

Returns

Color

The foreground color for active window titles.

FromSeverity(NotificationSeverityEnum)

Gets a NotificationSeverity instance from a severity enum value.

public static NotificationSeverity FromSeverity(NotificationSeverityEnum severity)

Parameters

severity NotificationSeverityEnum

The severity enum value.

Returns

NotificationSeverity

The corresponding NotificationSeverity instance.

Exceptions

NotImplementedException

Thrown if an unknown severity value is provided.

InactiveBorderForegroundColor(ConsoleWindowSystem)

Gets the inactive border foreground color for this severity level.

public Color InactiveBorderForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

The console window system to get theme colors from.

Returns

Color

The foreground color for inactive window borders.

InactiveTitleForegroundColor(ConsoleWindowSystem)

Gets the inactive title foreground color for this severity level.

public Color InactiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

The console window system to get theme colors from.

Returns

Color

The foreground color for inactive window titles.

WindowBackgroundColor(ConsoleWindowSystem)

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

public Color WindowBackgroundColor(ConsoleWindowSystem consoleWindowSystem)

Parameters

consoleWindowSystem ConsoleWindowSystem

The console window system to get theme colors from.

Returns

Color

The background color for notification windows of this severity.