Bedingung vom Typ new() entfernen
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DigitalData.Core.Client
|
||||
{
|
||||
@@ -17,5 +18,8 @@ namespace DigitalData.Core.Client
|
||||
private static IServiceProvider Build() => _services.BuildServiceProvider();
|
||||
|
||||
public static T Provide<T>() where T : notnull => _lazyProvider.Value.GetRequiredService<T>();
|
||||
|
||||
public static IHttpClientService<TOptions> ProvideHttpClientService<TOptions>() where TOptions : notnull
|
||||
=> _lazyProvider.Value.GetRequiredService<IHttpClientService<TOptions>>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user