public void Loop(PreamplifierLoopState state) { switch (state) { case PreamplifierLoopState.Off: LoopOff(); break; case PreamplifierLoopState.On: LoopOn(); break; default: throw new ArgumentOutOfRangeException("state"); } }
public static PreamplifierMessage CreateLoopMessage(PreamplifierLoopState state) { switch (state) { case PreamplifierLoopState.Off: return new PreamplifierMessage("*PRLP00"); case PreamplifierLoopState.On: return new PreamplifierMessage("*PRLP01"); default: throw new ArgumentOutOfRangeException("state"); } }