Пример #1
0
 /// <summary>
 /// Dispose the stream.
 /// </summary>
 /// <remarks>
 /// This may or may not result in a <c>Close()</c> call on the captive stream.
 /// See the constructors that have a <c>leaveOpen</c> parameter for more information.
 /// </remarks>
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (!_disposed)
         {
             if (disposing && (_baseStream != null))
             {
                 _baseStream.Dispose();
             }
             _disposed = true;
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
Пример #2
0
 /// <summary>
 /// Dispose the stream.
 /// </summary>
 /// <remarks>
 /// This may or may not result in a <c>Close()</c> call on the captive stream.
 /// See the doc on constructors that take a <c>leaveOpen</c> parameter for more information.
 /// </remarks>
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (!disposed)
         {
             if (disposing && (BaseStream != null))
             {
                 BaseStream.Dispose();
                 crc32 = BaseStream.Crc32;
             }
             disposed = true;
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }