2020-11-15 14:39:21 +01:00
|
|
|
using System.Threading.Tasks;
|
2020-11-17 13:46:23 +01:00
|
|
|
using BTCPayServer.Abstractions.Contracts;
|
2020-11-15 14:39:21 +01:00
|
|
|
|
2020-11-17 13:46:23 +01:00
|
|
|
namespace BTCPayServer.Abstractions.Services
|
2020-11-15 14:39:21 +01:00
|
|
|
{
|
2021-12-31 08:59:02 +01:00
|
|
|
public abstract class PluginAction<T> : IPluginHookAction
|
2020-11-15 14:39:21 +01:00
|
|
|
{
|
2021-01-07 14:49:53 +01:00
|
|
|
public abstract string Hook { get; }
|
2020-11-15 14:39:21 +01:00
|
|
|
public Task Execute(object args)
|
|
|
|
{
|
|
|
|
return Execute(args is T args1 ? args1 : default);
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract Task Execute(T arg);
|
|
|
|
}
|
2020-11-17 13:46:23 +01:00
|
|
|
}
|