private void Dispose(bool disposing) { if (_disposed) { return; } GC.SuppressFinalize(this); _tmrStatistics.Dispose(); _workerThread.Abort(); _workerThread.Join(); if (disposing) { _messageQueue.Dispose(); _entityTable.Dispose(); } _disposed = true; }
private void Dispose(bool disposing) { if (Disposed) { return; } GC.SuppressFinalize(this); try { Stop(); } catch { } _statistics.Dispose(); if (disposing) { _transportLock.AcquireReaderLock(DEFAULT_JOIN_TIMEOUT); try { foreach (KeyValuePair <string, IOutboundTransport> trans in _transports) { trans.Value.Dispose(); } } finally { _transportLock.ReleaseReaderLock(); } _messageQueue.Dispose(); } Disposed = true; }