BatteryStatus Class
The state of the battery of the device (https://w3c.github.io/battery/#the-batterymanager-interface), returned by a BatteryStatusProvider.
public sealed class BatteryStatus : IEquatable<BatteryStatus>- Implements
Constructors
| Name | Description |
|---|---|
| BatteryStatus() |
BatteryStatus()
BatteryStatus.cspublic BatteryStatus()No documentation is available.
Properties
| Name | Description |
|---|---|
| Charging | Gets whether the battery is charging (or there is no battery). The default is true. |
| ChargingTime | Gets the remaining time until the battery is fully charged (0 when it is full), or null when it is unknown or the battery is discharging. The default is 0. |
| Default | Gets the status of a fully charged battery that is plugged in (the status reported when the user agent is unable to report it). |
| DischargingTime | Gets the remaining time until the battery is depleted, or null when it is unknown or the battery is charging. The default is null. |
| Level | Gets the level of the battery, between 0 (depleted) and 1 (full). The default is 1. The documents see it rounded to two decimals, to reduce fingerprinting. |
Charging
BatteryStatus.csChargingTime
BatteryStatus.csDefault
BatteryStatus.csGets the status of a fully charged battery that is plugged in (the status reported when the user agent is unable to report it).
public static BatteryStatus Default { get; }Property value
DischargingTime
BatteryStatus.csLevel
BatteryStatus.csMethods
| Name | Description |
|---|---|
| Equals(BatteryStatus?) | |
| Equals(object?) | |
| GetHashCode() | |
| ToString() |
Equals overloads
Equals(BatteryStatus?)
public bool Equals(BatteryStatus? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(BatteryStatus?, BatteryStatus?) | |
| operator !=(BatteryStatus?, BatteryStatus?) |
operator ==(BatteryStatus?, BatteryStatus?)
public static bool operator ==(BatteryStatus? left, BatteryStatus? right)No documentation is available.
operator !=(BatteryStatus?, BatteryStatus?)
public static bool operator !=(BatteryStatus? left, BatteryStatus? right)No documentation is available.