View Full Version : use dynamic proxy on none interface implemented object
11-17-2005, 02:12 AM
Can I use dynamic proxy on none interface implemented objects in the current version? Spring use CGLib to do that, does .Net have the same tech? What's you plan to do this in the futher version?
11-17-2005, 09:16 AM
Not right now, but we will add support for that hopefully in 1.1 release, maybe in 1.2.
Basically, we will change AOP proxy builder to use inheritance instead of composition, which would allow you to proxy any type, with or without interface. Of course, if there is no interface, your target methods will have to be virtual so they can be overriden by the proxy class.
05-29-2006, 03:16 PM
because of this thread I know that it is impossible right now to proxy classes without implementing them an interface.
But in your nightly builds I could see the class InheritanceProxyBuilder without much Implementation.
What's the state of the art? Do you think of providing this feature in one of the next releases?
I myself reflected a bit about this topic and investigated your implementation. Your baseclass "BaseCompositionProxy" is quite comprehensive and provides all the functionality for doing the AOP stuff.
In composition-based proxying, you set this class as the base of the dynamic proxy class.
Isn't it an easy way to create an dynamic proxy class inheriting the target class plus getting assigned the methods, fields, properties,... of the BaseCompositionProxy via reflection?
Or do you have other ideas of solving the inheritance proxying in a nifty way?
Please let me know what are your current positions. Perhaps we can share our thoughts to get a satisfying solution.
08-11-2006, 12:10 AM
just a ping back to tell you that the latest nightly build allows AOP proxies on none interface implemented object.
Don't forget to declare methods you want to proxy as virtual.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.