/// <inheritdoc/> public void Dispose() { if (helper != null) { helper.Dispose(); helper = null; } }
/// <summary> /// Initializes a new <see cref="PushButton"/> instance. /// </summary> public RotaryEncoder() { // Create helper buttonHelper = new PushButtonHelper(this); // Lower debounce timeout buttonHelper.DebounceTimeout = 10; // Create events rotatedEvent = new ObservableEvent <IRotaryEncoder, RotaryEncoderRotatedEventArgs>(firstAdded: EnsureInitialized); }
/// <inheritdoc/> public void Dispose() { if (buttonHelper != null) { buttonHelper.Dispose(); buttonHelper = null; } if (clockPin != null) { clockPin.Dispose(); clockPin = null; } }
/// <summary> /// Initializes a new <see cref="PushButton"/> instance. /// </summary> public PushButton() { // Create helper helper = new PushButtonHelper(this); }