A Wider Way of Type Registration and Injection

Jan 9, 2009 at 11:24 AM
I was looking at the Policy concept used for the Interception and I thought i should ask this about Injection:

I basically don't want to have to specify every single type and/or its interface for registration.
I want a way to say that I want "all types matching this pattern" to be registered. Period. These patterns could be very similar to the Interception Matching Rules.
Can I do that? Or do we need another layer of simplification on top of Unity (say Serenity or Liberty ... just joking)?
In a pseudo-code style, the configuration would look like:


new MemberNameMatchingRule("Do*", true))
new InjectionParameter(typeof(Transaction), new Transaction())
"All DAOs")
new AssemblyMatchingRule("MyDaoAssembly"))
new InjectionConstructor("Some Connection String"))
new InjectionProperty("Logger", someLogger));


Jan 13, 2009 at 2:54 AM
Refer to this thread... http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=43766

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.