Using Castle DynamicProxy is it possible to change the invocation target on class proxy?

Posted by Gareth D on Stack Overflow See other posts from Stack Overflow or by Gareth D
Published on 2010-04-23T07:41:21Z Indexed on 2010/04/23 7:43 UTC
Read the original article Hit count: 344

Filed under:

Hi

Using Castle DynamicProxy v2, I'd like to change the target of an invocation for a class proxy. The new target is simply a different instance of the same type as the original target. The target types do not implement a common interface so I cannot use the IProxyTargetAccessor as detailed in Krzysztof's post on the subject - I cannot cast from a class proxy invocator to a IProxyTargetAccessor.

Is there a way to do this?

© Stack Overflow or respective owner

Related posts about castle-dynamicproxy