diff options
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; - } } } |
