mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
179520a211
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
20 lines
693 B
C#
20 lines
693 B
C#
using System;
|
|
using BTCPayServer.Abstractions.Contracts;
|
|
|
|
namespace BTCPayServer.Services.Notifications
|
|
{
|
|
|
|
public abstract class NotificationHandler<TNotification> : INotificationHandler
|
|
{
|
|
public abstract string NotificationType { get; }
|
|
Type INotificationHandler.NotificationBlobType => typeof(TNotification);
|
|
public abstract (string identifier, string name)[] Meta { get; }
|
|
|
|
void INotificationHandler.FillViewModel(object notification, NotificationViewModel vm)
|
|
{
|
|
FillViewModel((TNotification)notification, vm);
|
|
}
|
|
protected abstract void FillViewModel(TNotification notification, NotificationViewModel vm);
|
|
}
|
|
}
|