Closed GoogleCodeExporter closed 8 years ago
I should also note that the following unit test works fine using either
reflection or expression registration. This to me indicates a problem with the
Asp.Net part.
[Test]
public void BuilderRegistersFoobarPersister()
{
var builder = new ContainerBuilder();
builder.Register(context => new SessionFactoryProvider().GetSessionFactory()).As<ISessionFactory>().SingleInstance();
//Either way will work in a unit test...
//builder.Register(context => new FoobarPersister(context.Resolve<ISessionFactory>())).As<ISimplePersister<Foobar>>();
builder.RegisterType<FoobarPersister>().As<ISimplePersister<Foobar>>();
var container = builder.Build();
var persister = container.Resolve<ISimplePersister<Foobar>>();
Assert.IsInstanceOf<FoobarPersister>(persister, "FoobarPersister was not properly registered as ISimplePersister<Foobar>");
}
Original comment by guillaum...@gmail.com
on 25 Nov 2013 at 9:57
Original comment by travis.illig
on 2 Dec 2013 at 11:46
Moved issue to GitHub: https://github.com/autofac/Autofac/issues/473
Subsequent issue management will be held there; closing the issue on Google
Code as "WontFix" because we will handle issue resolution on GitHub.
Original comment by travis.illig
on 11 Feb 2014 at 12:02
Original issue reported on code.google.com by
guillaum...@gmail.com
on 25 Nov 2013 at 9:50