Author: roeie
Date: 2007-10-07 11:48:48 -0400 (Sun, 07 Oct 2007)
New Revision: 87053

Modified:
   
branches/mainsoft/gh1.7/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
Log:
bug 9134

Modified: 
branches/mainsoft/gh1.7/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
===================================================================
--- 
branches/mainsoft/gh1.7/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
       2007-10-07 15:21:06 UTC (rev 87052)
+++ 
branches/mainsoft/gh1.7/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapTypeMapper.cs
       2007-10-07 15:48:48 UTC (rev 87053)
@@ -194,7 +194,8 @@
                                out typeNamespace, 
                                out assemblyName);
 
-                       string typeName = typeNamespace + Type.Delimiter + 
localName;
+                       string typeName = (typeNamespace == null || 
typeNamespace == "" ) ? 
+                                                               localName : 
typeNamespace + Type.Delimiter + localName;
 
                        if(assemblyName != null && assemblyName != string.Empty 
&& _binder != null) 
                        {
@@ -206,25 +207,20 @@
                                if(assemblyQualifiedName != null)
                                        type = 
Type.GetType(assemblyQualifiedName);
                                else
-                               {
-                                       type = Type.GetType(xmlName);
+                               {                                       
+                                       type = Type.GetType(typeName);
                                        if(type == null) 
-                                       { 
+                                       {
 
-                                               type = Type.GetType(typeName);
-                                               if(type == null) 
-                                               {
-
-                                                       if(assemblyName == null 
|| assemblyName == String.Empty)
-                                                               throw new 
SerializationException(
-                                                                       
String.Format("Parse Error, no assembly associated with XML key {0} {1}", 
-                                                                       
localName, 
-                                                                       
namespaceURI));
-                                                       type = 
FormatterServices.GetTypeFromAssembly(
-                                                               
Assembly.Load(assemblyName), 
-                                                               typeName);
-                                               }
-                                       }
+                                               if(assemblyName == null || 
assemblyName == String.Empty)
+                                                       throw new 
SerializationException(
+                                                               
String.Format("Parse Error, no assembly associated with XML key {0} {1}", 
+                                                               localName, 
+                                                               namespaceURI));
+                                               type = 
FormatterServices.GetTypeFromAssembly(
+                                                       
Assembly.Load(assemblyName), 
+                                                       typeName);
+                                       }                                       
                                }
                                if(type == null)
                                        throw new SerializationException();

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

Reply via email to