IRequiredCommandValidator Methods
Interface Methods 1 member
A service that validates required commands/executables are available on the local machine.
ValidateAsync(IResource, RequiredCommandAnnotation, CancellationToken) Section titled ValidateAsync(IResource, RequiredCommandAnnotation, CancellationToken) abstract Task<RequiredCommandValidationResult> 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) { // ... }}Parameters
resource IResource The resource that requires the command. annotation RequiredCommandAnnotation The annotation describing the required command. cancellationToken CancellationToken A cancellation token. Returns
Task<RequiredCommandValidationResult> A RequiredCommandValidationResult indicating whether validation succeeded. Remarks
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.