次の方法で共有


CortanaPermissionsManager.GrantPermissionsAsync メソッド

定義

指定した 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)

パラメーター

permissions

IIterable<CortanaPermission>

IEnumerable<CortanaPermission>

付与する アクセス許可 のコレクション。

戻り値

アクセス許可操作の結果。

属性

Windows の要件

アプリの機能
cortanaPermissions

注釈

CortanaPermissionManager クラスを Package.appmanifest に追加するには、次のものが必要です。

  • パッケージ化<>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • [機能]<>
    • <rescap:capability name="cortanaPermissions"/>

適用対象

こちらもご覧ください