I wonder if it's possible to configure StructureMap to handle proxy class instances as the underlying instance.
My problem is that the CMS I'm using (called Episerver) creates proxy instances of the classes I define, for example MyBlock
will be instantiated as a proxy with the type MyBlockProxy
. So even though I configure StructureMap to resolve IMyInterface<MyBlock>
it fails when I try to resolve an instance of IMyInterface<MyBlockProxy>
.
Episerver uses Castle DynamicProxy to generate the proxied instances.
Is it possible to configure StructureMap so that it resolves IMyInterface<MyBlockProxy>
in the same way as IMyInterface<MyBlock>
?