protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { mongoRepository.Dispose(); } } this.disposed = true; }
/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _tokenRepository.Dispose(); _blockRepository.Dispose(); _blockSyncRequestRepository.Dispose(); _priceRepository.Dispose(); _tokenRepository.Dispose(); _transactionReceiptRepository.Dispose(); _transactionRepository.Dispose(); } _blockService = null; _disposed = true; }