This commit is contained in:
@@ -25,11 +25,12 @@ namespace AyaNova.Util
|
||||
{
|
||||
get
|
||||
{
|
||||
#if (DEBUG)
|
||||
if(_provider==null){
|
||||
#if (DEBUG)
|
||||
if (_provider == null)
|
||||
{
|
||||
throw new System.NotSupportedException("ServiceProviderProvider.cs - Attempt to use service provider before it's been initialized");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return _provider;
|
||||
}
|
||||
set
|
||||
@@ -57,6 +58,14 @@ namespace AyaNova.Util
|
||||
}
|
||||
}
|
||||
|
||||
// https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-3.1
|
||||
internal static System.Net.Http.IHttpClientFactory HttpClientFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
return Scope.ServiceProvider.GetRequiredService<System.Net.Http.IHttpClientFactory>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user