Table of Contents

Class DotNetCoreBluetoothLocalDescriptor

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

Base class for Bluetooth broadcast descriptors.

public class DotNetCoreBluetoothLocalDescriptor : BaseBluetoothLocalDescriptor, IBluetoothLocalDescriptor, INotifyPropertyChanged, IAsyncDisposable
Inheritance
DotNetCoreBluetoothLocalDescriptor
Implements
Inherited Members

Constructors

DotNetCoreBluetoothLocalDescriptor(IBluetoothLocalCharacteristic, Guid, ReadOnlyMemory<byte>?, string?, ILogger<IBluetoothLocalDescriptor>?)

Initializes a new instance of the BaseBluetoothLocalDescriptor class.

public DotNetCoreBluetoothLocalDescriptor(IBluetoothLocalCharacteristic characteristic, Guid id, ReadOnlyMemory<byte>? initialValue = null, string? name = null, ILogger<IBluetoothLocalDescriptor>? logger = null)

Parameters

characteristic IBluetoothLocalCharacteristic

The local characteristic this descriptor belongs to.

id Guid

The unique identifier of the descriptor.

initialValue ReadOnlyMemory<byte>?

The initial value of the descriptor (optional).

name string

The name of the descriptor (optional).

logger ILogger<IBluetoothLocalDescriptor>

Optional logger for logging descriptor operations.

Exceptions

PlatformNotSupportedException

Methods

NativeUpdateValueAsync(ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)

Updates the value of the descriptor in the native Bluetooth stack.

protected override ValueTask NativeUpdateValueAsync(ReadOnlyMemory<byte> value, TimeSpan? timeout, CancellationToken cancellationToken)

Parameters

value ReadOnlyMemory<byte>

The new value to set for the descriptor.

timeout TimeSpan?

An optional timeout for the operation.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

ValueTask

A task that represents the asynchronous update operation.

Exceptions

PlatformNotSupportedException