AppResourceGroupInfoWatcher AppResourceGroupInfoWatcher AppResourceGroupInfoWatcher AppResourceGroupInfoWatcher 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 : sealed class AppResourceGroupInfoWatcher : IAppResourceGroupInfoWatcher
struct winrt::Windows::System::AppResourceGroupInfoWatcher : IAppResourceGroupInfoWatcher
public sealed class AppResourceGroupInfoWatcher : IAppResourceGroupInfoWatcher
Public NotInheritable Class AppResourceGroupInfoWatcher Implements IAppResourceGroupInfoWatcher
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)
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 Status Status Status Status

Gets this AppResourceGroupInfoWatcher status.

Methods

Start() Start() Start() Start() Start()

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

Stop() Stop() Stop() Stop() Stop()

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

Events

Added Added Added Added Added

Event that fires when a resource group is added.

EnumerationCompleted EnumerationCompleted EnumerationCompleted EnumerationCompleted EnumerationCompleted

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

ExecutionStateChanged ExecutionStateChanged ExecutionStateChanged ExecutionStateChanged ExecutionStateChanged

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

Removed Removed Removed Removed Removed

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

Stopped Stopped Stopped Stopped Stopped

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