/// <summary>
        /// Initializes a new instance of the <see cref="CompositeTaskProcessorMessageBus"/> class.
        /// </summary>
        /// <param name="masterCommands">The master commands queue to use.</param>
        /// <exception cref="ArgumentNullException">Parameter <paramref name="masterCommands"/> is null.</exception>
        public CompositeTaskProcessorMessageBus(ITaskProcessorMessageQueue masterCommands)
        {
            if (masterCommands == null)
            {
                throw new ArgumentNullException(nameof(masterCommands));
            }

            this.masterCommands = masterCommands;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RedisTaskMessageBusSender"/> class.
        /// </summary>
        /// <param name="provider">The Redis provider to use.</param>
        /// <param name="masterCommandsQueue">The master commands queue where to push the master commands.</param>
        /// <exception cref="ArgumentNullException">Parameter <paramref name="provider"/> or <paramref name="masterCommandsQueue"/> is null.</exception>
        public RedisTaskMessageBusSender(IRedisProvider provider, ITaskProcessorMessageQueue masterCommandsQueue)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            if (masterCommandsQueue == null)
            {
                throw new ArgumentNullException(nameof(masterCommandsQueue));
            }

            this.provider            = provider;
            this.masterCommandsQueue = masterCommandsQueue;
        }