mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
* BTCPay Extensions Part 2 This PR cleans up the extension system a bit in that: * It renames the test extension to a more uniform name * Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed) * Adds a tool to help you generate an extension package from a csproj * Refactors the UI extension points to a view component * Moves some more interfaces to the Abstractions csproj * Rename to plugins
19 lines
731 B
C#
19 lines
731 B
C#
using BTCPayServer.Contracts;
|
|
using BTCPayServer.Models;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace BTCPayServer.Plugins.Test
|
|
{
|
|
public class TestPlugin: BaseBTCPayServerPlugin
|
|
{
|
|
public override string Identifier { get; } = "BTCPayServer.Plugins.Test";
|
|
public override string Name { get; } = "Test Plugin!";
|
|
public override string Description { get; } = "This is a description of the loaded test extension!";
|
|
|
|
public override void Execute(IServiceCollection services)
|
|
{
|
|
services.AddSingleton<IUIExtension>(new UIExtension("TestExtensionNavExtension", "header-nav"));
|
|
services.AddHostedService<ApplicationPartsLogger>();
|
|
}
|
|
}
|
|
}
|