山东雷驰
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.

26 lines
646 B

3 months ago
using System.Threading;
using System.Threading.Tasks;
namespace Kean.Domain
{
public class NotificationEventHandler : IEventHandler<NotificationEvent>
{
protected INotification _notifications; // 通知
/*
*
*/
public NotificationEventHandler(INotification notifications) =>
_notifications = notifications;
/*
*
*/
public virtual Task Handle(NotificationEvent @event, CancellationToken cancellationToken)
{
_notifications.Add(@event);
return Task.CompletedTask;
}
}
}