/// <summary></summary> /// <param name="s"></param> /// <param name="requiresSwitch">Is there an actual order switch even occurring?</param> public EndianFormatSwitchBlock(EndianReader s, bool requiresSwitch) { mStream = requiresSwitch ? s : null; if (requiresSwitch) // if not, don't do anything but keep the IDisposable wheel turning { mOldByteOrder = s.ByteOrder; mOldRequiresByteSwap = s.mRequiresByteSwap; s.ChangeByteOrder(mOldByteOrder.Invert()); } }