InjectionFactory in XML

Feb 7, 2013 at 6:44 AM
How (and whether it is possible at all) to write in XML config file using InjectionFactory?
Like the code:
diContainer.RegisterType<WebSiteDBContext>(new InjectionFactory(x => HttpContext.Current.Items["DBSession"] as WebSiteDBContext));
Feb 7, 2013 at 7:35 AM
Edited Feb 7, 2013 at 7:42 AM
You can't. Chris Tavares answered that question on StackOverflow a while ago.

That feature is on the wishlist for Unity 3.0 and you can vote for it.