Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsbDriveMounted and UsbDriveEjected events should be members of UsbDevice #43

Open
sonicbhoc opened this issue May 4, 2024 · 0 comments

Comments

@sonicbhoc
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant