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
remoteCharacteristicIBluetoothRemoteCharacteristicThe Bluetooth characteristic associated with the exception.
messagestringA message that describes the error.
innerExceptionExceptionThe 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
baseBluetoothRemoteCharacteristicIBluetoothRemoteCharacteristicThe Bluetooth characteristic to check.