You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While raising UsbDeviceAdded and UsbDeviceRemoved events from the UsbEventWatcher makes sense since it controls devices, raising events that affect an individual UsbDevice from the UsbEventWatcher seems to be breaking encapsulation.
A feasible solution would be to have the UsbDriveMounted and UsbDriveEjected events instead be IObservables associated with specific UsbDevices, and have the UsbEventWatcher automatically subscribe to the IObservables when new devices are added. This allows for both the current behavior of watching changes on currently watched devices, and allows for watching mount point changes for an individual device.
The text was updated successfully, but these errors were encountered:
While raising
UsbDeviceAdded
andUsbDeviceRemoved
events from theUsbEventWatcher
makes sense since it controls devices, raising events that affect an individualUsbDevice
from theUsbEventWatcher
seems to be breaking encapsulation.A feasible solution would be to have the
UsbDriveMounted
andUsbDriveEjected
events instead beIObservable
s associated with specificUsbDevice
s, and have theUsbEventWatcher
automatically subscribe to theIObservable
s when new devices are added. This allows for both the current behavior of watching changes on currently watched devices, and allows for watching mount point changes for an individual device.The text was updated successfully, but these errors were encountered: