LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

PluginNotificationAction14.1 Beta

C#
public sealed class Unbroken.LaunchBox.Plugins.Notifications.PluginNotificationAction
Describes an action that the user can invoke from a plugin notification.

Remarks

The callback begins in response to a user-interface command and should yield promptly when doing longer-running work. LaunchBox observes and logs callback exceptions so they do not escape through the notification UI.

Constructors

PluginNotificationAction 14.1 Beta

C#
public PluginNotificationAction(string label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)
Initializes an action that can be invoked from a notification.
label 14.1 Beta
The action label as literal text.
executeAsync 14.1 Beta
The asynchronous callback. Its token is cancelled when the notification is dismissed while the action runs.

PluginNotificationAction 14.1 Beta

C#
public PluginNotificationAction(Unbroken.LaunchBox.Plugins.PluginText label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)
Initializes an action that can be invoked from a notification.
label 14.1 Beta
The action label as literal or package-localized text.
executeAsync 14.1 Beta
The asynchronous callback. Its token is cancelled when the notification is dismissed while the action runs.

Properties

DismissNotificationAfterExecution 14.1 Beta

C#
public bool DismissNotificationAfterExecution { get; init; }
Gets whether the notification should be dismissed after the callback completes. The default is true.

ExecuteAsync 14.1 Beta

C#
public System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> ExecuteAsync { get; }
Gets the callback invoked when the user selects the action. Its cancellation token is cancelled if the notification is dismissed while the callback is running.

Label 14.1 Beta

C#
public Unbroken.LaunchBox.Plugins.PluginText Label { get; }
Gets the user-facing action label. LaunchBox collapses whitespace and truncates labels longer than 80 characters.