private void DisposeInternal() { if (_reader != null) { _reader.Dispose(); _reader = null; } if (_byteStream != null) { _byteStream.Dispose(); _byteStream = null; } if (_stream != null) { _stream.Dispose(); _stream = null; } }
protected virtual void Dispose(bool disposing) { lock (_lockObj) { if (_reader != null) { _reader.Dispose(); _reader = null; } if (_byteStream != null) { Marshal.ReleaseComObject(_byteStream); _byteStream = null; } if (_stream != null) { _stream.Dispose(); _stream = null; } } }