User 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表使用者。
public ref class User sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class User 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)]
class User final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class User
[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 User
Public NotInheritable Class User
- 繼承
- 屬性
Windows 需求
| 規格需求 | Description |
|---|---|
| 裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
| API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
屬性
| 名稱 | Description |
|---|---|
| AuthenticationStatus |
取得使用者的驗證狀態。 |
| NonRoamableId |
取得使用者不可漫遊的標識碼。 |
| Type |
取得用戶類型。 |
方法
| 名稱 | Description |
|---|---|
| CheckUserAgeConsentGroupAsync(UserAgeConsentGroup) |
擷取值,指出使用者是否屬於指定的用戶年齡同意群組。 |
| CreateWatcher() |
建立 UserWatcher,以列舉使用者,並在使用者集合變更或使用者驗證狀態變更時引發事件。 |
| FindAllAsync() |
以異步方式尋找所有使用者。 |
| FindAllAsync(UserType, UserAuthenticationStatus) |
以異步方式尋找指定類型和驗證狀態的所有使用者。 |
| FindAllAsync(UserType) |
以異步方式尋找指定類型的所有使用者。 |
| GetAgeVerificationStatusAsync() |
取得一個值,表示目前使用者年齡是否以及如何被驗證。 |
| GetDefault() |
取得物件,表示預設用戶帳戶。 |
| GetFromId(String) |
取得具有指定標識碼的使用者。 |
| GetPictureAsync(UserPictureSize) |
以異步方式取得用戶的圖片。 |
| GetPropertiesAsync(IVectorView<String>) |
取得用戶的屬性。 |
| GetPropertyAsync(String) |
取得用戶的屬性。 使用 KnownUserProperties 類別來取得屬性名稱。 |
| GetUserAgeRangeAsync() |
取得當前使用者所屬的年齡範圍。 |