DynamicProxy - Namespace of generated proxy

17 views
Skip to first unread message

Marco Amendola

unread,
Jun 29, 2009, 5:13:14 AM6/29/09
to Castle Project Users
Is there a way to set the namespace of the generated proxy class? By
default, a semi-random class name and a *null* namespace is given to
generated proxy class.
I'm aware that it should not be an issue when working correctly with
polymorphism, *but* I faced with this WPF bug and I'm tryng to work
around it:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=422093

Much thanks in advance to those who would reply.
Marco

Krzysztof Koźmic

unread,
Jun 29, 2009, 10:21:53 AM6/29/09
to castle-pro...@googlegroups.com
There is no way to set it.

Do you need to set it or do you need it to just be set to something
other than no namespace?

Krzysztof

Marco Amendola pisze:

Marco Amendola

unread,
Jun 29, 2009, 12:40:32 PM6/29/09
to Castle Project Users
Setting the namespace to something different from null would be enough
to avoid the WPF bug.
It should also prevent the same kind of bugs in code making the
assumption that namespace is *always* a non null string.
It was indeed surprising for me (even if perfectly valid) to see a
class with null namespace.

Thank you very much for the quick reply.
Marco

Krzysztof Koźmic

unread,
Jun 29, 2009, 12:50:16 PM6/29/09
to castle-pro...@googlegroups.com
OK, cool.

Please add the issue to donjon then.

Krzysztof

Marco Amendola pisze:

Marco Amendola

unread,
Jun 29, 2009, 1:23:34 PM6/29/09
to Castle Project Users
Added as improvement with key DYNPROXY-ISSUE-99

Thanks for your help,
Marco

Krzysztof Koźmic

unread,
Jun 29, 2009, 5:42:49 PM6/29/09
to Castle Project Users
Fixed in the trunk. Proxies are now in namespace Castle.Proxies

Marco Amendola

unread,
Jun 29, 2009, 6:17:46 PM6/29/09
to Castle Project Users
Thank you again for the super quick fix. I'm going to make an
integration test shortly.

Krzysztof Koźmic

unread,
Jun 29, 2009, 6:22:20 PM6/29/09
to castle-pro...@googlegroups.com
Sure, no problem.

If you have any other issues, pain points, or cool ideas, do not
hesitate to share them with us :)
BTW, we're currently planning version 3.0 and we're going to look into
some things specifically for WPF databinding:
take a look at this wiki article:
http://using.castleproject.org/display/CASTLE/Dynamic+Proxy+3+design+meeting

Krzysztof

Marco Amendola pisze:
Message has been deleted

Marco Amendola

unread,
Jun 29, 2009, 7:17:00 PM6/29/09
to Castle Project Users
I just read the article, I found quite interesting the Type Builders
and Type Wrapping ideas.
The problem I'm trying to solve with DynamicProxy is the same you
outlined in the last paragraph, but at the moment I'm only adding
INotifyPropertyChanged implementation (with cross-dependancy support)
to hand-written classes.
I will not miss to report scenarios that could be conveniently
covered
which a proxy approach.

Marco
Reply all
Reply to author
Forward
0 new messages