Share via


AppCapability.RequestAccessForCapabilitiesAsync Method

Definition

Requests access to multiple capabilities simultaneously.

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))

Parameters

capabilityNames

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

The capability name strings.

Returns

Returns a read-only Dictionary with string capabilities as keys to AppCapabilityAccessStatus enums.

Attributes

Remarks

RequestAccessForCapabilitiesAsync does not create any new objects and can cause a user prompt to appear.

Note: Must be called from the UI thread.

Applies to