Skip to content
Docs Try Aspire

IResource.withCommand

Method
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface IResource {
// ... omitted for brevity
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => ExecuteCommandResult, commandOptions?: CommandOptions): IResource;
}

Signature

method withCommand builder
Adds a resource command
withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => ExecuteCommandResult, commandOptions?: CommandOptions): IResource
name string
displayName string
executeCommand (arg: ExecuteCommandContext) => ExecuteCommandResult
commandOptions CommandOptions optional
IResource

Defined on

This method is defined on the following type: