CoreUserActivityManager 类

定义

管理用户活动的创建和删除。

public ref class CoreUserActivityManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CoreUserActivityManager final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CoreUserActivityManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class CoreUserActivityManager
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class CoreUserActivityManager
Public Class CoreUserActivityManager
继承
Object Platform::Object IInspectable CoreUserActivityManager
属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)

注解

UserActivity 封装了用户的任务,该任务可以在以后继续执行,并可能在不同的设备上继续。 例如,当用户开始创建新电子邮件时,邮件应用可以创建 UserActivity。 用户可以暂停处理电子邮件,然后在同一台计算机甚至另一台设备上处理电子邮件。

方法

CreateUserActivitySessionInBackground(UserActivity)

创建用户活动会话。

DeleteUserActivitySessionsInTimeRangeAsync(UserActivityChannel, DateTime, DateTime)

删除在指定时间范围内创建的用户活动。

适用于