Esempio n. 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!isDisposed)
     {
         if (debug)
         {
             log.Debug("Dispose()");
         }
         isDisposed = true;
         if (disposing)
         {
             if (socket != null)
             {
                 socket.Dispose();
             }
             if (taskTimer != null)
             {
                 taskTimer.Dispose();
                 if (debug)
                 {
                     log.Debug("Stopped task timer.");
                 }
             }
             if (socketTask != null)
             {
                 socketTask.Stop();
             }
             nextConnectTime = Factory.Parallel.TickCount + 10000;
         }
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (!isDisposed)
     {
         if (debug)
         {
             log.Debug("Dispose()");
         }
         isDisposed = true;
         if (disposing)
         {
             if (socket != null)
             {
                 socket.Dispose();
             }
             if (taskTimer != null)
             {
                 taskTimer.Dispose();
                 if (debug)
                 {
                     log.Debug("Stopped task timer.");
                 }
             }
             if (socketTask != null)
             {
                 socketTask.Stop();
             }
         }
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (!isDisposed)
     {
         isDisposed = true;
         if (disposing)
         {
             if (debug)
             {
                 log.Debug("Dispose()");
             }
             if (queueTask != null)
             {
                 queueTask.Stop();
                 queueTask.Join();
             }
             if (reader != null)
             {
                 reader.Dispose();
             }
             if (tickTimer != null)
             {
                 tickTimer.Dispose();
             }
             if (fillSimulator != null)
             {
                 if (debug)
                 {
                     log.Debug("Setting fillSimulator.IsOnline false");
                 }
                 fillSimulator.IsOnline = false;
             }
             else
             {
                 if (debug)
                 {
                     log.Debug("fillSimulator is null.");
                 }
             }
         }
     }
     else
     {
         if (debug)
         {
             log.Debug("isDisposed " + isDisposed);
         }
     }
 }