Skip to content
Docs Try Aspire

ResourceCommandAnnotation Constructors

Class Constructors 1 member
Represents a command annotation for a resource.
Constructor(string, string, Func<UpdateCommandStateContext, ResourceCommandState>, Func<ExecuteCommandContext, Task<ExecuteCommandResult>>, string?, object?, string?, string?, IconVariant?, bool) Section titled Constructor(string, string, Func<UpdateCommandStateContext, ResourceCommandState>, Func<ExecuteCommandContext, Task<ExecuteCommandResult>>, string?, object?, string?, string?, IconVariant?, bool)
Initializes a new instance of the ResourceCommandAnnotation class.
public sealed class ResourceCommandAnnotation
{
public ResourceCommandAnnotation(
string name,
string displayName,
Func<UpdateCommandStateContext, ResourceCommandState> updateState,
Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand,
string? displayDescription,
object? parameter,
string? confirmationMessage,
string? iconName,
IconVariant? iconVariant,
bool isHighlighted)
{
// ...
}
}
name string
displayName string
updateState Func<UpdateCommandStateContext, ResourceCommandState>
executeCommand Func<ExecuteCommandContext, Task<ExecuteCommandResult>>
displayDescription string?
parameter object?
confirmationMessage string?
iconName string?
iconVariant IconVariant?
isHighlighted bool