System.IO.Compression.ZipArchive.CloseStreams C# (CSharp) Method

CloseStreams() private method

private CloseStreams ( ) : void
return void
        private void CloseStreams()
        {
            if (!_leaveOpen)
            {
                _archiveStream.Dispose();
                if (_backingStream != null)
                    _backingStream.Dispose();
                if (_archiveReader != null)
                    _archiveReader.Dispose();
            }
            else
            {
                /* if _backingStream isn't null, that means we assigned the original stream they passed
                 * us to _backingStream (which they requested we leave open), and _archiveStream was
                 * the temporary copy that we needed
                 */
                if (_backingStream != null)
                    _archiveStream.Dispose();
            }
        }