Exemplo n.º 1
0
 public void Close()
 {
     foreach (var inputDevice in device.GetInputDevices())
     {
         inputDevice.InputChanged -= InputChanged;
     }
     threadContext.Cancel().Wait();
 }
Exemplo n.º 2
0
 public InputValuesMessageHandler(InputDeviceHolder device, SenderFunction <InputValuesMessage> senderFunction)
 {
     this.device         = device;
     this.senderFunction = senderFunction;
     devices             = device.GetInputDevices();
     foreach (var inputDevice in devices)
     {
         inputDevice.InputChanged += InputChanged;
     }
     threadContext = ThreadCreator.CreateLoop($"Websocket input value writer {device.DisplayName}", ResponseLoop, 33).Start();
 }