Merge pull request #495 from nicolas-raoul/fix-for-issue2907-with-no-formatting-changes
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / XmlTypeMapping.cs
index 859042fd7e34d404f8bcc489a1cd91c5b3fc500a..2b0f8bd829d2768ed76993523618639fae3e1f0c 100644 (file)
@@ -405,6 +405,17 @@ namespace System.Xml.Serialization
                        if (_elements == null) return null;
                        return (XmlTypeMapElementInfo)_elements [BuildKey (name,ns, order)];
                }
+
+               public XmlTypeMapElementInfo GetElement(string name, string ns)
+               {
+                       if (_elements == null) return null;
+
+                       foreach (XmlTypeMapElementInfo info in _elements.Values)
+                               if (info.ElementName == name && info.Namespace == ns)
+                                       return info;
+
+                       return null;
+               }
                
                public XmlTypeMapElementInfo GetElement (int index)
                {