/// <summary> /// Adds a check to <see cref="Checks"/>. /// </summary> public ParameterBuilder AddCheck(ParameterCheckAttribute check) { Checks.Add(check); return(this); }
static async Task <(ParameterCheckAttribute Check, CheckResult Result)> RunCheckAsync(ParameterCheckAttribute check, object argument, CommandContext context) { var checkResult = await check.CheckAsync(argument, context).ConfigureAwait(false); return(check, checkResult); }