PolicyList support for inherited policies

Feb 19, 2008 at 5:54 AM
Given the following:

public interface IBar { ... }
public interface IFoo
{
  IBar Bar { set; }
}
public class Foo : IFoo { ... }
public class LoggingFoo : IFoo { ... }

I want to be able to define the property setter policy on the IFoo interface, not explicitly on every single implementation of IFoo I'll ever have on my system.

As discussed before, I understand there could be a perf hit on having to walk the complete inheritance tree + interface mappings. However, being able to specify some sort of IPolicyResolver strategy could help. Or just emit IL :)

By attributes, having the atribute defined on the interface and having this attribute could help but it doesn't solve having to define this explictly when using config.

We might be able to do something where there is a strategy prior to the mapping that uses the IPropertyChooserPolicies (methods as well), cumulates the dependencies into a "transient dependencies" store and those + those of the concrete type are combined later on.

Mar 5, 2008 at 6:38 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.