Table of Contents

Class DeviceIsAlreadyDisconnectedException

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

Represents an exception that occurs when a Bluetooth device is already disconnected.

public class DeviceIsAlreadyDisconnectedException : DeviceException, ISerializable
Inheritance
DeviceIsAlreadyDisconnectedException
Implements
Inherited Members

Constructors

DeviceIsAlreadyDisconnectedException(IBluetoothRemoteDevice, string, Exception?)

Initializes a new instance of the DeviceIsAlreadyDisconnectedException class.

public DeviceIsAlreadyDisconnectedException(IBluetoothRemoteDevice device, string message = "Device is already disconnected", Exception? innerException = null)

Parameters

device IBluetoothRemoteDevice

The Bluetooth device 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

ThrowIfAlreadyDisconnected(IBluetoothRemoteDevice)

Throws a DeviceIsAlreadyDisconnectedException if the device is already disconnected.

public static void ThrowIfAlreadyDisconnected(IBluetoothRemoteDevice device)

Parameters

device IBluetoothRemoteDevice

The Bluetooth device to check.

Exceptions

ArgumentNullException

Thrown when device is null.

DeviceIsAlreadyDisconnectedException

Thrown when the device is already disconnected.

See Also