Table of Contents

Class CharacteristicCantListenException

Namespace
Bluetooth.Abstractions.Scanning.Exceptions
Assembly
Bluetooth.Abstractions.Scanning.dll

Represents an exception that occurs when attempting to listen to a characteristic that doesn't support notifications or indications.

public class CharacteristicCantListenException : CharacteristicException, ISerializable
Inheritance
CharacteristicCantListenException
Implements
Inherited Members

Constructors

CharacteristicCantListenException(IBluetoothRemoteCharacteristic, string, Exception?)

Initializes a new instance of the CharacteristicCantListenException class.

public CharacteristicCantListenException(IBluetoothRemoteCharacteristic remoteCharacteristic, string message = "This characteristic does not have the NOTIFY or INDICATE property", Exception? innerException = null)

Parameters

remoteCharacteristic IBluetoothRemoteCharacteristic

The Bluetooth characteristic associated with the exception.

message string

A message that describes the error.

innerException Exception

The inner exception that caused the current exception, if any.

Methods

ThrowIfCantListen(IBluetoothRemoteCharacteristic)

Throws a CharacteristicCantListenException if the specified characteristic cannot be listened to.

public static void ThrowIfCantListen(IBluetoothRemoteCharacteristic baseBluetoothRemoteCharacteristic)

Parameters

baseBluetoothRemoteCharacteristic IBluetoothRemoteCharacteristic

The Bluetooth characteristic to check.

See Also