refactor(HttpClientOptions): entfernt und durch IHttpClientOptions mit Klasseneinschränkung ersetzt

This commit is contained in:
Developer 02
2024-11-25 11:19:41 +01:00
parent f602a842be
commit ef7da0e52c
4 changed files with 3 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ namespace DigitalData.Core.Client
public static class DIExtensions
{
public static IServiceCollection AddHttpClientService<THttpClientOptions>(this IServiceCollection services, IConfigurationSection? section = null)
where THttpClientOptions : HttpClientOptions
where THttpClientOptions : class, IHttpClientOptions
{
services.TryAddSingleton<HttpClient>();
services.TryAddSingleton<CookieContainer>();