/// <summary> /// Initializes a new instance of the <see cref="HighResolutionTimer" /> class. /// </summary> internal HighResolutionTimer() { this.timerJob = new CancellableJob(this.Timer); this.timerActionJob = new ContinuousJob <BlockingCollection <Action> >(this.TimerControl, new BlockingCollection <Action>(new ConcurrentQueue <Action>())); this.disposeCancellationToken = this.timerJob.Start().Value; this.timerActionJob.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="LircDevice" /> class. /// </summary> /// <param name="activate">if set to <c>true</c> [activate].</param> public LircDevice(bool activate) { this.receiveJob = new CancellableJob(this.Receive); this.activation = new Activation( () => this.receiveJob.IsRunning, () => this.receiveJob.Start(), () => this.receiveJob.Stop(), activate); }
/// <summary> /// Initializes a new instance of the <see cref="LircDevice"/> class. /// </summary> public LircDevice() { this.receiveJob = new CancellableJob(this.Receive); }