public void Start(IMappedController controller) { switch (controller.Device.DeviceType) { case DeviceTypes.MicrosoftXbox360: (controller as XboxController).Start(emulatorService.FindBestXboxEmulator()); break; case DeviceTypes.SonyDualShock4: (controller as Ds4Controller).Start(emulatorService.FindBestDs4Emulator()); break; default: throw new ArgumentException("device.Device.DeviceType is not known"); } }