Table of Contents

Class ProfileNameProvider

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

Implementation of IBluetoothNameProvider backed by an IBluetoothServiceDefinitionRegistry. Resolves service, characteristic, and descriptor names from registered service definitions.

public class ProfileNameProvider : IBluetoothNameProvider
Inheritance
ProfileNameProvider
Implements
Inherited Members

Constructors

ProfileNameProvider(IBluetoothServiceDefinitionRegistry)

Initializes a new instance of the ProfileNameProvider class.

public ProfileNameProvider(IBluetoothServiceDefinitionRegistry registry)

Parameters

registry IBluetoothServiceDefinitionRegistry

The service definition registry used to resolve names.

Methods

GetKnownCharacteristicName(Guid)

Gets the known name for a Bluetooth characteristic based on its unique identifier (UUID). Returns null if the UUID maps to multiple services with different names (ambiguous). Prefer GetKnownCharacteristicName(Guid, Guid) when the service context is available.

public string? GetKnownCharacteristicName(Guid characteristic)

Parameters

characteristic Guid

Returns

string

GetKnownCharacteristicName(Guid, Guid)

Gets the known name for a Bluetooth characteristic given its owning service UUID and characteristic UUID. Use this overload when the service context is known to avoid ambiguity when the same characteristic UUID appears in multiple services.

public string? GetKnownCharacteristicName(Guid serviceId, Guid characteristicId)

Parameters

serviceId Guid
characteristicId Guid

Returns

string

GetKnownDescriptorName(Guid)

Gets the known name for a Bluetooth descriptor based on its unique identifier (UUID).

public string? GetKnownDescriptorName(Guid descriptor)

Parameters

descriptor Guid

Returns

string

Remarks

Descriptor names are not yet tracked by the service definition registry. Always returns null.

GetKnownServiceName(Guid)

Gets the known name for a Bluetooth service based on its unique identifier (UUID).

public string? GetKnownServiceName(Guid service)

Parameters

service Guid

Returns

string