Skip to content

NotificationAction

Namespace: Hex1b

Assembly: Hex1b.dll

Represents an action button on a notification.

csharp
public sealed record NotificationAction : IEquatable<NotificationAction>

Inheritance

ObjectNotificationAction

Implements

Constructors

NotificationAction(string, Func<NotificationActionContext, Task>)

Represents an action button on a notification.

Parameters:

csharp
public NotificationAction(string Label, Func<NotificationActionContext, Task> Handler)

Properties

Handler

The async handler invoked when the action is triggered.

Returns: Func<NotificationActionContext, Task>

csharp
public Func<NotificationActionContext, Task> Handler { get; init; }

Label

The button label text.

Returns: String

csharp
public string Label { get; init; }

Released under the MIT License.