Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

RequiredCommandValidationContext

Handle
📦 Aspire.Hosting v17.0.0

Provides context for validating a required command.

type RequiredCommandValidationContext interface{}

Properties

propertyCancellationToken*CancellationTokenget
Gets a cancellation token that can be used to cancel the validation.
CancellationToken() (*CancellationToken, error)
propertyResolvedPathstringget
Gets the resolved full path to the command executable.
ResolvedPath() (string, error)
propertyServicesServiceProviderget
Gets the service provider for accessing application services.
Services() ServiceProvider

Methods

methodFailure
Creates a failed validation result with the specified message.
Failure(validationMessage string) RequiredCommandValidationResult
validationMessagestringA message describing why validation failed.
RequiredCommandValidationResult

A RequiredCommandValidationResult indicating the command is invalid.

Returns a handle; failures surface later via Err().

methodSuccess
Creates a successful validation result.
Success() RequiredCommandValidationResult
RequiredCommandValidationResult

A RequiredCommandValidationResult indicating the command is valid.

Returns a handle; failures surface later via Err().