Udostępnij za pośrednictwem


AppResourceGroupInfo.StartTerminateAsync Method

Definition

Initiate moving the associated app to the terminated state.

public:
 virtual IAsyncOperation<AppExecutionStateChangeResult ^> ^ StartTerminateAsync() = StartTerminateAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<AppExecutionStateChangeResult> StartTerminateAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<AppExecutionStateChangeResult> StartTerminateAsync();
function startTerminateAsync()
Public Function StartTerminateAsync () As IAsyncOperation(Of AppExecutionStateChangeResult)

Returns

The result of trying to terminate the app.

Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)
App capabilities
appDiagnostics

Remarks

The app to terminate must be running, which includes being in the active, suspending, or suspended states. This will terminate the app the same way as if the user terminated the app by tapping the close button. This will call the app's OnSuspending callback, as the system moves the app through the app-lifecycle states, starting with Active, moving to Suspending, then Suspended, and finally Terminated. This method will return as soon as it has initiated the workflow, before any state changes, and before the app’s OnSuspending callback.

Applies to