From e513f0b7483022b0ec0d13b8a7df178d7f5ab88c Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Fri, 28 Jan 2022 21:17:59 +0100 Subject: feat!: Remove support for different configuration stories Configuration values is required to be explicitly specified when adding to DI --- src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs') 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(); return services; } - - /// - /// Adds the VippsEcommerceService to your DI, and expects configuration values from environment variables. - /// - /// Servicecollection to add VippsEcommerceService to. - /// - public static IServiceCollection AddVippsEcommerceService(this IServiceCollection services) { - if (services == null) { - throw new ArgumentNullException(nameof(services)); - } - - services.Configure(new Action(o => o.ConfigurationMode = VippsConfigurationMode.ONLY_ENVIRONMENT)); - services.AddHttpClient(); - services.AddScoped(); - return services; - } } } -- cgit v1.3