Class DotNetCoreBluetoothLocalService
- Namespace
- Bluetooth.Maui.Platforms.DotNetCore.Broadcasting
- Assembly
- Bluetooth.Maui.Platforms.DotNetCore.dll
Base class for Bluetooth broadcaster services.
public class DotNetCoreBluetoothLocalService : BaseBluetoothLocalService, IBluetoothLocalService, INotifyPropertyChanged, IAsyncDisposable
- Inheritance
-
DotNetCoreBluetoothLocalService
- Implements
- Inherited Members
Constructors
DotNetCoreBluetoothLocalService(IBluetoothBroadcaster, Guid, string?, bool, ILogger<IBluetoothLocalService>?)
Initializes a new instance of the BaseBluetoothLocalService class.
public DotNetCoreBluetoothLocalService(IBluetoothBroadcaster broadcaster, Guid id, string? name = null, bool isPrimary = true, ILogger<IBluetoothLocalService>? logger = null)
Parameters
broadcasterIBluetoothBroadcasterThe broadcaster that owns this service.
idGuidThe unique identifier of the service.
namestringThe name of the service (optional).
isPrimaryboolIndicates whether this service is a primary service (default: true).
loggerILogger<IBluetoothLocalService>The logger instance to use for logging (optional).
Exceptions
Methods
NativeCreateCharacteristicAsync(Guid, BluetoothCharacteristicProperties, BluetoothCharacteristicPermissions, string?, TimeSpan?, CancellationToken)
Creates a new local Bluetooth characteristic with the specified parameters.
protected override ValueTask<IBluetoothLocalCharacteristic> NativeCreateCharacteristicAsync(Guid id, BluetoothCharacteristicProperties properties, BluetoothCharacteristicPermissions permissions, string? name = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
idGuidpropertiesBluetoothCharacteristicPropertiespermissionsBluetoothCharacteristicPermissionsnamestringtimeoutTimeSpan?cancellationTokenCancellationToken