btcpayserver/BTCPayServer/Services/Notifications/INotificationHandler.cs

20 lines
693 B
C#
Raw Normal View History

2020-06-28 21:44:35 -05:00
using System;
using BTCPayServer.Abstractions.Contracts;
2020-06-16 23:29:25 +09:00
namespace BTCPayServer.Services.Notifications
{
2020-06-16 23:29:25 +09:00
public abstract class NotificationHandler<TNotification> : INotificationHandler
{
public abstract string NotificationType { get; }
Type INotificationHandler.NotificationBlobType => typeof(TNotification);
public abstract (string identifier, string name)[] Meta { get; }
2020-06-16 23:29:25 +09:00
void INotificationHandler.FillViewModel(object notification, NotificationViewModel vm)
{
FillViewModel((TNotification)notification, vm);
}
protected abstract void FillViewModel(TNotification notification, NotificationViewModel vm);
}
}