Andrés,

That's a bug. DP is confused about the two proxy types you create (with and without target) and it wants to reuse the first one in the second case which fails. This is fixed now.

As a workaround if you need to create both, standard class proxies and class proxies with target use two separate proxyGenerators for that.

This is fixed now in the trunk: http://issues.castleproject.org/issue/DYNPROXY-158

Thanks for reporting this.
cheers,
Krzysztof

On 09/04/2011 5:52 AM, [email protected] wrote:
Hi,

I'm trying to learn how to use the dynamic proxy, and when making a simple example code I ran into a problem when using the method "CreateClassProxyWithTarget". I'm trying to wrap an existing instance into a proxy and I get the following exception: "Could not find a parameterless constructor". Thing is the target type does have a parameterless public constructor.

Code attached.

Thanks for any help you can give me.

--
Andrés Blanco Morales
--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Castle 
Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to