/// <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); }
/// <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); }