mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
b8da6847b9
* 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>
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System;
|
|
using System.Reflection;
|
|
using BTCPayServer.Abstractions.Contracts;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace BTCPayServer.Abstractions.Models
|
|
{
|
|
public abstract class BaseBTCPayServerPlugin : IBTCPayServerPlugin
|
|
{
|
|
public abstract string Identifier { get; }
|
|
public abstract string Name { get; }
|
|
|
|
public virtual Version Version
|
|
{
|
|
get
|
|
{
|
|
return Assembly.GetAssembly(GetType())?.GetName().Version ?? new Version(1, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
public abstract string Description { get; }
|
|
public bool SystemPlugin { get; set; }
|
|
public virtual IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
|
|
|
|
public virtual void Execute(IApplicationBuilder applicationBuilder,
|
|
IServiceProvider applicationBuilderApplicationServices)
|
|
{
|
|
}
|
|
|
|
public virtual void Execute(IServiceCollection applicationBuilder)
|
|
{
|
|
}
|
|
}
|
|
}
|