Closed GoogleCodeExporter closed 8 years ago
Hi - looks like you spotted a breaking change that I missed in the release
notes.
As far as I understand it, you need to register AutofacWebTypesModule for this
behavior to apply in the new version (this fixes a bug discovered in the 2.4
code.)
Alex will be able to confirm; if this is indeed the case I'll post some further
release notes.
Thanks very much for letting us know.
Nick
Original comment by nicholas...@gmail.com
on 15 Jul 2011 at 2:56
Hmm.. I already have the AutofacWebTypesModules registered as part of my
"MvcModule". Here is the full Load(ContainerBuilder builder) of my module.
protected override void Load(ContainerBuilder builder)
{
builder.RegisterModule(new AutofacWebTypesModule());
builder.RegisterSource(new ViewRegistrationSource());
builder.RegisterType<ExtensibleActionInvoker>()
.As<IActionInvoker>();
//.WithParameter("injectActionMethodParameters", true);
builder.RegisterControllers(_controllerAssembly)
.InjectActionInvoker()
.PropertiesAutowired()
.OnActivated(e =>
{
if (_onControllerActivication != null)
{
_onControllerActivication(e);
}
});
}
If I can provide any more information that will help, just let me know.
Original comment by techniq35
on 15 Jul 2011 at 3:07
Thanks for the extra information, I'll take a look ASAP.
Original comment by nicholas...@gmail.com
on 19 Jul 2011 at 11:25
Sorry for jumping in so late.
You should be able to use the new filter provider to perform property injection
on your attributes. I blogged about it at the link below but obviously didn’t
get around to updating the wiki.
http://alexmg.com/post/2011/03/24/FilterAttribute-Property-Injection-in-Autofac-
MVC-3-Integration.aspx
I'll add some information about this onto the wiki to help avoid confusion in
the future.
Original comment by alex.meyergleaves
on 2 Aug 2011 at 11:58
Thanks Alex
Original comment by techniq35
on 3 Aug 2011 at 2:37
Original issue reported on code.google.com by
techniq35
on 14 Jul 2011 at 3:40