System.Net.Cache.SingleItemRequestCache.WriteOnlyStream.Dispose C# (CSharp) Method

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
            protected override void Dispose(bool disposing)
            {
                _Disposed = true;
                base.Dispose(disposing);  // Do we mean to do this here????
                if (disposing) {
                    if (_RealStream != null)
                        try {
                            _RealStream.Close();
                        }
                        catch {
                        }

                    byte[] allBytes = new byte[_TotalSize];
                    int offset = 0;
                    for (int i = 0; i < _Buffers.Count; ++i)
                    {
                        byte[] buffer = (byte[])_Buffers[i];
                        Buffer.BlockCopy(buffer, 0, allBytes, offset, buffer.Length);
                        offset += buffer.Length;
                    }

                    _Cache.Commit(_Key, _TempEntry, allBytes);
                }
            }