From 84ccd406ed7584bcedb71dca68113a58e9072f82 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sun, 18 Apr 2021 23:26:06 +0200 Subject: Rename VippsConfigurationKeyNames.cs internally, formatting --- .../ServiceCollectionExtensions.cs | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs') diff --git a/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs b/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs index 1637dc9..57f1833 100644 --- a/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs +++ b/src/IOL.VippsEcommerce/ServiceCollectionExtensions.cs @@ -13,13 +13,17 @@ namespace IOL.VippsEcommerce /// /// public static IServiceCollection AddVippsEcommerceService( - this IServiceCollection services, - Action configuration + this IServiceCollection services, + Action configuration ) { - if (services == null) + if (services == null) { throw new ArgumentNullException(nameof(services)); - if (configuration == null) + } + + if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); + } + services.Configure(configuration); services.AddHttpClient(); services.AddScoped(); @@ -31,16 +35,15 @@ namespace IOL.VippsEcommerce /// /// Servicecollection to add VippsEcommerceService to. /// - public static IServiceCollection AddVippsEcommerceService( - this IServiceCollection services - ) { - if (services == null) + 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.Configure(new Action(o => o.ConfigurationMode = VippsConfigurationMode.ONLY_ENVIRONMENT)); services.AddHttpClient(); services.AddScoped(); return services; } } -} \ No newline at end of file +} -- cgit v1.3