/// <summary> /// Adds a check to <see cref="Checks"/>. /// </summary> public ParameterBuilder AddCheck(ParameterCheckBaseAttribute check) { Checks.Add(check); return(this); }
private async Task <(ParameterCheckBaseAttribute Check, string Error)> RunCheckAsync(ParameterCheckBaseAttribute check, object argument, ICommandContext context, IServiceProvider provider) { var checkResult = await check.CheckAsync(this, argument, context, provider); return(check, checkResult.Error); }