CortanaPermissionsManager.GrantPermissionsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously grants the specified set of Cortana permissions.
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)
Parameters
- permissions
The collection of permissions to grant.
Returns
The result of the permission operation.
- Attributes
Windows requirements
App capabilities |
cortanaPermissions
|
Remarks
The CortanaPermissionManager class requires the following be added to the Package.appmanifest:
- To <Package>
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap"
- Under <Capabilities>
<rescap:capability name="cortanaPermissions"/>