/// <summary> /// Method to make sure that all unmanaged resources are released properly. /// </summary> public void Dispose() { if (_oPkg != null) { _oPkg.Close(); _oPkg.Dispose(); _oPkg = null; } if (_pkg != null) { _pkg.Close(); _pkg = null; } if (_stream != null) { _stream.Close(); _stream.Dispose(); _stream = null; } }
/// <inheritdoc /> public void Dispose() { _document.Dispose(); _package.Dispose(); }