Sometimes I would like some of the other classes in the .Net reflection libraries to be derived from interfaces, since I have to do skin = and = wrap many of them when I write unit tests for code generating code.
For example, it would be nice if there was an IMethodInfo interface that was implemented in MethodInfo. Then I could write my FakeMethodInfo object for use in my unit tests.
The same thing applies to the type: I would like to create a FakeType class that has the same interface as Type, but does not include the CLR, and instead returns fake data provided by my unit test code.
source share