示例#1
0
 /// <summary>
 /// Adds a pre-execution check to this command.
 /// </summary>
 /// <param name="check">Pre-execution check to add to this command.</param>
 /// <returns>This builder.</returns>
 public CommandBuilder WithExecutionCheck(CheckBaseAttribute check)
 {
     if (!ExecutionCheckList.Contains(check))
     {
         ExecutionCheckList.Add(check);
     }
     return(this);
 }
示例#2
0
 /// <summary>
 /// Adds pre-execution checks to this command.
 /// </summary>
 /// <param name="checks">Pre-execution checks to add to this command.</param>
 /// <returns>This builder.</returns>
 public CommandBuilder WithExecutionChecks(params CheckBaseAttribute[] checks)
 {
     ExecutionCheckList.AddRange(checks.Except(ExecutionCheckList));
     return(this);
 }