Class BaseBattery
Base class for cross battery.
Inherited Members
Namespace: Evergine.Common.Features.Battery
Assembly: Evergine.Common.dll
Syntax
public abstract class BaseBattery : IBattery, IDisposable
Properties
PowerSource
Gets the current power source.
Declaration
public abstract PowerSource PowerSource { get; }
Property Value
Type | Description |
---|---|
PowerSource |
RemainingChargePercent
Gets the remaining battery charge percent.
Declaration
public abstract int RemainingChargePercent { get; }
Property Value
Type | Description |
---|---|
int |
Status
Gets the current battery status.
Declaration
public abstract BatteryStatus Status { get; }
Property Value
Type | Description |
---|---|
BatteryStatus |
Methods
Dispose()
Dispose of class and parent classes.
Declaration
public void Dispose()
Dispose(bool)
Dispose the object.
Declaration
public virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Whether to dispose of unmanaged resources. |
~BaseBattery()
Finalizes an instance of the BaseBattery class.
Declaration
protected ~BaseBattery()
IsBatteryChangedEventSubscribed()
Whether the BatteryChanged event has subscribers or not.
Declaration
protected bool IsBatteryChangedEventSubscribed()
Returns
Type | Description |
---|---|
bool | Whether the BatteryChanged event has subscribers. |
OnBatteryChanged(BatteryChangedEventArgs)
Event handler for battery changes.
Declaration
protected virtual void OnBatteryChanged(BatteryChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
BatteryChangedEventArgs | e | The arguments. |
Events
BatteryChanged
Event that fires when battery status, level or power changes
Declaration
public virtual event BatteryChangedEventHandler BatteryChanged
Event Type
Type | Description |
---|---|
BatteryChangedEventHandler |