private void EnsureFlagsAreValid(OpMsgFlags flags) { var invalidFlags = ~OpMsgFlags.All; if ((flags & invalidFlags) != 0) { throw new FormatException("Command message has invalid flags."); } }
private void EnsureFlagsAreValid(OpMsgFlags flags) { var invalidFlags = ~OpMsgFlags.All; if ((flags & invalidFlags) != 0) { throw new FormatException("Command message has invalid flags."); } if ((flags & OpMsgFlags.ChecksumPresent) != 0) { throw new FormatException("Command message CheckSumPresent flag not supported."); } }