Bagikan melalui


CortanaPermissionsManager Kelas

Definisi

Menyediakan akses ke pengaturan otorisasi Cortana pengguna.

public ref class CortanaPermissionsManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CortanaPermissionsManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("CortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
class CortanaPermissionsManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CortanaPermissionsManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("CortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
public sealed class CortanaPermissionsManager
Public NotInheritable Class CortanaPermissionsManager
Warisan
Object Platform::Object IInspectable CortanaPermissionsManager
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10 Creators Update (diperkenalkan dalam 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v4.0)
Kemampuan aplikasi
cortanaPermissions

Keterangan

Ini adalah kelas statis, Anda tidak perlu mendapatkan objek CortanaPermissionsManager untuk mengakses anggotanya.

Kelas CortanaPermissionManager mengharuskan hal berikut ditambahkan ke Package.appmanifest:

  • Ke <Paket>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • Di bawah <Kapabilitas>
    • <rescap:capability name="cortanaPermissions"/>

Metode

ArePermissionsGrantedAsync(IIterable<CortanaPermission>)

Secara asinkron melakukan retreif apakah izin yang ditentukan diberikan.

GetDefault()

Mengambil izin Cortana untuk pengguna saat ini.

GrantPermissionsAsync(IIterable<CortanaPermission>)

Secara asinkron memberikan sekumpulan izin Cortana yang ditentukan.

IsSupported()

Mengambil apakah Cortana didukung.

RevokePermissionsAsync(IIterable<CortanaPermission>)

Secara asinkron mencabut sekumpulan izin Cortana yang ditentukan.

Berlaku untuk