mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
179520a211
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
37 lines
1.1 KiB
C#
37 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 bool SystemExtension { 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)
|
|
{
|
|
}
|
|
}
|
|
}
|