public UsbMonitor ()
{
switch (HidSharp.PlatformDetector.RunningPlatform())
{
case HidSharp.PlatformDetector.Platform.Windows:
winUsbDeviceMonitor = new WinUsbDeviceMonitor();
winUsbDeviceMonitor.DeviceListChanged += HandleDeviceListChanged;
break;
case HidSharp.PlatformDetector.Platform.Linux:
UsbDeviceNotifier = DeviceNotifier.OpenDeviceNotifier();
UsbDeviceNotifier.OnDeviceNotify += OnDeviceNotifyEvent;
break;
}
}