UserActivityChannel.DeleteActivityAsync(String) 方法

定义

删除特定用户活动。

public:
 virtual IAsyncAction ^ DeleteActivityAsync(Platform::String ^ activityId) = DeleteActivityAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction DeleteActivityAsync(winrt::hstring const& activityId);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction DeleteActivityAsync(string activityId);
function deleteActivityAsync(activityId)
Public Function DeleteActivityAsync (activityId As String) As IAsyncAction

参数

activityId
String

Platform::String

winrt::hstring

要删除的用户活动的标识符。

返回

异步操作。

属性

示例

UserActivityChannel channel = UserActivityChannel.GetDefault();
string activityId = "/article?" + article.Link;
channel.DeleteActivity(activityId);

注解

可以从 UserActivity.ActivityId 获取用户活动的标识符。

适用于