Hi,
I'm using Castle Windsor as part of a more specialized framework. One of the requirement that popped up is to be able to select the implementations to use when resolving a service based on attributes specified on the service.
For example, let say:
public class MyService
{
public MyService([Selector("Bar")]SomeDependency foo){......}
}
Then i would want to, inside an ISubDependencyResolver, to get the SelectorAttribute, get its value, and resolve accordingly.
We already do this, but with attributes on the type itself (let say an attribute on SomeDependency's definition). Thats easy since you have a reference to the type. I am, however, having issues finding out how to get a reference to the parameter/property currently being resolved, which would let me fetch that attribute.
Anyone care to share some insight?
Thanks!