zcz527 / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

When nesting lifetimes to multiple levels with registrations in most nested level parent registrations are duplicated #336

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
var builder = new ContainerBuilder();
builder.RegisterType<string>();
var container = builder.Build();
var child1 = container.BeginLifetimeScope();
var child2 = child1.BeginLifetimeScope(b => b.RegisterType<object>());
Assert.AreEqual(1, child2.Resolve<IEnumerable<string>>().Count());

This is a regression caused by the fix for Issue 312.

Original issue reported on code.google.com by nicholas...@gmail.com on 19 Jul 2011 at 11:25

GoogleCodeExporter commented 8 years ago

Original comment by nicholas...@gmail.com on 12 Aug 2011 at 7:42