DI API changes
This commit is contained in:
parent
f7c78b8fbc
commit
ca9d6bcd77
|
|
@ -68,7 +68,6 @@ namespace Microsoft.AspNet.Hosting
|
||||||
public HostingManifest(IServiceCollection hostServices)
|
public HostingManifest(IServiceCollection hostServices)
|
||||||
{
|
{
|
||||||
Services = new Type[] {
|
Services = new Type[] {
|
||||||
typeof(ITypeActivator),
|
|
||||||
typeof(IHostingEnvironment),
|
typeof(IHostingEnvironment),
|
||||||
typeof(ILoggerFactory),
|
typeof(ILoggerFactory),
|
||||||
typeof(IHttpContextAccessor),
|
typeof(IHttpContextAccessor),
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,6 @@ namespace Microsoft.Framework.DependencyInjection
|
||||||
|
|
||||||
services.TryAdd(ServiceDescriptor.Instance<IApplicationLifetime>(new ApplicationLifetime()));
|
services.TryAdd(ServiceDescriptor.Instance<IApplicationLifetime>(new ApplicationLifetime()));
|
||||||
|
|
||||||
services.AddTypeActivator();
|
|
||||||
|
|
||||||
// TODO: Do we expect this to be provide by the runtime eventually?
|
// TODO: Do we expect this to be provide by the runtime eventually?
|
||||||
services.AddLogging();
|
services.AddLogging();
|
||||||
services.TryAdd(ServiceDescriptor.Singleton<IHostingEnvironment, HostingEnvironment>());
|
services.TryAdd(ServiceDescriptor.Singleton<IHostingEnvironment, HostingEnvironment>());
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ namespace Microsoft.AspNet.Hosting.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(typeof(ITypeActivator))]
|
|
||||||
[InlineData(typeof(IHostingEnvironment))]
|
[InlineData(typeof(IHostingEnvironment))]
|
||||||
[InlineData(typeof(ILoggerFactory))]
|
[InlineData(typeof(ILoggerFactory))]
|
||||||
[InlineData(typeof(IHttpContextAccessor))]
|
[InlineData(typeof(IHttpContextAccessor))]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue