File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
libs/SailthruSDK.Extensions.DependencyInjection Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ public static IServiceCollection AddSailthru(
7070 Ensure . IsNotNull ( configuration , nameof ( configuration ) ) ;
7171
7272 services . Configure < SailthruSettings > ( configuration . GetSection ( SailthruSettings . ConfigurationSection ) ) ;
73- services . AddSingleton ( sp => sp . GetRequiredService < IOptions < SailthruSettings > > ( ) . Value ) ;
7473
7574 AddCoreServices ( services ) ;
7675
@@ -82,6 +81,8 @@ static void AddCoreServices(IServiceCollection services)
8281 services . AddHttpClient < SailthruClient > (
8382 "Sailthru" ,
8483 ( sp , http ) => ConfigureHttpClient ( sp , http ) ) ;
84+
85+ services . AddSingleton ( sp => sp . GetRequiredService < IOptions < SailthruSettings > > ( ) . Value ) ;
8586 }
8687
8788 static void ConfigureHttpClient ( IServiceProvider services , HttpClient http )
You can’t perform that action at this time.
0 commit comments