public async Task <IServiceChannelDispatcher> CreateServiceChannelDispatcherAsync(IChannel channel) { ServiceChannel.SessionIdleManager sessionIdleManager = channel.GetProperty <ServiceChannel.SessionIdleManager>(); IChannelBinder binder = null; if (channel is IReplyChannel) { ReplyChannelBinder rcbinder = channel.GetProperty <ReplyChannelBinder>(); rcbinder.Init(channel as IReplyChannel, BaseAddress); binder = rcbinder; } else if (channel is IDuplexSessionChannel) { DuplexChannelBinder dcbinder = channel.GetProperty <DuplexChannelBinder>(); dcbinder.Init(channel as IDuplexSessionChannel, _requestReplyCorrelator, BaseAddress); binder = dcbinder; } else if (channel is IInputChannel) { InputChannelBinder icbinder = channel.GetProperty <InputChannelBinder>(); icbinder.Init(channel as IInputChannel, BaseAddress); binder = icbinder; } // TODO: Wire up wasChannelThrottled var channelHandler = new ChannelHandler(Binding.MessageVersion, binder, channel.GetProperty <ServiceThrottle>(), this, /*wasChannelThrottled*/ false, sessionIdleManager); IServiceChannelDispatcher channelDispatcher = channelHandler.GetDispatcher(); // channel.ChannelDispatcher = channelDispatcher; await channelHandler.OpenAsync(); return(channelDispatcher); }
internal InputRequestContext(Message request, InputChannelBinder binder) : base(request, TimeSpan.Zero, TimeSpan.Zero) { this.binder = binder; }