HidDeviceListener Class
Namespace: Yubico.Core.Devices.Hid Assembly: Yubico.Core.dllA class that provides events for HID device arrival and removal.
public abstract class HidDeviceListener : Object
Remarks
This class exposes two events to the caller: Arrived and Removed. As their names suggest, subscribing to these events will inform your code whenever a new HID device is discovered on the system, or one is removed, respectively.
You will only receive events for devices that were added or removed after you subscribed to the event. That is, arrival events will only be raised for devices added after you have subscribed to the Arrived events. All devices already attached to the system will be ignored.
Constructors
Name | Description |
---|---|
HidDeviceListener() |
Methods
Name | Description |
---|---|
ClearEventHandlers() | Implementers can call this method to reset the event handlers during cleanup. |
Create() | Creates an instance of a HidDeviceListener. |
OnArrived(IHidDevice) | Implementers should call this method when they have discovered a new HID device on the system. |
OnRemoved(IHidDevice) | Implementers should call this method when they have discovered that a HID device has been removed from the system. |
Events
Name | Description |
---|---|
Arrived | Subscribe to receive an event whenever a Human Interface Device (HID) is added to the computer. |
Removed | Subscribe to receive an event whenever a Human Interface Device (HID) is removed from the computer. |