File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . Extensions . DependencyInjection ;
2+ using Microsoft . Extensions . DependencyInjection . Extensions ;
3+
4+ namespace PayNLSdk ;
5+ /// <summary>
6+ /// Extension services for Pay.nl SDK
7+ /// </summary>
8+ public static class DependencyInjection
9+ {
10+ /// <summary>
11+ /// Register Pay. services
12+ /// </summary>
13+ /// <param name="services"></param>
14+ /// <returns></returns>
15+ public static IServiceCollection AddPayNl ( this IServiceCollection services )
16+ {
17+ // Register your services here
18+ services . TryAddScoped < ITransaction , Transaction > ( ) ;
19+ services . TryAddScoped < IMerchant , Merchant > ( ) ;
20+ services . TryAddScoped < IService , Service > ( ) ;
21+ services . TryAddScoped < IAlliance , Alliance > ( ) ;
22+ services . TryAddScoped < IStatistics , Statistics > ( ) ;
23+ services . TryAddScoped < ILanguage , Language > ( ) ;
24+ return services ;
25+ }
26+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ Targeting netstandard2.0
3535
3636 <ItemGroup >
3737 <PackageReference Include =" System.Text.Json" Version =" 7.0.3" />
38+ <PackageReference Include =" Microsoft.Extensions.DependencyInjection.Abstractions" Version =" 8.0.2" />
39+ <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.1" />
3840 <PackageReference Include =" System.ComponentModel.Annotations" Version =" 4.7.0" />
3941 </ItemGroup >
4042
You can’t perform that action at this time.
0 commit comments