committed by
GitHub
15 changed files with 115 additions and 42 deletions
@ -0,0 +1,5 @@ |
|||||
|
namespace LINGYUN.Abp.BlobStoring.Tencent; |
||||
|
internal static class BlobStoringTencentConsts |
||||
|
{ |
||||
|
public const string HttpClient = "BlobStoring.Tencent"; |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
using LINGYUN.Abp.BlobStoring.Tencent; |
||||
|
|
||||
|
namespace Microsoft.Extensions.DependencyInjection; |
||||
|
internal static class BlobStoringTencentHttpClientFactoryServiceCollectionExtensions |
||||
|
{ |
||||
|
public static IServiceCollection AddTenantOssClient(this IServiceCollection services) |
||||
|
{ |
||||
|
services.AddHttpClient(BlobStoringTencentConsts.HttpClient); |
||||
|
|
||||
|
return services; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using LINGYUN.Abp.BlobStoring.Tencent; |
||||
|
|
||||
|
namespace System.Net.Http; |
||||
|
public static class BlobStoringTencentHttpClientFactoryExtenssions |
||||
|
{ |
||||
|
public static HttpClient CreateTenantOssClient( |
||||
|
this IHttpClientFactory httpClientFactory) |
||||
|
{ |
||||
|
return httpClientFactory.CreateClient(BlobStoringTencentConsts.HttpClient); ; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
using System.Net.Http; |
||||
|
|
||||
|
namespace Microsoft.Extensions.DependencyInjection; |
||||
|
internal static class MinioHttpClientFactoryServiceCollectionExtensions |
||||
|
{ |
||||
|
private const string HttpClientName = "__AbpMinioHttpClient"; |
||||
|
public static IServiceCollection AddMinioHttpClient(this IServiceCollection services) |
||||
|
{ |
||||
|
services.AddHttpClient(HttpClientName); |
||||
|
|
||||
|
return services; |
||||
|
} |
||||
|
|
||||
|
public static HttpClient CreateMinioHttpClient(this IHttpClientFactory httpClientFactory) |
||||
|
{ |
||||
|
return httpClientFactory.CreateClient(HttpClientName); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue