Skip to content
Docs Try Aspire

IRequiredCommandValidator Methods

Interface Methods 1 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)
{
// ...
}
}
resource IResource The resource that requires the command.
annotation RequiredCommandAnnotation The annotation describing the required command.
cancellationToken CancellationToken A cancellation token.
Task<RequiredCommandValidationResult> A RequiredCommandValidationResult indicating whether validation succeeded.
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.