Cleanup IContainer

This commit is contained in:
Stephan
2018-10-25 15:29:29 +02:00
parent 246b9e5af8
commit a12778fd94
5 changed files with 110 additions and 45 deletions

View File

@@ -20,8 +20,6 @@ namespace Umbraco.Core.Composing.LightInject
protected LightInjectContainer(ServiceContainer container)
{
Container = container;
container.RegisterSingleton<IContainer>(_ => this);
}
/// <summary>
@@ -154,6 +152,12 @@ namespace Umbraco.Core.Composing.LightInject
return ctor.Invoke(ctorArgs);
}
/// <inheritdoc />
public void Release(object instance)
{
// nothing to release with LightInject
}
// notes:
// we may want to look into MS code, eg:
// TypeActivatorCache in MVC at https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNetCore.Mvc.Core/Internal/TypeActivatorCache.cs
@@ -318,11 +322,6 @@ namespace Umbraco.Core.Composing.LightInject
#endregion
public void Release(object instance)
{
// fixme - no idea how to do this with LI
}
#region Control
/// <inheritdoc />