-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathStartupApplication.cs
More file actions
31 lines (27 loc) · 1.03 KB
/
StartupApplication.cs
File metadata and controls
31 lines (27 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Grand.Business.Core.Interfaces.Checkout.Payments;
using Grand.Infrastructure;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Payments.BTCPayServer.Services;
namespace Payments.BTCPayServer
{
public class StartupApplication : IStartupApplication
{
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
services.AddScoped<IPaymentProvider, BTCPayServerPaymentProvider>();
services.AddScoped<BtcPayService>();
services.AddScoped<Func<BtcPayService>>(serviceProvider =>
{
return () => serviceProvider.GetRequiredService<BtcPayService>();
});
}
public int Priority => 10;
public void Configure(WebApplication application, IWebHostEnvironment webHostEnvironment)
{
}
public bool BeforeConfigure => false;
}
}