Przeglądaj źródła

2009-01-19 Atsushi Enomoto <[email protected]>

        * ClientProxyGenerator.cs : fix reflection-based GetConstructor()
          so that it can work in 2.1 profile (.ctor is made internal).

        * CodeModule.cs : use DefineDynamicModule() which is avaiable in 2.1.


svn path=/trunk/mcs/; revision=123773
Atsushi Eno 17 lat temu
rodzic
commit
78ca831e99

+ 4 - 0
mcs/class/System.ServiceModel/Mono.CodeGeneration/ChangeLog

@@ -1,3 +1,7 @@
+2009-01-19  Atsushi Enomoto  <[email protected]>
+
+	* CodeModule.cs : use DefineDynamicModule() which is avaiable in 2.1.
+
 2008-07-05  Eyal Alaluf <[email protected]>
 
 	* CodeGenerationHelper.cs: Correctly handle enum underlying types.

+ 1 - 1
mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs

@@ -40,7 +40,7 @@ namespace Mono.CodeGeneration
 			AssemblyName myAsmName = new AssemblyName();
 			myAsmName.Name = name;
 			AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly (myAsmName, AssemblyBuilderAccess.RunAndSave);
-			module = myAsmBuilder.DefineDynamicModule (name, name + ".dll");
+			module = myAsmBuilder.DefineDynamicModule (name);
 		}
 		
 		public static CodeModule Shared

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog

@@ -1,3 +1,8 @@
+2009-01-19  Atsushi Enomoto  <[email protected]>
+
+	* ClientProxyGenerator.cs : fix reflection-based GetConstructor()
+	  so that it can work in 2.1 profile (.ctor is made internal).
+
 2009-01-14  Atsushi Enomoto  <[email protected]>
 
 	* ServerTooBusyException.cs, CommunicationObjectAbortedException.cs,

+ 2 - 1
mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs

@@ -60,7 +60,8 @@ namespace System.ServiceModel
 			CodeMethod ctor = c.CreateConstructor (
 				MethodAttributes.Public, ctorargs);
 			CodeBuilder b = ctor.CodeBuilder;
-			MethodBase baseCtor = typeof (ClientRuntimeChannel).GetConstructor (ctorargs);
+			MethodBase baseCtor = typeof (ClientRuntimeChannel).GetConstructors (
+				BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance) [0];
 			if (baseCtor == null) throw new Exception ("INTERNAL ERROR: ClientRuntimeChannel#.ctor(ClientRuntime,ChannelFactory) does not exist.");
 			b.Call (
 				ctor.GetThis (),