mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
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
17 lines
460 B
C#
17 lines
460 B
C#
using System.Threading.Tasks;
|
|
using BTCPayServer.Abstractions.Contracts;
|
|
|
|
namespace BTCPayServer.Abstractions.Services
|
|
{
|
|
public abstract class PluginHookFilter<T>:IPluginHookFilter
|
|
{
|
|
public string Hook { get; }
|
|
public Task<object> Execute(object args)
|
|
{
|
|
return Execute(args is T args1 ? args1 : default).ContinueWith(task => task.Result as object);
|
|
}
|
|
|
|
public abstract Task<T> Execute(T arg);
|
|
}
|
|
}
|