Condividi tramite


CortanaPermissionsManager.GrantPermissionsAsync Metodo

Definizione

Concede in modo asincrono il set specificato di autorizzazioni Cortana.

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)

Parametri

permissions

IIterable<CortanaPermission>

IEnumerable<CortanaPermission>

Raccolta di autorizzazioni da concedere.

Restituisce

Risultato dell'operazione di autorizzazione.

Attributi

Requisiti Windows

Funzionalità dell'app
cortanaPermissions

Commenti

La classe CortanaPermissionManager richiede l'aggiunta seguente al Package.appmanifest:

  • Per <il pacchetto>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • In <Funzionalità>
    • <rescap:capability name="cortanaPermissions"/>

Si applica a

Vedi anche