using BTCPayServer.Abstractions.Contracts; using BTCPayServer.Abstractions.Extensions; using BTCPayServer.Abstractions.Models; using BTCPayServer.Abstractions.Services; using BTCPayServer.HostedServices.Webhooks; using BTCPayServer.Services.Apps; using Microsoft.Extensions.DependencyInjection; namespace BTCPayServer.Plugins.TicketTailor { public class TicketTailorPlugin : BaseBTCPayServerPlugin { public override IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = { new() {Identifier = nameof(BTCPayServer), Condition = ">=1.12.0"} }; public override void Execute(IServiceCollection applicationBuilder) { applicationBuilder.AddStartupTask(); applicationBuilder.AddSingleton(); applicationBuilder.AddSingleton(o => o.GetRequiredService()); applicationBuilder.AddHostedService(s => s.GetRequiredService()); applicationBuilder.AddSingleton(new UIExtension("TicketTailor/NavExtension", "header-nav")); applicationBuilder.AddSingleton(); base.Execute(applicationBuilder); } } }