Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
 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();
 }
Ejemplo n.º 5
0
        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());
        }