Skip to content
Docs Try Aspire

CommandOptions Properties

Class Properties 7 members
Optional configuration for resource commands added with ResourceBuilderExtensions.WithCommand.
ConfirmationMessage Section titled ConfirmationMessage nullable string?
When a confirmation message is specified, the UI will prompt with an OK/Cancel dialog and the confirmation message before starting the command.
public string? ConfirmationMessage { get; set; }
Description Section titled Description nullable string?
Optional description of the command, to be shown in the UI. Could be used as a tooltip. May be localized.
public string? Description { get; set; }
IconName Section titled IconName nullable string?
The icon name for the command. The name should be a valid FluentUI icon name from https://aka.ms/fluentui-system-icons.
public string? IconName { get; set; }
The icon variant.
public IconVariant? IconVariant { get; set; }
A flag indicating whether the command is highlighted in the UI.
public bool IsHighlighted { get; set; }
Parameter Section titled Parameter nullable object?
Optional parameter that configures the command in some way. Clients must return any value provided by the server when invoking the command.
public object? Parameter { get; set; }
UpdateState Section titled UpdateState nullable Func<UpdateCommandStateContext, ResourceCommandState>

A callback that is used to update the command state. The callback is executed when the command's resource snapshot is updated.

If a callback isn't specified, the command is always enabled.

public Func<UpdateCommandStateContext, ResourceCommandState>? UpdateState { get; set; }