protected virtual void Dispose(bool disposing, CloseExState closeState) {
// All calls below should already be idempotent.
ICloseEx icloseEx = m_ParentStream as ICloseEx;
if (icloseEx != null) {
icloseEx.CloseEx(closeState);
}
else {
m_ParentStream.Close();
}
base.Dispose(disposing);
}
}