14.1 Beta 1 SDK
PluginNotificationAction14.1 Beta
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
public PluginNotificationAction(string label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)public PluginNotificationAction(Unbroken.LaunchBox.Plugins.PluginText label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)
PluginNotificationAction 14.1 Beta
public PluginNotificationAction(string label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)PluginNotificationAction 14.1 Beta
public PluginNotificationAction(Unbroken.LaunchBox.Plugins.PluginText label, System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> executeAsync)Properties
public bool DismissNotificationAfterExecution { get; init; }public System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> ExecuteAsync { get; }public Unbroken.LaunchBox.Plugins.PluginText Label { get; }
DismissNotificationAfterExecution 14.1 Beta
public bool DismissNotificationAfterExecution { get; init; }
Gets whether the notification should be dismissed after the callback completes. The default is true.
ExecuteAsync 14.1 Beta
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
public Unbroken.LaunchBox.Plugins.PluginText Label { get; }
Gets the user-facing action label. LaunchBox collapses whitespace and truncates labels longer than 80 characters.