public static void AttachSigEventHandler(this Sig cue, UnifiedSigEventHandler handler) { eSigEvent eventType; switch (cue.Type) { case eSigType.Bool: eventType = eSigEvent.BoolChange; break; case eSigType.UShort: eventType = cue.IsInput ? eSigEvent.UShortInputRamping : eSigEvent.UShortChange; break; case eSigType.String: eventType = eSigEvent.StringChange; break; default: eventType = eSigEvent.NA; break; } cue.AttachSigEventHandler(handler, eventType); }