public void StopNamedPipe() { if (notifyThreadContext != null) { notifyThreadContext.Cancel().Wait(); } }
public void Close() { foreach (var inputDevice in device.GetInputDevices()) { inputDevice.InputChanged -= InputChanged; } threadContext.Cancel().Wait(); }
/// <summary> /// Disposes all resources. /// </summary> public void Dispose() { if (!disposed) { disposed = true; inputRefresher?.Cancel().Wait(); Disconnected?.Invoke(this, new DeviceDisconnectedEventArgs()); } }
public async Task CloseAsync(CancellationToken token = default) { if (!started) { return; } await client.CloseAsync(WebSocketCloseStatus.NormalClosure, null, token); threadContext.Cancel().Wait(); started = false; }
public void Stop() { if (Running) { readThreadContext.Cancel().Wait(); if (InputConfiguration.Autostart) { InputConfiguration.Autostart = false; inputConfigManager.SaveConfig(this); } } }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { readThreadContext?.Cancel()?.Wait(); } disposed = true; }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { forceFeedbackThreadContext.Cancel().Wait(); readThreadContext.Cancel().Wait(); joystick.Dispose(); } disposed = true; }
public void Stop() { if (running) { running = false; XInput.InputChanged -= XInputInputChanged; client.Feedback -= FeedbackReceived; logger.Info($"Force feedback mapping is disconnected on {ToString()}."); xOutputManager.Stop(client); logger.Info($"Emulation stopped on {ToString()}."); if (threadContext != null) { threadContext.Cancel().Wait(); } } }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { foreach (var inputDeviceProvider in inputDeviceProviders) { inputDeviceProvider.Connected -= Connected; inputDeviceProvider.Disconnected -= Disconnected; } readThreadContext?.Cancel()?.Wait(); } disposed = true; }
/// <summary> /// Stops the emulation of the device /// </summary> public void Stop() { if (running) { running = false; XInput.InputChanged -= XInputInputChanged; if (ForceFeedbackSupported) { controller.FeedbackReceived -= ControllerFeedbackReceived; logger.Info($"Force feedback mapping is disconnected on {ToString()}."); } xOutputManager.Stop(controllerCount); controllerCount = 0; logger.Info($"Emulation stopped on {ToString()}."); if (threadContext != null) { threadContext.Cancel().Wait(); } } }
public void Dispose() { inputRefresher?.Cancel().Wait(); }
public virtual void Close() { pingThreadContext.Cancel(); }
public override void Close() { base.Close(); threadContext.Cancel(); }
public void Close() { device.InputChanged -= InputChanged; threadContext.Cancel().Wait(); }