protected virtual void Dispose(bool finalize) { if (_isDisposed) { return; } _isDisposed = true; if (_writer != null && _textWriter != null) { _writer.EndWrite(_textWriter.Value); } if (_closeStreamOnDispose) { if (_textWriter != null) { _textWriter.Value.Dispose(); } } else { if (_textWriter != null) { _textWriter.Value.Flush(); } } if (!finalize) { GC.SuppressFinalize(this); } }
public void Dispose() { _writer.EndWrite(_textWriter); if (_closeStreamOnDispose) { _textWriter.Dispose(); } }
public void Dispose() { if (_isDisposed) { return; } _writer.EndWrite(_textWriter); if (_closeStreamOnDispose) { _textWriter.Dispose(); } }
public void Dispose() { if (_isDisposed) { return; } _isDisposed = true; if (_writer != null) { _writer.EndWrite(_textWriter); } if (_closeStreamOnDispose) { if (_textWriter != null) { _textWriter.Dispose(); } } }