WebAccount 类

定义

标识 Web 帐户提供程序中的帐户。

public ref class WebAccount sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Credentials.IWebAccountFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class WebAccount final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Security.Credentials.IWebAccountFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class WebAccount final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Credentials.IWebAccountFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class WebAccount
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Security.Credentials.IWebAccountFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class WebAccount
function WebAccount(webAccountProvider, userName, state)
Public NotInheritable Class WebAccount
继承
Object Platform::Object IInspectable WebAccount
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

构造函数

WebAccount(WebAccountProvider, String, WebAccountState)

创建 WebAccount 类的实例。

属性

Id

获取 Web 帐户的 ID。

Properties

获取 Web 帐户的属性。

State

获取 Web 帐户的连接状态。

UserName

获取 Web 帐户的用户名。

WebAccountProvider

获取帐户的 Web 身份验证提供程序。

方法

GetPictureAsync(WebAccountPictureSize)

异步获取 Web 帐户的图片。

SignOutAsync()

异步注销 Web 帐户。 这会清除与帐户关联的所有缓存令牌,并告知提供程序使与此应用的帐户关联的任何令牌失效。

SignOutAsync(String)

异步注销 Web 帐户。 这会清除与帐户关联的所有缓存令牌,并告知提供程序使与此应用的帐户关联的任何令牌失效。

适用于

另请参阅