Table of Contents

Class BatteryTooLowException

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

Represents an exception that occurs when the battery level is too low.

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

Constructors

BatteryTooLowException(IBluetoothRemoteDevice, double, double, string, Exception?)

Initializes a new instance of the BatteryTooLowException class.

public BatteryTooLowException(IBluetoothRemoteDevice device, double batteryLevelPrc, double minBatteryLevelPrc, string message = "Battery is too low to execute this operation", Exception? innerException = null)

Parameters

device IBluetoothRemoteDevice

The Bluetooth device associated with the exception.

batteryLevelPrc double

The current battery level percentage.

minBatteryLevelPrc double

The minimum required battery level percentage.

message string

A message that describes the error.

innerException Exception

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

Properties

BatteryLevelPrc

Gets the current battery level percentage.

public double BatteryLevelPrc { get; }

Property Value

double

MinBatteryLevelPrc

Gets the minimum required battery level percentage.

public double MinBatteryLevelPrc { get; }

Property Value

double

See Also