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
deviceIBluetoothRemoteDeviceThe Bluetooth device associated with the exception.
batteryLevelPrcdoubleThe current battery level percentage.
minBatteryLevelPrcdoubleThe minimum required battery level percentage.
messagestringA message that describes the error.
innerExceptionExceptionThe inner exception that caused the current exception, if any.
Properties
BatteryLevelPrc
Gets the current battery level percentage.
public double BatteryLevelPrc { get; }
Property Value
MinBatteryLevelPrc
Gets the minimum required battery level percentage.
public double MinBatteryLevelPrc { get; }