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)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ namespace Microsoft.AspNet.Hosting.Tests
|
|||
[InlineData(typeof(IApplicationLifetime))]
|
||||
[InlineData(typeof(ILoggerFactory))]
|
||||
[InlineData(typeof(IHttpContextAccessor))]
|
||||
[InlineData(typeof(ILogger<IHostingEngine>))]
|
||||
public void UseRequestServicesHostingImportedServicesAreDefined(Type service)
|
||||
{
|
||||
var baseServiceProvider = HostingServices.Create().BuildServiceProvider();
|
||||
|
|
|
|||
Loading…
Reference in New Issue