/// <summary> /// Initializes a new instance of the <see cref="QueuePublisher{TMessage}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="client"> /// A client that facilitates message publishing operations. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="client" /> is <see langword="null" />. /// </exception> public QueuePublisher(ICommandMediator mediator, IMessagePublishingClient client) : base(mediator, client, MessagingEntityType.Queue) { return; }
/// <summary> /// Initializes a new instance of the <see cref="MessagePublisher{TMessage}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="client"> /// A client that facilitates message publishing operations. /// </param> /// <param name="entityType"> /// The targeted entity type. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="client" /> is <see langword="null" />. /// </exception> /// <exception cref="ArgumentOutOfRangeException"> /// <paramref name="entityType" /> is equal to <see cref="MessagingEntityType.Unspecified" />. /// </exception> protected MessagePublisher(ICommandMediator mediator, IMessagePublishingClient client, MessagingEntityType entityType) : base(mediator, MessageHandlerRole.Publisher, entityType) { Client = client.RejectIf().IsNull(nameof(client)).TargetArgument; }
/// <summary> /// Initializes a new instance of the <see cref="MessagePublisher{TRequestMessage, TResponseMessage}" /> class. /// </summary> /// <param name="mediator"> /// A processing intermediary that is used to process sub-commands. /// </param> /// <param name="client"> /// A client that facilitates message publishing operations. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="mediator" /> is <see langword="null" /> -or- <paramref name="client" /> is <see langword="null" />. /// </exception> public RequestPublisher(ICommandMediator mediator, IMessagePublishingClient client) : base(mediator, client) { return; }