共用方式為


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 帳戶的識別碼。

Properties

取得 Web 帳戶的屬性。

State

取得 Web 帳戶的線上狀態。

UserName

取得 Web 帳戶的使用者名稱。

WebAccountProvider

取得帳戶的 Web 驗證提供者。

方法

GetPictureAsync(WebAccountPictureSize)

以非同步方式取得 Web 帳戶的圖片。

SignOutAsync()

以非同步方式簽署 Web 帳戶。 這會清除與帳戶相關聯的所有快取權杖,並告知提供者使與此應用程式帳戶相關聯的任何權杖失效。

SignOutAsync(String)

以非同步方式簽署 Web 帳戶。 這會清除與帳戶相關聯的所有快取權杖,並告知提供者使與此應用程式帳戶相關聯的任何權杖失效。

適用於

另請參閱