btcpayserver/BTCPayServer/Services/Notifications/INotificationHandler.cs

20 lines
693 B
C#
Raw Normal View History

2020-06-29 04:44:35 +02:00
using System;
using BTCPayServer.Abstractions.Contracts;
2020-06-16 16:29:25 +02:00
namespace BTCPayServer.Services.Notifications
{
2020-06-16 16:29:25 +02: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 16:29:25 +02:00
void INotificationHandler.FillViewModel(object notification, NotificationViewModel vm)
{
FillViewModel((TNotification)notification, vm);
}
protected abstract void FillViewModel(TNotification notification, NotificationViewModel vm);
}
}