CortanaPermissionsManager.GrantPermissionsAsync Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Secara asinkron memberikan sekumpulan izin Cortana yang ditentukan.
public:
virtual IAsyncOperation<CortanaPermissionsChangeResult> ^ GrantPermissionsAsync(IIterable<CortanaPermission> ^ permissions) = GrantPermissionsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CortanaPermissionsChangeResult> GrantPermissionsAsync(IIterable<CortanaPermission> const& permissions);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("ICortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
IAsyncOperation<CortanaPermissionsChangeResult> GrantPermissionsAsync(IIterable<CortanaPermission> const& permissions);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CortanaPermissionsChangeResult> GrantPermissionsAsync(IEnumerable<CortanaPermission> permissions);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("ICortanaPermissionsManager is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 655360, "Windows.Foundation.UniversalApiContract")]
public IAsyncOperation<CortanaPermissionsChangeResult> GrantPermissionsAsync(IEnumerable<CortanaPermission> permissions);
function grantPermissionsAsync(permissions)
Public Function GrantPermissionsAsync (permissions As IEnumerable(Of CortanaPermission)) As IAsyncOperation(Of CortanaPermissionsChangeResult)
Parameter
- permissions
Pengumpulan izin yang akan diberikan.
Mengembalikan
Hasil operasi izin.
- Atribut
Persyaratan Windows
Kemampuan aplikasi |
cortanaPermissions
|
Keterangan
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"/>