mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
27 lines
980 B
C#
27 lines
980 B
C#
using BTCPayServer.Abstractions.Contracts;
|
|
using BTCPayServer.Abstractions.Extensions;
|
|
using BTCPayServer.Abstractions.Models;
|
|
using BTCPayServer.Abstractions.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
namespace BTCPayServer.Plugins.Bringin;
|
|
|
|
public class BringinPlugin : BaseBTCPayServerPlugin
|
|
{
|
|
public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } =
|
|
{
|
|
new()
|
|
{
|
|
Identifier = nameof(BTCPayServer), Condition = ">=2.0.6"
|
|
}
|
|
};
|
|
|
|
public override void Execute(IServiceCollection applicationBuilder)
|
|
{
|
|
applicationBuilder.AddSingleton<BringinService>();
|
|
applicationBuilder.AddSingleton<IHostedService, BringinService>(s => s.GetService<BringinService>());
|
|
applicationBuilder.AddUIExtension("dashboard", "Bringin/BringinDashboardWidget");
|
|
applicationBuilder.AddUIExtension("store-integrations-nav", "Bringin/Nav");
|
|
}
|
|
} |