From: Mike D. <mik...@gm...> - 2004-10-22 21:07:57
|
Hi hammet. That's quick. I'll keep an eye out for any announcements about new code locations :) I'm coming at this from a completely naive perspective. I thought the DynamicProxy was just building a subclass of the class we are proxying. So I don't understand why "this.SomeProperty" would refer to the base class instead of the proxy class if "SomeProperty" was virtual and public/protected. I'll have to look at that some more. Thanks again! Mike On Fri, 22 Oct 2004 17:15:51 -0700, hammett <ha...@uo...> wrote: > Ok, both fixed. The protected/internal/interal protected were bugs.. :-( > I'm working on the serialization issues pointed by Henry and a small release > should be available on Aspect# CVS tonight. > > But although its possible to generate stubs for non-public methods, they > need to be accessed with a proxy pointer (the this reference is not > proxied). > Cglib handles is gracefully - only God knows how - but I think it will be > amazingly difficult to tackle. Ideas? > > > > -- > Cheers, > hammett > http://www.digitalcraftsmen.com.br/~hammett > > ----- Original Message ----- > From: "hammett" <ha...@uo...> > To: <asp...@li...> > Sent: Friday, October 22, 2004 4:34 PM > Subject: Re: [Aspectsharp-users] DynamicProxy > > > Hello Mike, > > > > We're currently moving our codebase from ASF, so expect a different > > namespace. I antecipate my apologies! :-) > > > > Well, the public constructor isnt a problem, really. I think the > > requirement came from our lazyness. > > > > protected ConstructorBuilder GenerateConstructor() > > { > > ConstructorBuilder consBuilder = m_typeBuilder.DefineConstructor( > > MethodAttributes.Public, > > CallingConventions.Standard, > > new Type[] {typeof (IInvocationHandler)}); > > > > ILGenerator ilGenerator = consBuilder.GetILGenerator(); > > ilGenerator.Emit(OpCodes.Ldarg_0); > > ilGenerator.Emit(OpCodes.Call, m_baseType.GetConstructor(new Type[0])); > > ilGenerator.Emit(OpCodes.Ldarg_0); > > ilGenerator.Emit(OpCodes.Ldarg_1); > > ilGenerator.Emit(OpCodes.Stfld, m_handlerField); > > ilGenerator.Emit(OpCodes.Ret); > > > > return consBuilder; > > } > > > > I'll change the baseType.GetConstructor to be smarter. > > About the protected methods, I'd better write a test case before I answer > > that, but should not be a problem.... > > ------------------------------------------------------- > 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 > |