public DirectChannel(IApplicationContext context, ILoadBalancingStrategy loadBalancingStrategy, string name, ILogger logger = null) : base(context, new UnicastingDispatcher(context), name, logger) { Dispatcher.LoadBalancingStrategy = loadBalancingStrategy; Dispatcher.MaxSubscribers = int.MaxValue; Writer = new DirectChannelWriter(this, logger); Reader = new NotSupportedChannelReader(); }
public DirectChannel(IServiceProvider serviceProvider, ILoadBalancingStrategy loadBalancingStrategy, string name, ILogger logger = null) : base(serviceProvider, new UnicastingDispatcher(serviceProvider), name, logger) { Dispatcher.LoadBalancingStrategy = loadBalancingStrategy; Dispatcher.MaxSubscribers = int.MaxValue; Writer = new DirectChannelWriter(this, logger); Reader = new NotSupportedChannelReader(); }
public PublishSubscribeChannel(IApplicationContext context, TaskScheduler executor, string name, ILogger logger = null) : base(context, new BroadcastingDispatcher(context, executor), executor, name, logger) { BroadcastingDispatcher.IgnoreFailures = false; BroadcastingDispatcher.ApplySequence = false; BroadcastingDispatcher.MinSubscribers = 0; Dispatcher.MessageHandlingDecorator = new MessageHandlingDecorator(this); Writer = new PublishSubscribeChannelWriter(this, logger); Reader = new NotSupportedChannelReader(); }
public TaskSchedulerChannel(IApplicationContext context, TaskScheduler executor, ILoadBalancingStrategy loadBalancingStrategy, string name, ILogger logger = null) : base(context, new UnicastingDispatcher(context, executor, logger), executor, name, logger) { if (executor == null) { throw new ArgumentNullException(nameof(executor)); } Dispatcher.MessageHandlingDecorator = new MessageHandlingDecorator(this); Dispatcher.LoadBalancingStrategy = loadBalancingStrategy; Dispatcher.MessageHandlingDecorator = new MessageHandlingDecorator(this); Writer = new TaskSchedulerChannelWriter(this, logger); Reader = new NotSupportedChannelReader(); }
public NullChannel(ILogger logger = null) { _logger = logger; Writer = new NotSupportedChannelWriter(); Reader = new NotSupportedChannelReader(); }