Add ILogger to manifest

This commit is contained in:
Hao Kung 2015-02-19 16:58:04 -08:00
parent 21d5ae540e
commit b510370c9b
2 changed files with 2 additions and 1 deletions

View File

@ -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();
}

View File

@ -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();