mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +01:00
* Plugins flexibility PR * Makes the BTCPayServerOptions.LoadArgs async to support Plugin hooks and actions * relax the private set modifiers in the BTCPayNetwork * Separate IPluginHookService from PluginService to reduce dependencies on DI * fix some small bugs around image path * Fix bug with new dbreeze migration where data dir was incorrect * Update BTCPayServer/Plugins/PluginHookService.cs Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com> * Update BTCPayServer/Plugins/PluginHookService.cs Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com> Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
16 lines
410 B
C#
16 lines
410 B
C#
using System.Threading.Tasks;
|
|
using BTCPayServer.Abstractions.Contracts;
|
|
|
|
namespace BTCPayServer.Abstractions.Services
|
|
{
|
|
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);
|
|
}
|
|
}
|