From: hammett <ha...@uo...> - 2004-10-22 20:16:11
|
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.... |