Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This would be the minimal changes I need to be able to integrate bluez support properly and avoid deadlocks.
There's something else I'd like to propose, since the library targets .net standard 2.1 (and thus C# 8 is standard) maybe it's nice to leverage IAsyncEnumerable for the Discover method, so it becomes something like:
IAsyncEnumerable<PoweredUpBluetoothDeviceInfo> Discover(CancellationToken cancellationToken = default)
This way the newly discovered devices would be streamed to whoever is invoking the discovery as they become available.
And about the BluetoothAdapter class, is this meant to be a representation of an actual bluetooth adapter, or is it more like an bluetooth managing class? Since at least on linux (and I assume on windows too), you can have multiple adapters and I guess it would be nice to have some interface to list and select the adapter you want (and provide some convenience methods to simply select the first one available)
Closes #117