UserActivityChannel.GetOrCreateUserActivityAsync(String) 方法

定义

创建 (或获取具有指定 ID 的 UserActivity) 。

public:
 virtual IAsyncOperation<UserActivity ^> ^ GetOrCreateUserActivityAsync(Platform::String ^ activityId) = GetOrCreateUserActivityAsync;
/// [Windows.Foundation.Metadata.Overload("GetOrCreateUserActivityAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<UserActivity> GetOrCreateUserActivityAsync(winrt::hstring const& activityId);
[Windows.Foundation.Metadata.Overload("GetOrCreateUserActivityAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<UserActivity> GetOrCreateUserActivityAsync(string activityId);
function getOrCreateUserActivityAsync(activityId)
Public Function GetOrCreateUserActivityAsync (activityId As String) As IAsyncOperation(Of UserActivity)

参数

activityId
String

Platform::String

winrt::hstring

UserActivity 的标识符。

返回

如果 activityId 匹配,则为现有 UserActivity;否则为指定 ID 提供的新 UserActivity

属性

适用于