Author: kostat
Date: 2007-08-01 03:43:28 -0400 (Wed, 01 Aug 2007)
New Revision: 83152

Modified:
   
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
Log:
add support for ScriptMethodAttribute.XmlSerializeString

Modified: 
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
===================================================================
--- 
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
 2007-08-01 07:27:41 UTC (rev 83151)
+++ 
trunk/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
 2007-08-01 07:43:28 UTC (rev 83152)
@@ -76,8 +76,11 @@
                                }
 
                                if (ScriptMethod.ResponseFormat == 
ResponseFormat.Xml
-                                       && MethodInfo.ReturnType != 
typeof(void))
-                                       _xmlSer = new XmlSerializer 
(MethodInfo.ReturnType);
+                                       && MethodInfo.ReturnType != typeof 
(void)) {
+                                       Type retType = MethodInfo.ReturnType;
+                                       if (Type.GetTypeCode (retType) != 
TypeCode.String || ScriptMethod.XmlSerializeString)
+                                               _xmlSer = new XmlSerializer 
(retType);
+                               }
                        }
 
                        public void Invoke (IDictionary<string, object> 
@params, TextWriter writer) {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to