public void OnPinValueChanged(PinValueChangedEventArgs args) { if (ValueRising != null && args.ChangeType == PinEventTypes.Rising) { ValueRising?.Invoke(this, args); } if (ValueFalling != null && args.ChangeType == PinEventTypes.Falling) { ValueFalling?.Invoke(this, args); } }
public void OnPinValueChanged(PinValueChangedEventArgs args, PinEventTypes detectionOfEventTypes) { if (detectionOfEventTypes == PinEventTypes.Rising && args.ChangeType == PinEventTypes.Rising) { ValueRising?.Invoke(this, args); } if (detectionOfEventTypes == PinEventTypes.Falling && args.ChangeType == PinEventTypes.Falling) { ValueFalling?.Invoke(this, args); } }