WebUIApplication.RequestRestartForUserAsync(User, String) 方法

定义

请求系统在特定用户的上下文中重启应用。

public:
 static IAsyncOperation<AppRestartFailureReason> ^ RequestRestartForUserAsync(User ^ user, Platform::String ^ launchArguments);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<AppRestartFailureReason> RequestRestartForUserAsync(User const& user, winrt::hstring const& launchArguments);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<AppRestartFailureReason> RequestRestartForUserAsync(User user, string launchArguments);
function requestRestartForUserAsync(user, launchArguments)
Public Shared Function RequestRestartForUserAsync (user As User, launchArguments As String) As IAsyncOperation(Of AppRestartFailureReason)

参数

user
User

目标用户。 应用将在此用户的上下文中重启。

launchArguments
String

Platform::String

winrt::hstring

启动参数,以在应用重启时传递给应用。

返回

一个异步操作,在完成时返回 AppRestartFailureReason 对象。

属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)

适用于