Beispiel #1
0
        public QueueChannel(IServiceProvider serviceProvider, Channels.Channel <IMessage> channel, string name, ILogger logger = null)
            : base(serviceProvider, name, logger)
        {
            if (channel == null)
            {
                throw new ArgumentNullException(nameof(channel));
            }

            _channel = channel;
            Writer   = new QueueChannelWriter(this, logger);
            Reader   = new QueueChannelReader(this, logger);
        }
Beispiel #2
0
        public QueueChannel(IApplicationContext context, Channels.Channel <IMessage> channel, string name, ILogger logger = null)
            : base(context, name, logger)
        {
            if (channel == null)
            {
                throw new ArgumentNullException(nameof(channel));
            }

            _channel = channel;
            Writer   = new QueueChannelWriter(this, logger);
            Reader   = new QueueChannelReader(this, logger);
        }