Class ProfileNameProvider
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
registryIBluetoothServiceDefinitionRegistryThe 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
characteristicGuid
Returns
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
Returns
GetKnownDescriptorName(Guid)
Gets the known name for a Bluetooth descriptor based on its unique identifier (UUID).
public string? GetKnownDescriptorName(Guid descriptor)
Parameters
descriptorGuid
Returns
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
serviceGuid