You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
714 B
31 lines
714 B
3 years ago
|
using System;
|
||
|
|
||
|
namespace Sanhe.Abp.Notifications;
|
||
|
|
||
|
public class NotificationDataMappingDictionaryItem
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 通知名称
|
||
|
/// </summary>
|
||
|
public string Name { get; }
|
||
|
/// <summary>
|
||
|
/// 转换方法
|
||
|
/// </summary>
|
||
|
public Func<NotificationData, NotificationData> MappingFunc { get; private set; }
|
||
|
|
||
|
public NotificationDataMappingDictionaryItem(string name, Func<NotificationData, NotificationData> func)
|
||
|
{
|
||
|
Name = name;
|
||
|
MappingFunc = func;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 替换
|
||
|
/// </summary>
|
||
|
/// <param name="func"></param>
|
||
|
public void Replace(Func<NotificationData, NotificationData> func)
|
||
|
{
|
||
|
MappingFunc = func;
|
||
|
}
|
||
|
}
|