Add ILogger to manifest
This commit is contained in:
parent
21d5ae540e
commit
b510370c9b
|
|
@ -67,7 +67,7 @@ namespace Microsoft.AspNet.Hosting
|
||||||
{
|
{
|
||||||
public HostingManifest(IServiceCollection hostServices)
|
public HostingManifest(IServiceCollection hostServices)
|
||||||
{
|
{
|
||||||
Services = new Type[] { typeof(ITypeActivator), typeof(IHostingEnvironment), typeof(ILoggerFactory), typeof(IHttpContextAccessor) }
|
Services = new Type[] { typeof(ITypeActivator), typeof(IHostingEnvironment), typeof(ILoggerFactory), typeof(ILogger<>), typeof(IHttpContextAccessor) }
|
||||||
.Concat(hostServices.Select(s => s.ServiceType)).Distinct();
|
.Concat(hostServices.Select(s => s.ServiceType)).Distinct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ namespace Microsoft.AspNet.Hosting.Tests
|
||||||
[InlineData(typeof(IApplicationLifetime))]
|
[InlineData(typeof(IApplicationLifetime))]
|
||||||
[InlineData(typeof(ILoggerFactory))]
|
[InlineData(typeof(ILoggerFactory))]
|
||||||
[InlineData(typeof(IHttpContextAccessor))]
|
[InlineData(typeof(IHttpContextAccessor))]
|
||||||
|
[InlineData(typeof(ILogger<IHostingEngine>))]
|
||||||
public void UseRequestServicesHostingImportedServicesAreDefined(Type service)
|
public void UseRequestServicesHostingImportedServicesAreDefined(Type service)
|
||||||
{
|
{
|
||||||
var baseServiceProvider = HostingServices.Create().BuildServiceProvider();
|
var baseServiceProvider = HostingServices.Create().BuildServiceProvider();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue