Ejemplo n.º 1
0
 protected override void OnAbort()
 {
     this.instances.Abort();
     foreach (ChannelDispatcherBase base2 in this.ChannelDispatchers)
     {
         if (base2.Listener != null)
         {
             base2.Listener.Abort();
         }
         base2.Abort();
     }
     ThreadTrace.StopTracing();
 }
Ejemplo n.º 2
0
 protected override void OnEndClose(IAsyncResult result)
 {
     try
     {
         CloseAsyncResult.End(result);
         this.TraceBaseAddresses();
         ThreadTrace.StopTracing();
     }
     catch (TimeoutException exception)
     {
         if (DiagnosticUtility.ShouldTraceWarning)
         {
             TraceUtility.TraceEvent(TraceEventType.Warning, 0x8002e, System.ServiceModel.SR.GetString("TraceCodeServiceHostTimeoutOnClose"), this, exception);
         }
         base.Abort();
     }
 }
Ejemplo n.º 3
0
 protected override void OnClose(TimeSpan timeout)
 {
     try
     {
         TimeoutHelper helper = new TimeoutHelper(timeout);
         if (ManagementExtension.IsEnabled && (this.Description != null))
         {
             ManagementExtension.OnServiceClosing(this);
         }
         for (int i = 0; i < this.ChannelDispatchers.Count; i++)
         {
             ChannelDispatcherBase base2 = this.ChannelDispatchers[i];
             if (base2.Listener != null)
             {
                 base2.Listener.Close(helper.RemainingTime());
             }
         }
         for (int j = 0; j < this.ChannelDispatchers.Count; j++)
         {
             this.ChannelDispatchers[j].CloseInput(helper.RemainingTime());
         }
         this.instances.CloseInput(helper.RemainingTime());
         this.instances.Close(helper.RemainingTime());
         for (int k = 0; k < this.ChannelDispatchers.Count; k++)
         {
             this.ChannelDispatchers[k].Close(helper.RemainingTime());
         }
         this.TraceBaseAddresses();
         ThreadTrace.StopTracing();
     }
     catch (TimeoutException exception)
     {
         if (DiagnosticUtility.ShouldTraceWarning)
         {
             TraceUtility.TraceEvent(TraceEventType.Warning, 0x8002e, System.ServiceModel.SR.GetString("TraceCodeServiceHostTimeoutOnClose"), this, exception);
         }
         base.Abort();
     }
 }