AppCapability.RequestAccessForCapabilitiesForUserAsync 方法

定义

同时请求访问多个功能。

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

参数

user
User

为其创建对象的用户属性。

capabilityNames

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

功能名称字符串。

返回

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

属性

注解

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

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

适用于

另请参阅