2
Vote

ProxyTypeBuilder does not honour implemented interfaces

description

The ProxyTypeBuilder class will not honour any existing interface implementations on a subject type. For example, if type SubjectType implements ICollection<int>, the generated interface ISubjectType and proxy type SubjectTypeProxy will not implement ICollection<int>. As a result, it is no longer possible to pass an instance of ISubjectType to a function that accepts ICollection<int>, where as it would have been possible by passing SubjectType directly.

This functionality should be preserved.

No files are attached

comments

SteveGuidi wrote Oct 27 2010 at 5:23 AM

I believe the InterfaceMap type will help solve this problem.

Currently I am tinkering with an use cases and trying to avoid ordering issues like adding methods to a ProxyTypeBuilder, then specifying that the proxy type implements an interface -- in this case, I may have to revist all added methods and map them correctly.

SteveGuidi wrote Oct 27 2008 at 4:19 PM

Postponed. See http://joltdev.blogspot.com/2008/10/interface-implementations-revisited.html for more information.