mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
18 lines
472 B
C#
18 lines
472 B
C#
using System.Threading.Tasks;
|
|
using BTCPayServer.Abstractions.Contracts;
|
|
|
|
namespace BTCPayServer.Abstractions.Services
|
|
{
|
|
public abstract class PluginHookFilter<T> : IPluginHookFilter
|
|
{
|
|
public abstract 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);
|
|
}
|
|
}
|