Table of Contents

Class BluetoothServiceDefinitionRegistry

Namespace
Bluetooth.Core.Scanning.Profiles
Assembly
Bluetooth.Core.Scanning.dll

Thread-safe implementation of IBluetoothServiceDefinitionRegistry. Stores service and characteristic definitions in concurrent dictionaries keyed by UUID pair.

public class BluetoothServiceDefinitionRegistry : IBluetoothServiceDefinitionRegistry
Inheritance
BluetoothServiceDefinitionRegistry
Implements
Inherited Members

Methods

GetCharacteristicName(Guid)

Gets the known name for a characteristic by its UUID alone. Returns null if the UUID is ambiguous (registered under multiple services with different names) or not registered.

public string? GetCharacteristicName(Guid characteristicId)

Parameters

characteristicId Guid

The UUID of the characteristic.

Returns

string

The characteristic name if unambiguous, or null.

GetCharacteristicName(Guid, Guid)

Gets the known name for a characteristic by service and characteristic UUID pair.

public string? GetCharacteristicName(Guid serviceId, Guid characteristicId)

Parameters

serviceId Guid

The UUID of the owning service.

characteristicId Guid

The UUID of the characteristic.

Returns

string

The characteristic name, or null if not registered.

GetServiceName(Guid)

Gets the known name for a service by its UUID.

public string? GetServiceName(Guid serviceId)

Parameters

serviceId Guid

The UUID of the service.

Returns

string

The service name, or null if not registered.

Register(BluetoothCharacteristicDefinition)

Registers a Bluetooth characteristic definition.

public void Register(BluetoothCharacteristicDefinition definition)

Parameters

definition BluetoothCharacteristicDefinition

The characteristic definition to register.

Register(BluetoothServiceDefinition)

Registers a Bluetooth service definition.

public void Register(BluetoothServiceDefinition definition)

Parameters

definition BluetoothServiceDefinition

The service definition to register.