UsbDriveMounted and UsbDriveEjected events should be members of UsbDevice
sonicbhoc opened this issue · 0 comments
sonicbhoc commented
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 IObservable
s associated with specific UsbDevice
s, and have the UsbEventWatcher
automatically subscribe to the IObservable
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.