Skip to content

Commit 066ed18

Browse files
committed
v3.0.0-beta3 Add ApiClientName property
1 parent 67810e9 commit 066ed18

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Senparc.CO2NET/RegisterServices/RegisterServiceExtension.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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

4952
using System;
@@ -58,10 +61,12 @@ Modification Description:v1.1.100 Refactored SenparcDI
5861
using Senparc.CO2NET.Cache;
5962

6063

64+
6165
#if !NET462
6266
using System.Net.Http;
6367
using Microsoft.Extensions.Configuration;
6468
using Microsoft.Extensions.DependencyInjection;
69+
using Microsoft.Extensions.DependencyInjection.Extensions;
6570
#endif
6671

6772
namespace 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) =>

0 commit comments

Comments
 (0)