IsolatedWindowsEnvironmentUserInfo.TryWaitForSignInWithProgressAsync メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
非推奨になりました。 呼び出し元が環境のサインイン プロセスが完了するのを待ってから続行できるようにする非同期関数。 この関数は、サインインを待機する際の進行状況の更新を提供します。 TryWaitForSignInAsync は実行しません。
public:
virtual IAsyncOperationWithProgress<bool, IsolatedWindowsEnvironmentSignInProgress> ^ TryWaitForSignInWithProgressAsync() = TryWaitForSignInWithProgressAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<bool, IsolatedWindowsEnvironmentSignInProgress> TryWaitForSignInWithProgressAsync();
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironmentUserInfo is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
IAsyncOperationWithProgress<bool, IsolatedWindowsEnvironmentSignInProgress> TryWaitForSignInWithProgressAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<bool,IsolatedWindowsEnvironmentSignInProgress> TryWaitForSignInWithProgressAsync();
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironmentUserInfo is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public IAsyncOperationWithProgress<bool,IsolatedWindowsEnvironmentSignInProgress> TryWaitForSignInWithProgressAsync();
function tryWaitForSignInWithProgressAsync()
Public Function TryWaitForSignInWithProgressAsync () As IAsyncOperationWithProgress(Of Boolean, IsolatedWindowsEnvironmentSignInProgress)
戻り値
IAsyncOperationWithProgress<Boolean,IsolatedWindowsEnvironmentSignInProgress>
IAsyncOperationWithProgress<bool,IsolatedWindowsEnvironmentSignInProgress>
サインインが成功したかどうかを示すブール値と、サインイン操作の現在の進行状況を示す進行状況値を返す非同期操作。
- 属性
Windows の要件
| デバイス ファミリ |
Windows 11 Insider Preview (10.0.23504.0 で導入)
|
| API contract |
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (v4.0 で導入)
|
例
次の例では、ID によって分離された環境を取得し、サインイン操作の進行状況を確認しながら を使用して TryWaitForSignInWithProgressAsync サインインを試みます。
void GetEnvironmentSignInInfo()
{
auto environment = IsolatedWindowsEnvironment::GetById(environmentId);
if (!environment)
{
LogMessage(L"Environment does not exist.");
return;
}
auto result = environment.GetUserInfo();
if (!result)
{
LogMessage(L"Failed to initialize GetUserInfo – verify that the environment exists.");
return;
}
auto operation = result.TryWaitForSignInWithProgressAsync();
operation.Progress([&](auto const&, IsolatedWindowsEnvironmentSignInProgress progress)
{
switch (progress)
{
case IsolatedWindowsEnvironmentSignInProgress::Connecting:
UpdateProgressDialogUI(L"Connecting to isolated environment.");
break;
case IsolatedWindowsEnvironmentSignInProgress::Connected:
UpdateProgressDialogUI(L"Established connection to isolated environment.");
break;
case IsolatedWindowsEnvironmentSignInProgress::Authenticating:
UpdateProgressDialogUI(L"Signing in to isolated environment.");
break;
case IsolatedWindowsEnvironmentSignInProgress::SettingUpAccount:
UpdateProgressDialogUI(L"Setting up user session.");
break;
case IsolatedWindowsEnvironmentSignInProgress::Finalizing:
UpdateProgressDialogUI(L"Configuring user session settings.");
break;
case IsolatedWindowsEnvironmentSignInProgress::Completed:
UpdateProgressDialogUI(L"Sign-in is complete.");
break;
default:
LogMessage(L"Encountered an unknown progress state, this is unexpected. Do not update UI dialog.\n");
}
});
}
注釈
警告
これは非推奨の API です。