Table of Contents

Class CharacteristicAlreadyWritingException

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

Represents an exception that occurs when a characteristic is already being written to.

public class CharacteristicAlreadyWritingException : CharacteristicWriteException, ISerializable
Inheritance
CharacteristicAlreadyWritingException
Implements
Inherited Members

Constructors

CharacteristicAlreadyWritingException(IBluetoothRemoteCharacteristic, ReadOnlyMemory<byte>?, string, Exception?)

Initializes a new instance of the CharacteristicAlreadyWritingException class.

public CharacteristicAlreadyWritingException(IBluetoothRemoteCharacteristic remoteCharacteristic, ReadOnlyMemory<byte>? value = null, string message = "Characteristic is already writing", Exception? innerException = null)

Parameters

remoteCharacteristic IBluetoothRemoteCharacteristic

The Bluetooth characteristic associated with the exception.

value ReadOnlyMemory<byte>?

The value that was being written when the exception occurred.

message string

A message that describes the error.

innerException Exception

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

Methods

ThrowIfAlreadyWriting(IBluetoothRemoteCharacteristic)

Throws a CharacteristicAlreadyWritingException if the characteristic is currently being written to.

public static void ThrowIfAlreadyWriting(IBluetoothRemoteCharacteristic remoteCharacteristic)

Parameters

remoteCharacteristic IBluetoothRemoteCharacteristic

The characteristic to check.

Exceptions

ArgumentNullException

Thrown when remoteCharacteristic is null.

CharacteristicAlreadyWritingException

Thrown when the characteristic is already being written to.

See Also