/// <summary> /// Initializes a new instance of the <see cref="CommandHandler{TCommand}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" />. /// </exception> protected CommandHandler(ICommandMediator mediator) : base() { Mediator = mediator.RejectIf().IsNull(nameof(mediator)).TargetArgument; }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationController" /> class. /// </summary> /// <param name="applicationConfiguration"> /// Configuration information for the application. /// </param> /// <param name="mediator"> /// A processing intermediary for commands issued by the controller. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="applicationConfiguration" /> is <see langword="null" /> -or- <paramref name="mediator" /> is /// <see langword="null" />. /// </exception> protected ApplicationController(IConfiguration applicationConfiguration, ICommandMediator mediator) { ApplicationConfiguration = applicationConfiguration.RejectIf().IsNull(nameof(applicationConfiguration)).TargetArgument; Mediator = mediator.RejectIf().IsNull(nameof(mediator)).TargetArgument; }