File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Senparc.CO2NET/RegisterServices Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ Modification Description:v0.7.3 .NET Core provides multi-certificate registrat
4444 Modification Identifier:Senparc - 20200220
4545 Modification Description:v1.1.100 Refactored SenparcDI
4646
47+ Modification Identifier:Senparc - 20241119
48+ Modification Description:v1.1.100 Refactored SenparcDI
49+
4750----------------------------------------------------------------*/
4851
4952using System ;
@@ -58,10 +61,12 @@ Modification Description:v1.1.100 Refactored SenparcDI
5861using Senparc . CO2NET . Cache ;
5962
6063
64+
6165#if ! NET462
6266using System . Net . Http ;
6367using Microsoft . Extensions . Configuration ;
6468using Microsoft . Extensions . DependencyInjection ;
69+ using Microsoft . Extensions . DependencyInjection . Extensions ;
6570#endif
6671
6772namespace Senparc . CO2NET . RegisterServices
@@ -92,7 +97,9 @@ public static IServiceCollection AddSenparcGlobalServices(this IServiceCollectio
9297
9398 serviceCollection . AddTransient < IBaseObjectCacheStrategy > ( s => CacheStrategyFactory . GetObjectCacheStrategyInstance ( ) ) ;
9499
95- // .net core 3.0 HttpClient documentation reference: https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/http-requests?view=aspnetcore-3.0
100+ serviceCollection . AddScoped < ApiClientHelper > ( ) ;
101+
102+ // .net core 8.0 HttpClient documentation reference: https://learn.microsoft.com/zh-cn/aspnet/core/fundamentals/http-requests?view=aspnetcore-8.0
96103 //Configure HttpClient, can use Head to customize Cookie
97104 serviceCollection . AddHttpClient < SenparcHttpClient > ( )
98105 //.ConfigureHttpMessageHandlerBuilder((c) =>
You can’t perform that action at this time.
0 commit comments