btcpayserver/BTCPayServer.Abstractions/Services/PluginAction.cs

17 lines
412 B
C#
Raw Normal View History

using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
2021-12-31 08:59:02 +01:00
public abstract class PluginAction<T> : IPluginHookAction
{
public abstract string Hook { get; }
public Task Execute(object args)
{
return Execute(args is T args1 ? args1 : default);
}
public abstract Task Execute(T arg);
}
}