diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-01-28 21:17:59 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-01-28 21:17:59 +0100 |
| commit | e513f0b7483022b0ec0d13b8a7df178d7f5ab88c (patch) | |
| tree | e4ce6b9a8c3b9660d4e2872fafb1728d5038520e /src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs | |
| parent | dea3a825a06e7291889b2fb8886dc05148762f33 (diff) | |
| download | dotnet-vipps-ecommerce-e513f0b7483022b0ec0d13b8a7df178d7f5ab88c.tar.xz dotnet-vipps-ecommerce-e513f0b7483022b0ec0d13b8a7df178d7f5ab88c.zip | |
feat!: Remove support for different configuration stories
Configuration values is required to be explicitly specified when adding to DI
Diffstat (limited to 'src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs')
| -rw-r--r-- | src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs b/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs index 57f1833..e6a4fcd 100644 --- a/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs +++ b/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs @@ -29,21 +29,5 @@ namespace IOL.VippsEcommerce services.AddScoped<IVippsEcommerceService, VippsEcommerceService>(); return services; } - - /// <summary> - /// Adds the VippsEcommerceService to your DI, and expects configuration values from environment variables. - /// </summary> - /// <param name="services">Servicecollection to add VippsEcommerceService to.</param> - /// <returns></returns> - public static IServiceCollection AddVippsEcommerceService(this IServiceCollection services) { - if (services == null) { - throw new ArgumentNullException(nameof(services)); - } - - services.Configure(new Action<VippsConfiguration>(o => o.ConfigurationMode = VippsConfigurationMode.ONLY_ENVIRONMENT)); - services.AddHttpClient<IVippsEcommerceService, VippsEcommerceService>(); - services.AddScoped<IVippsEcommerceService, VippsEcommerceService>(); - return services; - } } } |
