Skip to content
DocsTry Aspire
DocsTry

IRequiredCommandValidator Methods

InterfaceMethods1 member
A service that validates required commands/executables are available on the local machine.
Validates that a required command is available and meets any custom validation requirements.
public interface IRequiredCommandValidator
{
public abstract Task<RequiredCommandValidationResult> ValidateAsync(
IResource resource,
RequiredCommandAnnotation annotation,
CancellationToken cancellationToken)
{
// ...
}
}
resourceIResourceThe resource that requires the command.
annotationRequiredCommandAnnotationThe annotation describing the required command.
cancellationTokenCancellationTokenA cancellation token.
Validations are coalesced per command. If the same command has already been validated, the cached result is used. If validation fails, a warning is logged but the resource is allowed to attempt to start.