From: Deyan P. <de...@ho...> - 2004-10-27 11:02:07
|
Hi, I have been playing with the new IInvocation, and I noticed that both properties IInvocation.Proxy and IInvocation.InvocationTarget are the same. What's there meaning, btw? What is bothering me is that there is no way to substitute the real object in the PreProcess method of my Interceptor, which is a part of the object lazy-loading process... I see that NHibernate also has this problem, as it retrieves the real object from the db and delegates (using runtime reflection) the calls to it. I would like to execute the methods on the real object without runtime reflection, which means that either I can substitte the real object (perhaps this is the IInvocation.InvocationTarget which has only a getter) - this I think is not possible, or populate the properties of the proxy from the db at runtime, and then take advantage of the Dynamic Proxy new calling infrastructure. Hammett, Mike, what do you think about this? Mike, don't you have a problem with the Method.Invoke on the real object(AvalonLazyInitializer.Invoke, the case when result==InvokeImplementation), which means that a lazy-loaded object always uses reflection (during it's whole lifetime) when a method/property is called on it? 10x and br, Deyan ----- Original Message ----- From: "hammett" <ha...@uo...> To: <asp...@li...> Sent: Tuesday, October 26, 2004 7:38 AM Subject: [Aspectsharp-users] Non-virtual methods again > Hello! > > I was thinking about it again, and now its safe to allow non-virtual methods > in the classes being proxied as just one instance will exist. The result is: > non-virtual methods wont be intercepted... > > What are your thoughts? > > -- > Cheers, > hammett > http://www.digitalcraftsmen.com.br/~hammett > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Aspectsharp-users mailing list > Asp...@li... > https://lists.sourceforge.net/lists/listinfo/aspectsharp-users > |