Class BluetoothServiceDefinitionRegistry
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
characteristicIdGuidThe 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
serviceIdGuidThe UUID of the owning service.
characteristicIdGuidThe UUID of the characteristic.
Returns
- string
The characteristic name, or
nullif not registered.
GetServiceName(Guid)
Gets the known name for a service by its UUID.
public string? GetServiceName(Guid serviceId)
Parameters
serviceIdGuidThe UUID of the service.
Returns
- string
The service name, or
nullif not registered.
Register(BluetoothCharacteristicDefinition)
Registers a Bluetooth characteristic definition.
public void Register(BluetoothCharacteristicDefinition definition)
Parameters
definitionBluetoothCharacteristicDefinitionThe characteristic definition to register.
Register(BluetoothServiceDefinition)
Registers a Bluetooth service definition.
public void Register(BluetoothServiceDefinition definition)
Parameters
definitionBluetoothServiceDefinitionThe service definition to register.