void SetupServiceHost() { ChannelBuilder channelBuilder = new ChannelBuilder(this.IssuerBindingContext.Clone(), true); channelBuilder.Binding.Elements.Insert(0, new ReplyAdapterBindingElement()); channelBuilder.Binding = new CustomBinding(this.GetNegotiationBinding(channelBuilder.Binding)); negotiationHost = new NegotiationHost(this, this.ListenUri, channelBuilder, this.GetListenerFilter()); }
public override void OnAbort() { if (this.negotiationHost != null) { this.negotiationHost.Abort(); this.negotiationHost = null; } lock (ThisLock) { if (this.idlingNegotiationSessionTimer != null && !this.isTimerCancelled) { this.isTimerCancelled = true; this.idlingNegotiationSessionTimer.Cancel(); } } base.OnAbort(); }
public override void OnClose(TimeSpan timeout) { TimeoutHelper timeoutHelper = new TimeoutHelper(timeout); if (this.negotiationHost != null) { this.negotiationHost.Close(timeoutHelper.RemainingTime()); this.negotiationHost = null; } lock (ThisLock) { if (this.idlingNegotiationSessionTimer != null && !this.isTimerCancelled) { this.isTimerCancelled = true; this.idlingNegotiationSessionTimer.Cancel(); } } base.OnClose(timeoutHelper.RemainingTime()); }
public override void OnAbort() { if (this.negotiationHost != null) { this.negotiationHost.Abort(); this.negotiationHost = null; } if (this.issuedTokenCache != null) { this.issuedTokenCache.ClearContexts(); } lock (this.ThisLock) { if ((this.idlingNegotiationSessionTimer != null) && !this.isTimerCancelled) { this.isTimerCancelled = true; this.idlingNegotiationSessionTimer.Cancel(); } } base.OnAbort(); }
public override void OnClose(TimeSpan timeout) { TimeoutHelper helper = new TimeoutHelper(timeout); if (this.negotiationHost != null) { this.negotiationHost.Close(helper.RemainingTime()); this.negotiationHost = null; } if (this.issuedTokenCache != null) { this.issuedTokenCache.ClearContexts(); } lock (this.ThisLock) { if ((this.idlingNegotiationSessionTimer != null) && !this.isTimerCancelled) { this.isTimerCancelled = true; this.idlingNegotiationSessionTimer.Cancel(); } } base.OnClose(helper.RemainingTime()); }