AppCapability.RequestAccessForCapabilitiesAsync 方法

定义

同时请求访问多个功能。

public:
 static IAsyncOperation<IMapView<Platform::String ^, AppCapabilityAccessStatus> ^> ^ RequestAccessForCapabilitiesAsync(IIterable<Platform::String ^> ^ capabilityNames);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IMapView<winrt::hstring, AppCapabilityAccessStatus>> RequestAccessForCapabilitiesAsync(IIterable<winrt::hstring> const& capabilityNames);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyDictionary<string,AppCapabilityAccessStatus>> RequestAccessForCapabilitiesAsync(IEnumerable<string> capabilityNames);
function requestAccessForCapabilitiesAsync(capabilityNames)
Public Shared Function RequestAccessForCapabilitiesAsync (capabilityNames As IEnumerable(Of String)) As IAsyncOperation(Of IReadOnlyDictionary(Of String, AppCapabilityAccessStatus))

参数

capabilityNames

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

功能名称字符串。

返回

返回一个只读字典,其中字符串功能作为 AppCapabilityAccessStatus 枚举的键。

属性

注解

RequestAccessForCapabilitiesAsync 不会创建任何新对象,并可能导致出现用户提示。

注意:必须从 UI 线程调用。

适用于