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
Info
Informational severity with blue theme. Icon: ● (U+25CF).
public static readonly NotificationSeverity Info
Field Value
None
Generic notification with no specific severity.
public static readonly NotificationSeverity None
Field Value
Success
Success severity with green theme. Icon: ✔ (U+2714).
public static readonly NotificationSeverity Success
Field Value
Warning
Warning severity with yellow theme. Icon: ▲ (U+25B2).
public static readonly NotificationSeverity Warning
Field Value
Properties
Icon
Gets the icon character for this severity level.
public string Icon { get; }
Property Value
Name
Gets the display name for this severity level.
public string? Name { get; }
Property Value
Severity
Gets the severity level enum value.
public NotificationSeverityEnum Severity { get; }
Property Value
Methods
ActiveBorderForegroundColor(ConsoleWindowSystem)
Gets the active border foreground color (always white).
public Color ActiveBorderForegroundColor(ConsoleWindowSystem consoleWindowSystem)
Parameters
consoleWindowSystemConsoleWindowSystem
Returns
ActiveTitleForegroundColor(ConsoleWindowSystem)
Gets the active title foreground color (always white).
public Color ActiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)
Parameters
consoleWindowSystemConsoleWindowSystem
Returns
FromSeverity(NotificationSeverityEnum)
Gets a NotificationSeverity instance from a severity enum value.
public static NotificationSeverity FromSeverity(NotificationSeverityEnum severity)
Parameters
severityNotificationSeverityEnum
Returns
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
consoleWindowSystemConsoleWindowSystem
Returns
InactiveTitleForegroundColor(ConsoleWindowSystem)
Gets the inactive title foreground color (always white).
public Color InactiveTitleForegroundColor(ConsoleWindowSystem consoleWindowSystem)
Parameters
consoleWindowSystemConsoleWindowSystem
Returns
WindowBackgroundColor(ConsoleWindowSystem)
Gets the window background color for this severity level based on the current theme.
public Color WindowBackgroundColor(ConsoleWindowSystem consoleWindowSystem)
Parameters
consoleWindowSystemConsoleWindowSystem