Delen via


AppResourceGroupInfoWatcher Class

Definition

Allows you to monitor the set of resource groups (AppResourceGroupInfo objects) for an app, and get notifications when a resource group is added or removed.

public ref class AppResourceGroupInfoWatcher sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppResourceGroupInfoWatcher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppResourceGroupInfoWatcher
Public NotInheritable Class AppResourceGroupInfoWatcher
Inheritance
Object Platform::Object IInspectable AppResourceGroupInfoWatcher
Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)
App capabilities
appDiagnostics

Remarks

For example, a resource group is added when an out-of-process background task is activated; a resource group is removed when a background task completes.

Properties

Status

Gets this AppResourceGroupInfoWatcher status.

Methods

Start()

Start firing events when the execution state changes, or resource groups change, within the set of resource groups for this app.

Stop()

Stops firing events when the execution state changes, or resource groups change, within the set of resource groups for this app.

Events

Added

Event that fires when a resource group is added.

EnumerationCompleted

Fires when the watcher has completed enumerating the resource groups that are available to monitor.

ExecutionStateChanged

Event that fires when the execution state (running, suspending, an so on) for this group changes.

Removed

Fires when one of the resource groups has been removed from the list of AppResourceGroupInfos in the package.

Stopped

Event that fires when this AppResourceGroupInfoWatcher stops watching for resource group changes.

Applies to