共用方式為


UserActivityChannel.GetOrCreateUserActivityAsync(String) 方法

定義

建立 (或取得具有指定識別碼的 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;否則,會指定指定識別碼的新UserActivity

屬性

適用於