2020-06-29 04:44:35 +02:00
|
|
|
using System;
|
2020-11-17 13:46:23 +01:00
|
|
|
using BTCPayServer.Abstractions.Contracts;
|
2020-06-16 16:29:25 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Services.Notifications
|
|
|
|
{
|
2020-10-15 14:28:09 +02:00
|
|
|
|
2020-06-16 16:29:25 +02:00
|
|
|
public abstract class NotificationHandler<TNotification> : INotificationHandler
|
|
|
|
{
|
|
|
|
public abstract string NotificationType { get; }
|
|
|
|
Type INotificationHandler.NotificationBlobType => typeof(TNotification);
|
2020-10-20 13:09:09 +02:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|