From 5f12b5cfd8ac27b6846ade6ab742815b168e0543 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 21 Apr 2025 16:40:05 +0200 Subject: [PATCH] [CoreBluetooth] Fix nullability in a few CBCentralManager.ScanForPeripherals overloads. Fixes #22610. Also improve documentation a little bit. Fixes https://github.com/dotnet/macios/issues/22610. --- src/CoreBluetooth/GuidWrapper.cs | 35 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/CoreBluetooth/GuidWrapper.cs b/src/CoreBluetooth/GuidWrapper.cs index 8d65d582b6a6..6cc60f6c6399 100644 --- a/src/CoreBluetooth/GuidWrapper.cs +++ b/src/CoreBluetooth/GuidWrapper.cs @@ -32,10 +32,9 @@ public void ConnectPeripheral (CBPeripheral peripheral, PeripheralConnectionOpti ConnectPeripheral (peripheral, options?.Dictionary); } - /// To be added. - /// To be added. - /// Scans for peripherals that are advertising any of the specified with the specified . - /// To be added. + /// Scans for peripherals that are advertising any of the specified with the specified . + /// An array of advertised UUIDs to scan for. + /// Any custom options for the scan. public void ScanForPeripherals (CBUUID []? peripheralUuids, NSDictionary? options) { if (peripheralUuids is null) @@ -44,35 +43,31 @@ public void ScanForPeripherals (CBUUID []? peripheralUuids, NSDictionary? option ScanForPeripherals (NSArray.FromObjects (peripheralUuids), options); } - /// To be added. - /// To be added. - /// Scans for peripherals that are advertising any of the specified with the specified . - /// To be added. - public void ScanForPeripherals (CBUUID [] peripheralUuids, PeripheralScanningOptions? options = null) + /// Scans for peripherals that are advertising any of the specified with the specified . + /// An array of advertised UUIDs to scan for. + /// Any custom options for the scan. + public void ScanForPeripherals (CBUUID []? peripheralUuids, PeripheralScanningOptions? options = null) { ScanForPeripherals (peripheralUuids, options?.Dictionary); } - /// To be added. - /// Scans for peripherals that are advertising any of the specified . - /// To be added. - public void ScanForPeripherals (CBUUID [] peripheralUuids) + /// Scans for peripherals that are advertising any of the specified . + /// An array of advertised UUIDs to scan for. + public void ScanForPeripherals (CBUUID []? peripheralUuids) { ScanForPeripherals (peripheralUuids, null as NSDictionary); } - /// To be added. - /// To be added. - /// Scans for peripherals that are advertising the specified with the specified . - /// To be added. + /// Scans for peripherals that are advertising the specified with the specified . + /// The advertised UUID to scan for. + /// Any custom options for the scan. public void ScanForPeripherals (CBUUID serviceUuid, NSDictionary? options) { ScanForPeripherals (new [] { serviceUuid }, options); } - /// To be added. - /// Scans for peripherals that are advertising the specified . - /// To be added. + /// Scans for peripherals that are advertising the specified . + /// The advertised UUID to scan for. public void ScanForPeripherals (CBUUID serviceUuid) { ScanForPeripherals (new [] { serviceUuid }, null as NSDictionary);