protected override void Dispose(bool disposing)
{
// this gets called by Stream.Close()
// if (_isDisposed) return;
// _isDisposed = true;
//Console.WriteLine("Dispose (mode={0})\n", rwMode.ToString());
try
{
if (_innerStream != null)
{
#if NETCF
_innerStream.Close();
#else
_innerStream.Dispose();
#endif
//_innerStream = null;
if (rwMode == RwMode.Write)
{
if (_exceptionPending)
{
// possibly could try to clean up all the
// temp files created so far...
}
else
{
// // move the final temp file to the .zNN name
// if (File.Exists(CurrentName))
// File.Delete(CurrentName);
// if (File.Exists(_currentTempName))
// File.Move(_currentTempName, CurrentName);
}
}
}
}
finally
{
base.Dispose(disposing);
}
}