Table of Contents

Class DotNetCoreBluetoothRemoteDescriptor

Namespace
Bluetooth.Maui.Platforms.DotNetCore.Scanning
Assembly
Bluetooth.Maui.Platforms.DotNetCore.dll

Interface representing a Bluetooth descriptor, providing properties and methods for interacting with it. Descriptors provide additional information about a characteristic (e.g., Client Characteristic Configuration Descriptor).

public class DotNetCoreBluetoothRemoteDescriptor : BaseBluetoothRemoteDescriptor, IBluetoothRemoteDescriptor, INotifyPropertyChanged, IAsyncDisposable
Inheritance
DotNetCoreBluetoothRemoteDescriptor
Implements
Inherited Members

Constructors

DotNetCoreBluetoothRemoteDescriptor(IBluetoothRemoteCharacteristic, Guid, IBluetoothNameProvider?, ILogger<IBluetoothRemoteDescriptor>?)

Initializes a new instance of the BaseBluetoothRemoteDescriptor class.

public DotNetCoreBluetoothRemoteDescriptor(IBluetoothRemoteCharacteristic parentCharacteristic, Guid id, IBluetoothNameProvider? nameProvider = null, ILogger<IBluetoothRemoteDescriptor>? logger = null)

Parameters

parentCharacteristic IBluetoothRemoteCharacteristic

The Bluetooth characteristic associated with this descriptor.

id Guid

The unique identifier (UUID) of the descriptor.

nameProvider IBluetoothNameProvider

An optional provider for descriptor names, used to resolve the name based on the ID.

logger ILogger<IBluetoothRemoteDescriptor>

The logger instance to use for logging (optional).

Exceptions

ArgumentNullException

Thrown when parentCharacteristic is null.

PlatformNotSupportedException

Methods

NativeCanRead()

Platform-specific implementation to determine if the descriptor can be read.

protected override bool NativeCanRead()

Returns

bool

Exceptions

PlatformNotSupportedException

NativeCanWrite()

Platform-specific implementation to determine if the descriptor can be written.

protected override bool NativeCanWrite()

Returns

bool

Exceptions

PlatformNotSupportedException

NativeReadValueAsync()

Platform-specific implementation to read the descriptor's value.

protected override ValueTask NativeReadValueAsync()

Returns

ValueTask

Exceptions

PlatformNotSupportedException

NativeWriteValueAsync(ReadOnlyMemory<byte>)

Platform-specific implementation to write the descriptor's value.

protected override ValueTask NativeWriteValueAsync(ReadOnlyMemory<byte> value)

Parameters

value ReadOnlyMemory<byte>

Returns

ValueTask

Exceptions

PlatformNotSupportedException