Esempio n. 1
0
 public void Open()
 {
     try { _connectionThread = Threads.Dispose(_connectionThread, ref _connectionEnd); }
     catch { }
     _connectionThread = Threads.Create(ConnectionAgent, ref _connectionEnd, "OPC Connection thread");
     _connectionThread.Start();
 }
Esempio n. 2
0
 public void Dispose()
 {
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _connectionThread != null)
         {
             _connectionThread = Threads.Dispose(_connectionThread, ref _connectionEnd);
         }
     }
     catch { }
     finally { _connectionThread = null; }
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _groupRead != null)
         {
             _groupRead.Dispose();
         }
     }
     catch { }
     finally { _groupRead = null; }
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _groupWrite != null)
         {
             _groupWrite.Dispose();
         }
     }
     catch { }
     finally { _groupWrite = null; }
 }
Esempio n. 3
0
 public static void SpeedMsgStop()
 {
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _speedMsgThread != null)
         {
             _speedMsgThread = Threads.Dispose(_speedMsgThread, ref _speedMsgEnd);
         }
     }
     catch { }
     finally { _speedMsgThread = null; }
 }
Esempio n. 4
0
 public void Dispose()
 {
     _sendCancel.Cancel();
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _sendThread != null)
         {
             _sendThread = Threads.Dispose(_sendThread, ref _sendEnd, Utilities.Time10SECONDS);
         }
     }
     catch { }
     finally { _sendThread = null; }
 }
Esempio n. 5
0
 public void Dispose()
 {
     _searchCancel.Cancel();
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _searchThread != null)
         {
             _searchThread = Threads.Dispose(_searchThread, ref _searchEnd);
         }
     }
     catch { }
     finally { _searchThread = null; }
 }
 public void Dispose()
 {
     _activeScanEndPoint.Dispose();
     _updateCancel.Cancel();
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _updateThread != null)
         {
             _updateThread = Threads.Dispose(_updateThread, ref _updateEnd);
         }
     }
     catch { }
     finally { _updateThread = null; }
 }
Esempio n. 7
0
 protected virtual void Dispose(bool isDisposing)
 {
     if (/*dispose?*/ isDisposing)
     {
         _sendRawDataCancel.Cancel();
         try
         {
             if (/*exists (avoid first try exceptions)?*/ _sendRawDataThread != null)
             {
                 _sendRawDataThread = Threads.Dispose(_sendRawDataThread, ref _sendRawDataEnd, Utilities.Time10SECONDS);
             }
         }
         catch { }
         finally { _sendRawDataThread = null; }
         Logger.LogInfo("---" + ClassName + "---");
         Logger   = null;
         Disposed = true;
     }
 }
Esempio n. 8
0
 public void Dispose()
 {
     _normalizeCancel.Cancel();
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _normalizeThread != null)
         {
             _normalizeThread = Threads.Dispose(_normalizeThread, ref _normalizeEnd);
         }
     }
     catch { }
     finally { _normalizeThread = null; }
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _objectSearch != null)
         {
             _objectSearch.Dispose();
         }
     }
     catch { }
     finally { _objectSearch = null; }
 }
Esempio n. 9
0
 public void Dispose()
 {
     _processCancel.Cancel();
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _processThread != null)
         {
             _processThread = Threads.Dispose(_processThread, ref _processEnd, Utilities.Time10SECONDS);
         }
     }
     catch { }
     finally { _processThread = null; }
     try
     {
         if (/*exists (avoid first try exceptions)?*/ _normalize != null)
         {
             _normalize.Dispose();
         }
     }
     catch { }
     finally { _normalize = null; }
     _log = null;
 }
Esempio n. 10
0
 public void Dispose()
 {
     try { _connectionThread = Threads.Dispose(_connectionThread, ref _connectionEnd); }
     catch { }
     finally { _connectionThread = null; }
     try
     {
         if (_groupRead != null)
         {
             _groupRead.Dispose();
         }
     }
     catch { }
     finally { _groupRead = null; }
     try
     {
         if (_groupWrite != null)
         {
             _groupWrite.Dispose();
         }
     }
     catch { }
     finally { _groupWrite = null; }
 }