Make some S.X.S types compatible with the SL API (for SDK)
authorSebastien Pouliot <sebastien@ximian.com>
Fri, 6 May 2011 12:02:21 +0000 (08:02 -0400)
committerSebastien Pouliot <sebastien@ximian.com>
Fri, 6 May 2011 12:40:41 +0000 (08:40 -0400)
commit4925054bb0a3ad5e297b3b50fb979a8d4ec08ec4
treecf9a3401851a1763f0a43cdce414ef55e40c48c5
parent314842bef5c944d44890f86cd6854e9e5df87f6d
Make some S.X.S types compatible with the SL API (for SDK)

* XmlAnyElementAttributes.cs:
* XmlArrayItemAttributes.cs:
* XmlElementAttributes.cs:
Under Silverlight API this implement IList only (does not
inherit from CollectionBase).

* XmlCustomFormatter.cs:
* XmlSerializationWriterInterpreter.cs:
Use a Convert.ChangeType override that exists in SL API

* XmlReflectionImporter.cs: Provide an alternative for (missing in SL)
Enum.GetNames and select available (in SL) overloads for parsing and
formatting for enums

* XmlSerializationReader.cs: Fix ToEnum API to use IDictionary (in SL)
instead of Hashtable (even if the SL4 docs still states the later)

* XmlSerializationReaderInterpreter.cs:
* XmlTypeMapping.cs:
Use the default (identical to nonPublic being false) when using
Activator.CreateInstance under SL

* XmlSerializationWriter.cs: Internally use a Queue<T> instead a a Queue
(not available in SL). Also Namespaces (ArrayList) is replaced by
XmlNamespaces (IList) in SL API.

* XmlSerializer.cs: Do not use environment variables in MOONLIGHT (like
the rest of MOBILE). Use Encoding.UTF8 instead of ENcoding.Default since
the later does not exist in SL.

* XmlSerializerImplementation.cs: SL version use IDictionary instead of
Hashtable for properties.

* XmlSerializerNamespaces.cs: Internally use a generic Dictionary
* instead
of a ListDictionary (which is not available in SL)
13 files changed:
mcs/class/System.XML/System.Xml.Serialization/XmlAnyElementAttributes.cs
mcs/class/System.XML/System.Xml.Serialization/XmlArrayItemAttributes.cs
mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlElementAttributes.cs
mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReader.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializerImplementation.cs
mcs/class/System.XML/System.Xml.Serialization/XmlSerializerNamespaces.cs
mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs