Exemplo n.º 1
0
 /// <summary>
 ///     Adds a check to <see cref="Checks"/>.
 /// </summary>
 public ParameterBuilder AddCheck(ParameterCheckAttribute check)
 {
     Checks.Add(check);
     return(this);
 }
Exemplo n.º 2
0
                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);
                }