C# Class Plugin.BLE.Abstractions.Extensions.AdapterExtenstion

Afficher le fichier Open project: xabre/xamarin-bluetooth-le

Méthodes publiques

Méthode Description
ConnectToDeviceAsync ( this adapter, IDevice device, CancellationToken cancellationToken ) : Task

Connects to the device.

DiscoverDeviceAsync ( this adapter, bool>.Func deviceFilter, CancellationToken cancellationToken = default(CancellationToken) ) : Task
DiscoverDeviceAsync ( this adapter, System.Guid deviceId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
StartScanningForDevicesAsync ( this adapter, CancellationToken cancellationToken ) : Task

Starts scanning for BLE devices.

StartScanningForDevicesAsync ( this adapter, bool>.Func deviceFilter, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Starts scanning for BLE devices that fulfill the deviceFilter. DeviceDiscovered will only be called, if deviceFilter returns true for the discovered device.

StartScanningForDevicesAsync ( this adapter, System.Guid serviceUuids, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Starts scanning for BLE devices that advertise the services included in serviceUuids.

Method Details

ConnectToDeviceAsync() public static méthode

Connects to the device.
Thrown if the device connection fails.
public static ConnectToDeviceAsync ( this adapter, IDevice device, CancellationToken cancellationToken ) : Task
adapter this Target adapter.
device IDevice Device to connect to.
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests. The default value is None.
Résultat Task

DiscoverDeviceAsync() public static méthode

public static DiscoverDeviceAsync ( this adapter, bool>.Func deviceFilter, CancellationToken cancellationToken = default(CancellationToken) ) : Task
adapter this
deviceFilter bool>.Func
cancellationToken System.Threading.CancellationToken
Résultat Task

DiscoverDeviceAsync() public static méthode

public static DiscoverDeviceAsync ( this adapter, System.Guid deviceId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
adapter this
deviceId System.Guid
cancellationToken System.Threading.CancellationToken
Résultat Task

StartScanningForDevicesAsync() public static méthode

Starts scanning for BLE devices.
public static StartScanningForDevicesAsync ( this adapter, CancellationToken cancellationToken ) : Task
adapter this Target adapter.
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests.
Résultat Task

StartScanningForDevicesAsync() public static méthode

Starts scanning for BLE devices that fulfill the deviceFilter. DeviceDiscovered will only be called, if deviceFilter returns true for the discovered device.
public static StartScanningForDevicesAsync ( this adapter, bool>.Func deviceFilter, CancellationToken cancellationToken = default(CancellationToken) ) : Task
adapter this Target adapter.
deviceFilter bool>.Func Function that filters the devices.
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests. The default value is None.
Résultat Task

StartScanningForDevicesAsync() public static méthode

Starts scanning for BLE devices that advertise the services included in serviceUuids.
public static StartScanningForDevicesAsync ( this adapter, System.Guid serviceUuids, CancellationToken cancellationToken = default(CancellationToken) ) : Task
adapter this Target adapter.
serviceUuids System.Guid Requested service Ids.
cancellationToken System.Threading.CancellationToken The token to monitor for cancellation requests. The default value is None.
Résultat Task