Table of Contents

NotificationRequest 类

命名空间
ClassIsland.Core.Models.Notification
程序集
ClassIsland.Core.dll

代表一个提醒请求。

public class NotificationRequest : ObservableRecipient, INotifyPropertyChanged, INotifyPropertyChanging
继承
NotificationRequest
实现
继承成员

构造函数

NotificationRequest()

初始化一个 NotificationRequest 实例。

public NotificationRequest()

属性

CancellationToken

代表提醒被取消的取消令牌。

public CancellationToken CancellationToken { get; }

属性值

CancellationToken

ChannelId

发送提醒的提醒渠道 ID

public Guid ChannelId { get; set; }

属性值

Guid

CompletedToken

代表提醒显示完成的取消令牌。

public CancellationToken CompletedToken { get; }

属性值

CancellationToken

MaskContent

提醒遮罩内容

[Required]
public NotificationContent MaskContent { get; set; }

属性值

NotificationContent

OverlayContent

提醒正文内容。如果为 null,则不显示正文。

public NotificationContent? OverlayContent { get; set; }

属性值

NotificationContent

RequestNotificationSettings

针对此次提醒的特殊设置。如果要使此设置生效,还要将IsSettingsEnabled设置为true。

public NotificationSettings RequestNotificationSettings { get; set; }

属性值

NotificationSettings

方法

Cancel()

取消当前提醒。

public void Cancel()

事件

Canceled

当当前提醒被取消时触发。

public event EventHandler? Canceled

事件类型

EventHandler

Completed

当当前提醒显示完成时触发。

public event EventHandler? Completed

事件类型

EventHandler