Kill MOONLIGHT from System.Xml.
[mono.git] / mcs / class / System.XML / System.Xml.Serialization / XmlSerializationReaderInterpreter.cs
index c93325c2391c421eb4c0cf54ff1424ef35a93ffe..b1d06576b97f1ab1e88277a0241986971878cc27 100644 (file)
@@ -94,9 +94,6 @@ namespace System.Xml.Serialization
 
                object ReadEncodedObject (XmlTypeMapping typeMap)
                {
-#if MOONLIGHT
-                       throw new NotSupportedException ();
-#else
                        object ob = null;
                        Reader.MoveToContent();
                        if (Reader.NodeType == System.Xml.XmlNodeType.Element) 
@@ -111,14 +108,10 @@ namespace System.Xml.Serialization
 
                        ReadReferencedElements();
                        return ob;
-#endif
                }
 
                protected virtual object ReadMessage (XmlMembersMapping typeMap)
                {
-#if MOONLIGHT
-                       throw new NotSupportedException ();
-#else
                        object[] parameters = new object[typeMap.Count];
 
                        if (typeMap.HasWrapperElement)
@@ -175,7 +168,6 @@ namespace System.Xml.Serialization
                                ReadReferencedElements();
 
                        return parameters;
-#endif
                }
 
                object ReadRoot (XmlTypeMapping rootMap)
@@ -279,7 +271,6 @@ namespace System.Xml.Serialization
                                                        nss.Add ("", Reader.Value);
                                        }
                                }       
-#if !MOONLIGHT
                                else if (anyAttrMember != null) 
                                {
                                        XmlAttribute attr = (XmlAttribute) Document.ReadNode(Reader);
@@ -288,16 +279,13 @@ namespace System.Xml.Serialization
                                }
                                else
                                        ProcessUnknownAttribute(ob);
-#endif
                        }
 
-#if !MOONLIGHT
                        if (anyAttrMember != null)
                        {
                                anyAttributeArray = ShrinkArray ((Array)anyAttributeArray, anyAttributeIndex, anyAttrMember.TypeData.Type.GetElementType(), true);
                                SetMemberValue (anyAttrMember, ob, anyAttributeArray, isValueList);
                        }
-#endif
                        Reader.MoveToElement ();
                }
 
@@ -522,10 +510,8 @@ namespace System.Xml.Serialization
                                                        SetMemberValue (mem, ob, GetValueFromXmlString (Reader.ReadString(), info.TypeData, info.MappedType), isValueList);
                                        }
                                }
-#if !MOONLIGHT
                                else 
                                        UnknownNode(ob);
-#endif
                                Reader.MoveToContent();
                        }
 
@@ -764,11 +750,7 @@ namespace System.Xml.Serialization
 
                static object CreateInstance (Type type, bool nonPublic)
                {
-#if MOONLIGHT
-                       return Activator.CreateInstance (type); // always false
-#else
                        return Activator.CreateInstance (type, nonPublic);
-#endif
                }
 
                object CreateInstance (Type type)
@@ -817,14 +799,10 @@ namespace System.Xml.Serialization
                
                object ReadXmlNode (TypeData type, bool wrapped)
                {
-#if MOONLIGHT
-                       throw new NotSupportedException ();
-#else
                        if (type.Type == typeof (XmlDocument))
                                return ReadXmlDocument (wrapped);
                        else
                                return ReadXmlNode (wrapped);
-#endif
                }
 
                object ReadPrimitiveElement (XmlTypeMapping typeMap, bool isNullable)