public static void ValidateActivateMicro(VifCode code) { if (code.Command != VifCommand.ActMicro || (code.Immediate != 0x0C && code.Immediate != 0x10)) { throw new InvalidDataException("Invalid ActMicro Vifcode"); } }
public static void Ensure(VifCode code, int immediate, int count, VifCommand command) { if (code.Immediate != immediate) { throw new InvalidDataException($"Vifcode immediate value is not {immediate}"); } if (code.Count != count) { throw new InvalidDataException($"Vifcode count value is not {count}"); } if (code.Command != command) { throw new InvalidDataException($"Vifcode command type is not {command}"); } }