Ejemplo n.º 1
0
 public virtual void Dispose()
 {
     this.disposing = true;
     ReportableObjectDirectory.Remove(this.queueName);
     if (this.dispatcher.Name != DispatcherFactory.DefaultDispatcher.Name)
     {
         this.dispatcherQueue.Dispose();
         this.dispatcher.Dispose();
     }
     else
     {
         this.dispatcherQueue.Dispose();
         if (DispatcherFactory.DefaultDispatcher != null && DispatcherFactory.DefaultDispatcher.DispatcherQueues.Count == 0)
         {
             this.dispatcher = null;
             DispatcherFactory.DestroyDefaultDispatcher();
         }
     }
     GC.SuppressFinalize(this);
     LoggerWrapper.Logger.Debug(string.Format("Teardown of queue {0} completed", new object[]
     {
         this.queueName
     }));
 }