dbus/mono ProxyBuilder.cs, 1.5.2.3, 1.5.2.4 Service.cs, 1.7.2.4, 1.7.2.5

Joe Shaw joe at freedesktop.org
Sat Mar 12 21:06:16 PST 2005


Update of /cvs/dbus/dbus/mono
In directory gabe:/tmp/cvs-serv21818/mono

Modified Files:
      Tag: dbus-0-23
	ProxyBuilder.cs Service.cs 
Log Message:
2005-03-13  Joe Shaw  <joeshaw at novell.com>

	* mono/ProxyBuilder.cs (BuildConstructor): Decalre a local
	variable for storing our callback in.  Update the allocation
	comments.

	* mono/Service.cs (Module): Revert some accidentally
	committed code.

Index: ProxyBuilder.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/ProxyBuilder.cs,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -d -r1.5.2.3 -r1.5.2.4
--- ProxyBuilder.cs	13 Mar 2005 02:04:49 -0000	1.5.2.3
+++ ProxyBuilder.cs	13 Mar 2005 05:06:14 -0000	1.5.2.4
@@ -412,6 +412,10 @@
 							       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 @@
       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 @@
        // 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 @@
 	// 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)};

Index: Service.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/Service.cs,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -d -r1.7.2.4 -r1.7.2.5
--- Service.cs	11 Mar 2005 18:15:25 -0000	1.7.2.4
+++ Service.cs	13 Mar 2005 05:06:14 -0000	1.7.2.5
@@ -167,10 +167,7 @@
     {
       get {
 	if (this.module == null) {
-          this.module = ProxyAssembly.GetDynamicModule (Name);
-
-          if (this.module == null)
-	    this.module = ProxyAssembly.DefineDynamicModule (Name, true);
+          this.module = ProxyAssembly.DefineDynamicModule (Name, Name + ".proxy.dll", true);
 	}
 	
 	return this.module;



More information about the dbus-commit mailing list