Пример #1
0
 /// <summary>
 ///     Adds a check to <see cref="Checks"/>.
 /// </summary>
 public ParameterBuilder AddCheck(ParameterCheckAttribute check)
 {
     Checks.Add(check);
     return(this);
 }
Пример #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);
                }