Переглянути джерело

2009-09-06 Atsushi Enomoto <[email protected]>

	* ContractDescriptionGenerator.cs : end method lookup should be
	  done against the type that defines begin method.

	* ClientProxyGenerator.cs : it missed end method argument on
	  generating end method proxy.


svn path=/trunk/mcs/; revision=141393
Atsushi Eno 16 роки тому
батько
коміт
0ed29e41ae

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

@@ -1,3 +1,8 @@
+2009-09-06  Atsushi Enomoto  <[email protected]>
+
+	* ContractDescriptionGenerator.cs : end method lookup should be
+	  done against the type that defines begin method.
+
 2009-09-01  Atsushi Enomoto  <[email protected]>
 
 	* MustUnderstandBehavior.cs : fix build.

+ 3 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs

@@ -168,9 +168,10 @@ namespace System.ServiceModel.Description
 				if (oca.AsyncPattern) {
 					if (String.Compare ("Begin", 0, mi.Name,0, 5) != 0)
 						throw new InvalidOperationException ("For async operation contract patterns, the initiator method name must start with 'Begin'.");
-					end = givenContractType.GetMethod ("End" + mi.Name.Substring (5));
+					string endName = "End" + mi.Name.Substring (5);
+					end = mi.DeclaringType.GetMethod (endName);
 					if (end == null)
-						throw new InvalidOperationException ("For async operation contract patterns, corresponding End method is required for each Begin method.");
+						throw new InvalidOperationException (String.Format ("'{0}' method is missing. For async operation contract patterns, corresponding End method is required for each Begin method.", endName));
 					if (GetOperationContractAttribute (end) != null)
 						throw new InvalidOperationException ("Async 'End' method must not have OperationContractAttribute. It is automatically treated as the EndMethod of the corresponding 'Begin' method.");
 				}

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

@@ -1,3 +1,8 @@
+2009-09-06  Atsushi Enomoto  <[email protected]>
+
+	* ClientProxyGenerator.cs : it missed end method argument on
+	  generating end method proxy.
+
 2009-09-04  Atsushi Enomoto  <[email protected]>
 
 	* ServiceHostBase.cs : URI trailing '/' can be added only when the

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

@@ -220,7 +220,7 @@ namespace System.ServiceModel
 			CodeVariableReference retValue = null;
 			if (mi.ReturnType == typeof (void))
 				// FIXME: pass appropriate argument.
-				b.Call (m.GetThis (), endProcessMethod, argOperName, paramsRef, asyncResultRef);
+				b.Call (m.GetThis (), endProcessMethod, argMethodInfo, argOperName, paramsRef, asyncResultRef);
 			else {
 				CodeVariableDeclaration retValueDecl = new CodeVariableDeclaration (mi.ReturnType, "retValue");
 				b.CurrentBlock.Add (retValueDecl);