public ReliableRequestSessionChannel( ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters, UniqueId inputID) : base(factory, binder.RemoteAddress, binder.Via, true) { this.settings = settings; this.binder = binder; this.session = new ClientReliableSession(this, settings, binder, faultHelper, inputID); this.session.PollingCallback = this.PollingCallback; this.session.UnblockChannelCloseCallback = this.UnblockClose; if (this.settings.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005) { this.shutdownHandle = new InterruptibleWaitObject(false); } else { this.replyAckConsistencyGuard = new Guard(Int32.MaxValue); } this.binder.Faulted += OnBinderFaulted; this.binder.OnException += OnBinderException; this.channelParameters = channelParameters; channelParameters.SetChannel(this); }
public OpenAsyncResult(ClientReliableSession session, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.session = session; this.start = DateTime.UtcNow; IAsyncResult result = this.session.requestor.BeginRequest(timeout, onRequestComplete, this); if (result.CompletedSynchronously) { this.CompleteRequest(result); base.Complete(true); } }
protected ReliableOutputSessionChannel(ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory) { this.settings = settings; this.binder = binder; this.session = new ClientReliableSession(this, settings, binder, faultHelper, null); this.session.PollingCallback = new ClientReliableSession.PollingHandler(this.PollingCallback); this.session.UnblockChannelCloseCallback = new ChannelReliableSession.UnblockChannelCloseHandler(this.UnblockClose); this.binder.Faulted += new BinderExceptionHandler(this.OnBinderFaulted); this.binder.OnException += new BinderExceptionHandler(this.OnBinderException); this.channelParameters = channelParameters; channelParameters.SetChannel(this); }
protected ReliableOutputSessionChannel( ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory) { Settings = settings; _binder = binder; _session = new ClientReliableSession(this, settings, binder, faultHelper, null); _session.PollingCallback = PollingAsyncCallback; _session.UnblockChannelCloseCallback = UnblockClose; _binder.Faulted += OnBinderFaulted; _binder.OnException += OnBinderException; _channelParameters = channelParameters; channelParameters.SetChannel(this); }
public OpenAsyncResult(ClientReliableSession session, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.session = session; this.start = DateTime.UtcNow; IAsyncResult result = this.session.requestor.BeginRequest(timeout, onRequestComplete, this); if (result.CompletedSynchronously) { this.CompleteRequest(result); this.Complete(true); } }