diff options
author | Joe Shaw <joeshaw@novell.com> | 2005-03-13 05:07:35 +0000 |
---|---|---|
committer | Joe Shaw <joeshaw@novell.com> | 2005-03-13 05:07:35 +0000 |
commit | 42287b94d1cee1d16a643efadd78dacffa911cad (patch) | |
tree | 4ad00d6a26b21bfbc226630cc673c8643c8c5680 /mono | |
parent | dfa00f175b304bee006534c78423245e934ae72f (diff) | |
download | dbus-42287b94d1cee1d16a643efadd78dacffa911cad.tar.gz |
2005-03-13 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildConstructor): Decalre a local
variable for storing our callback in. Update the allocation
comments.
Diffstat (limited to 'mono')
-rw-r--r-- | mono/ProxyBuilder.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mono/ProxyBuilder.cs b/mono/ProxyBuilder.cs index 8308823d..8d374ae0 100644 --- a/mono/ProxyBuilder.cs +++ b/mono/ProxyBuilder.cs @@ -412,6 +412,10 @@ namespace DBus CallingConventions.Standard, pars); ILGenerator generator = constructor.GetILGenerator(); + + LocalBuilder handlerL = generator.DeclareLocal (typeof (Service.SignalCalledHandler)); + handlerL.SetLocalSymInfo ("handler"); + generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Call, this.introspector.Constructor); //generator.EmitWriteLine("service = myService"); @@ -422,17 +426,19 @@ namespace DBus generator.Emit(OpCodes.Ldarg_2); generator.Emit(OpCodes.Stfld, pathF); - //generator.EmitWriteLine("this.delegate_created = new Service.SignalCalledHandler(Service_SignalCalled)"); + //generator.EmitWriteLine("handler = new Service.SignalCalledHandler(Service_SignalCalled)"); generator.Emit(OpCodes.Ldarg_1); generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldftn, signalCalledMI); generator.Emit(OpCodes.Newobj, Service_SignalCalledHandlerC); generator.Emit(OpCodes.Stloc_0); + + //generator.EmitWriteLine("this.delegate_created = handler"); generator.Emit(OpCodes.Ldarg_0); generator.Emit(OpCodes.Ldloc_0); generator.Emit(OpCodes.Stfld, deleF); - //generator.EmitWriteLine("myService.SignalCalled += this.delegate_created"); + //generator.EmitWriteLine("myService.SignalCalled += handler"); generator.Emit(OpCodes.Ldloc_0); generator.EmitCall(OpCodes.Callvirt, Service_AddSignalCalledMI, null); @@ -469,7 +475,7 @@ namespace DBus // because that is always going to be a nop, lets just ignore that here. // If you are trying to find the right code, look at what mcs does ;-). - MethodBuilder mb = tb.DefineMethod("Finalize", + MethodBuilder mb = tb.DefineMethod("Finalize", MethodAttributes.Family | MethodAttributes.HideBySig | MethodAttributes.Virtual, @@ -571,7 +577,7 @@ namespace DBus // monodis. Note that in order for this to work you should copy // the client assembly as a dll file so that monodis can pick it // up. - //Service.ProxyAssembly.Save("proxy.dll"); + //Service.ProxyAssembly.Save(Service.Name + ".proxy.dll"); } Type [] parTypes = new Type[] {typeof(Service), typeof(string)}; |