Partager via


CortanaPermissionsManager.GrantPermissionsAsync Méthode

Définition

Octroie de façon asynchrone l’ensemble d’autorisations Cortana spécifié.

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)

Paramètres

Retours

Résultat de l’opération d’autorisation.

Attributs

Configuration requise pour Windows

Fonctionnalités de l’application
cortanaPermissions

Remarques

La classe CortanaPermissionManager nécessite l’ajout des éléments suivants à Package.appmanifest :

  • Vers <le package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • Sous <Fonctionnalités>
    • <rescap:capability name="cortanaPermissions"/>

S’applique à

Voir aussi