示例#1
0
 internal override void CloseInput(TimeSpan timeout)
 {
     this.CloseInput();
     if (this.performDefaultCloseInput)
     {
         TimeoutHelper helper = new TimeoutHelper(timeout);
         lock (base.ThisLock)
         {
             if (DiagnosticUtility.ShouldTraceInformation)
             {
                 for (int i = 0; i < this.endpointDispatchers.Count; i++)
                 {
                     EndpointDispatcher endpoint = this.endpointDispatchers[i];
                     this.TraceEndpointLifetime(endpoint, 0x40007, System.ServiceModel.SR.GetString("TraceCodeEndpointListenerClose"));
                 }
             }
             ListenerHandler listenerHandler = this.listenerHandler;
             if (listenerHandler != null)
             {
                 listenerHandler.CloseInput(helper.RemainingTime());
             }
         }
         if (!this.session)
         {
             ListenerHandler handler2 = this.listenerHandler;
             if (handler2 != null)
             {
                 handler2.Close(helper.RemainingTime());
             }
         }
     }
 }
示例#2
0
        internal override void CloseInput(TimeSpan timeout)
        {
            // we have to perform some slightly convoluted logic here due to
            // backwards compat. We probably need an IAsyncChannelDispatcher
            // interface that has timeouts and async
            this.CloseInput();

            if (_performDefaultCloseInput)
            {
                TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);
                lock (this.ThisLock)
                {
                    ListenerHandler handler = _listenerHandler;
                    if (handler != null)
                    {
                        handler.CloseInput(timeoutHelper.RemainingTime());
                    }
                }

                if (!_session)
                {
                    ListenerHandler handler = _listenerHandler;
                    if (handler != null)
                    {
                        handler.Close(timeoutHelper.RemainingTime());
                    }
                }
            }
        }
        internal override void CloseInput(TimeSpan timeout)
        {
            // we have to perform some slightly convoluted logic here due to
            // backwards compat. We probably need an IAsyncChannelDispatcher
            // interface that has timeouts and async
            this.CloseInput();

            if (this.performDefaultCloseInput)
            {
                TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);
                lock (this.ThisLock)
                {
                    if (DiagnosticUtility.ShouldTraceInformation)
                    {
                        for (int i = 0; i < this.endpointDispatchers.Count; i++)
                        {
                            EndpointDispatcher endpointDispatcher = this.endpointDispatchers[i];
                            this.TraceEndpointLifetime(endpointDispatcher, TraceCode.EndpointListenerClose, SR.GetString(SR.TraceCodeEndpointListenerClose));
                        }
                    }

                    ListenerHandler handler = this.listenerHandler;
                    if (handler != null)
                    {
                        handler.CloseInput(timeoutHelper.RemainingTime());
                    }
                }

                if (!this.session)
                {
                    ListenerHandler handler = this.listenerHandler;
                    if (handler != null)
                    {
                        handler.Close(timeoutHelper.RemainingTime());
                    }
                }
            }
        }