Dela via


BackgroundEnergyManager Class

Definition

Provides information about your app's background energy usage.

public ref class BackgroundEnergyManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class BackgroundEnergyManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("Background Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
class BackgroundEnergyManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class BackgroundEnergyManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("Background Energy Manager has been deprecated. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 393216, "Windows.Foundation.UniversalApiContract")]
public static class BackgroundEnergyManager
Public Class BackgroundEnergyManager
Inheritance
Object Platform::Object IInspectable BackgroundEnergyManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The energy usage of a background task is classified into one of these predefined levels, from lowest to highest energy consumption: LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, ExcessiveUsageLevel, NearTerminationUsageLevel, or TerminationUsageLevel.

Properties

ExcessiveUsageLevel

Gets the excessive usage level, expressed as a percentage of normal energy usage.

LowUsageLevel

Gets the low usage level, expressed as a percentage of normal energy consumption.

MaxAcceptableUsageLevel

Gets the maximum acceptable usage level, expressed as a percentage of normal energy consumption.

NearMaxAcceptableUsageLevel

Gets the near-maximum acceptable usage level, expressed as a percentage of normal energy usage.

NearTerminationUsageLevel

Gets the near-termination usage level, expressed as a percentage of normal energy usage.

RecentEnergyUsage

Gets the energy usage of the app's background task for the current 30 minute period, expressed as a percentage of normal.

RecentEnergyUsageLevel

Gets the nearest predefined energy level of the app's background task for the current 30 minute period, equal to LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, ExcessiveUsageLevel, NearTerminationUsageLevel, or TerminationUsageLevel.

TerminationUsageLevel

Gets the termination usage level, expressed as a percentage of normal energy usage.

Events

RecentEnergyUsageIncreased

Occurs when the background task's energy usage has increased significantly.

RecentEnergyUsageReturnedToLow

Occurs when the background task's energy usage has decreased to a low usage level.

Applies to