Table of Contents

NotificationChannel 类

命名空间
ClassIsland.Core.Abstractions.Services.NotificationProviders
程序集
ClassIsland.Core.dll

代表一个提醒发送渠道

public class NotificationChannel : INotificationSender, INotificationProvider
继承
NotificationChannel
实现
继承成员

属性

ChannelInfo

当前提醒渠道信息

public NotificationChannelInfo ChannelInfo { get; }

属性值

NotificationChannelInfo

Description

提醒提供方描述

public string Description { get; set; }

属性值

string

IconElement

提醒提供方图标元素,留空则代表使用默认图标。

public object? IconElement { get; set; }

属性值

object

Name

提醒提供方名称

public string Name { get; set; }

属性值

string

ProviderInfo

当前提醒渠道所属的提醒提供方信息

public NotificationProviderInfo ProviderInfo { get; }

属性值

NotificationProviderInfo

SettingsElement

提醒提供方设置界面控件,将显示在【应用设置】->【提醒】中。留空则代表此提醒提供方没有设置界面。

public object? SettingsElement { get; set; }

属性值

object

方法

ShowChainedNotifications(params NotificationRequest[])

显示链式提醒。链式显示的提醒会按照传入的顺序显示,并且当其中一个提醒被取消时,所有后续的提醒都会被取消。

public void ShowChainedNotifications(params NotificationRequest[] requests)

参数

requests NotificationRequest[]

提醒请求

ShowChainedNotificationsAsync(NotificationRequest[])

显示链式提醒,并等待最后一个提醒显示完成。链式显示的提醒会按照传入的顺序显示,并且当其中一个提醒被取消时,所有后续的提醒都会被取消。

public Task ShowChainedNotificationsAsync(NotificationRequest[] requests)

参数

requests NotificationRequest[]

提醒请求

返回

Task

ShowNotification(NotificationRequest)

显示一个提醒。

public void ShowNotification(NotificationRequest request)

参数

request NotificationRequest

提醒请求

ShowNotificationAsync(NotificationRequest)

显示一个提醒,并等待提醒显示完成。

public Task ShowNotificationAsync(NotificationRequest request)

参数

request NotificationRequest

提醒请求

返回

Task