Table of Contents

Class CharacteristicCantReadException

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

Represents an exception that occurs when attempting to read a characteristic that doesn't support reading.

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

Constructors

CharacteristicCantReadException(IBluetoothRemoteCharacteristic, string, Exception?)

Initializes a new instance of the CharacteristicCantReadException class.

public CharacteristicCantReadException(IBluetoothRemoteCharacteristic remoteCharacteristic, string message = "This characteristic does not have the READ 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

ThrowIfCantRead(IBluetoothRemoteCharacteristic)

Throws a CharacteristicCantReadException if the specified characteristic cannot be read.

public static void ThrowIfCantRead(IBluetoothRemoteCharacteristic baseBluetoothRemoteCharacteristic)

Parameters

baseBluetoothRemoteCharacteristic IBluetoothRemoteCharacteristic

The Bluetooth characteristic to check.

See Also