Ver Fonte

2005-09-22 Atsushi Enomoto <[email protected]>

	new files for new xmlserializer.


svn path=/trunk/mcs/; revision=50510
Atsushi Eno há 20 anos atrás
pai
commit
fe9bd14c8f
42 ficheiros alterados com 1740 adições e 0 exclusões
  1. 59 0
      mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
  2. 4 0
      mcs/class/System.ServiceModel/Assembly/ChangeLog
  3. 5 0
      mcs/class/System.ServiceModel/ChangeLog
  4. 23 0
      mcs/class/System.ServiceModel/Makefile
  5. 41 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization.dll.sources
  6. 25 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/CollectionDataContractAttribute.cs
  7. 25 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/ContractNamespaceAttribute.cs
  8. 25 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/DataContractAttribute.cs
  9. 32 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/DataMemberAttribute.cs
  10. 21 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/ExportOptions.cs
  11. 31 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/IDataContractSurrogate.cs
  12. 7 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/IUnknownSerializationData.cs
  13. 58 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/ImportOptions.cs
  14. 30 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/InvalidDataContractException.cs
  15. 28 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/KnownTypeAttribute.cs
  16. 32 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/KnownTypeCollection.cs
  17. 13 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/SerializationFactoryMethodAttribute.cs
  18. 8 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/SerializationMode.cs
  19. 15 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/UnknownSerializationData.cs
  20. 123 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/XmlFormatter.cs
  21. 34 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/XmlSerializableServices.cs
  22. 87 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/XsdDataContractExporter.cs
  23. 92 0
      mcs/class/System.ServiceModel/System.Runtime.Serialization/XsdDataContractImporter.cs
  24. 23 0
      mcs/class/System.ServiceModel/System.Xml/IXmlBinaryReaderInitializer.cs
  25. 13 0
      mcs/class/System.ServiceModel/System.Xml/IXmlBinaryWriterInitializer.cs
  26. 10 0
      mcs/class/System.ServiceModel/System.Xml/IXmlDictionary.cs
  27. 17 0
      mcs/class/System.ServiceModel/System.Xml/IXmlMtomReaderInitializer.cs
  28. 13 0
      mcs/class/System.ServiceModel/System.Xml/IXmlMtomWriterInitializer.cs
  29. 13 0
      mcs/class/System.ServiceModel/System.Xml/IXmlUTF8ReaderInitializer.cs
  30. 10 0
      mcs/class/System.ServiceModel/System.Xml/IXmlUTF8WriterInitializer.cs
  31. 5 0
      mcs/class/System.ServiceModel/System.Xml/OnXmlDictionaryReaderClose.cs
  32. 101 0
      mcs/class/System.ServiceModel/System.Xml/UniqueId.cs
  33. 40 0
      mcs/class/System.ServiceModel/System.Xml/XmlBinaryReaderSession.cs
  34. 33 0
      mcs/class/System.ServiceModel/System.Xml/XmlBinaryWriterSession.cs
  35. 144 0
      mcs/class/System.ServiceModel/System.Xml/XmlC14NWriter.cs
  36. 61 0
      mcs/class/System.ServiceModel/System.Xml/XmlCanonicalWriter.cs
  37. 58 0
      mcs/class/System.ServiceModel/System.Xml/XmlDictionary.cs
  38. 111 0
      mcs/class/System.ServiceModel/System.Xml/XmlDictionaryReader.cs
  39. 62 0
      mcs/class/System.ServiceModel/System.Xml/XmlDictionaryReaderQuotas.cs
  40. 38 0
      mcs/class/System.ServiceModel/System.Xml/XmlDictionaryString.cs
  41. 161 0
      mcs/class/System.ServiceModel/System.Xml/XmlDictionaryWriter.cs
  42. 9 0
      mcs/class/System.ServiceModel/System.Xml/XmlShimWriter.cs

+ 59 - 0
mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs

@@ -0,0 +1,59 @@
+//
+// AssemblyInfo.cs
+//
+// Author:
+//   Andreas Nahr ([email protected])
+//
+// (C) 2003 Ximian, Inc.  http://www.ximian.com
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the System.Runtime.Serialization assembly
+
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+
+[assembly: AssemblyTitle ("System.Runtime.Serialization.dll")]
+[assembly: AssemblyDescription ("System.Runtime.Serialization.dll")]
+[assembly: AssemblyConfiguration ("Development version")]
+[assembly: AssemblyCompany ("MONO development team")]
+[assembly: AssemblyProduct ("MONO CLI")]
+[assembly: AssemblyCopyright ("(c) 2003 Various Authors")]
+[assembly: AssemblyTrademark ("")]
+
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.dll")]
+[assembly: AssemblyInformationalVersion ("0.0.0.1")]
+[assembly: NeutralResourcesLanguage ("en-US")]
+
+[assembly: ComVisible (false)]
+
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile("../msfinal.pub")]

+ 4 - 0
mcs/class/System.ServiceModel/Assembly/ChangeLog

@@ -0,0 +1,4 @@
+2005-09-22  Atsushi Enomoto  <[email protected]>
+
+	* AssemblyInfo.cs : new file.
+

+ 5 - 0
mcs/class/System.ServiceModel/ChangeLog

@@ -0,0 +1,5 @@
+2005-09-22  Atsushi Enomoto  <[email protected]>
+
+	* Makefile,
+	  System.Runtime.Serialization.dll.sources : new files.
+

+ 23 - 0
mcs/class/System.ServiceModel/Makefile

@@ -0,0 +1,23 @@
+thisdir = class/System.Runtime.Serialization
+SUBDIRS = 
+include ../../build/rules.make
+
+LIBRARY = System.Runtime.Serialization.dll
+LIB_MCS_FLAGS = \
+	        /r:System.dll \
+	        /r:System.Xml.dll
+
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+
+EXTRA_DISTFILES =
+
+# This is a WinFX only assembly
+VALID_PROFILE := $(filter net_2_0 net_3_0, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.Runtime.Serialization.dll
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+NO_TEST = yes
+endif
+
+include ../../build/library.make

+ 41 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization.dll.sources

@@ -0,0 +1,41 @@
+Assembly/AssemblyInfo.cs
+../../build/common/MonoTODOAttribute.cs
+../../build/common/Consts.cs
+../../build/common/Locale.cs
+System.Runtime.Serialization/CollectionDataContractAttribute.cs
+System.Runtime.Serialization/ContractNamespaceAttribute.cs
+System.Runtime.Serialization/DataContractAttribute.cs
+System.Runtime.Serialization/DataMemberAttribute.cs
+System.Runtime.Serialization/ExportOptions.cs
+System.Runtime.Serialization/IDataContractSurrogate.cs
+System.Runtime.Serialization/InvalidDataContractException.cs
+System.Runtime.Serialization/IUnknownSerializationData.cs
+System.Runtime.Serialization/ImportOptions.cs
+System.Runtime.Serialization/KnownTypeAttribute.cs
+System.Runtime.Serialization/KnownTypeCollection.cs
+System.Runtime.Serialization/SerializationFactoryMethodAttribute.cs
+System.Runtime.Serialization/SerializationMode.cs
+System.Runtime.Serialization/UnknownSerializationData.cs
+System.Runtime.Serialization/XmlFormatter.cs
+System.Runtime.Serialization/XmlSerializableServices.cs
+System.Runtime.Serialization/XsdDataContractExporter.cs
+System.Runtime.Serialization/XsdDataContractImporter.cs
+System.Xml/IXmlBinaryReaderInitializer.cs
+System.Xml/IXmlBinaryWriterInitializer.cs
+System.Xml/IXmlDictionary.cs
+System.Xml/IXmlMtomReaderInitializer.cs
+System.Xml/IXmlMtomWriterInitializer.cs
+System.Xml/IXmlUTF8ReaderInitializer.cs
+System.Xml/IXmlUTF8WriterInitializer.cs
+System.Xml/OnXmlDictionaryReaderClose.cs
+System.Xml/UniqueId.cs
+System.Xml/XmlBinaryReaderSession.cs
+System.Xml/XmlBinaryWriterSession.cs
+System.Xml/XmlC14NWriter.cs
+System.Xml/XmlCanonicalWriter.cs
+System.Xml/XmlDictionary.cs
+System.Xml/XmlDictionaryReader.cs
+System.Xml/XmlDictionaryReaderQuotas.cs
+System.Xml/XmlDictionaryString.cs
+System.Xml/XmlDictionaryWriter.cs
+System.Xml/XmlShimWriter.cs

+ 25 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/CollectionDataContractAttribute.cs

@@ -0,0 +1,25 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct, 
+		Inherited = false, AllowMultiple = false)]
+	public sealed class CollectionDataContractAttribute : Attribute
+	{
+		string name, ns;
+
+		public CollectionDataContractAttribute ()
+		{
+		}
+
+		public string Name {
+			get { return name; }
+			set { name = value; }
+		}
+
+		public string Namespace {
+			get { return ns; }
+			set { ns = value; }
+		}
+	}
+}

+ 25 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/ContractNamespaceAttribute.cs

@@ -0,0 +1,25 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module,
+		Inherited = false, AllowMultiple = true)]
+	public sealed class ContractNamespaceAttribute : Attribute
+	{
+		string clrNS, contractNS;
+
+		public ContractNamespaceAttribute ()
+		{
+		}
+
+		public string ClrNamespace {
+			get { return clrNS; }
+			set { clrNS = value; }
+		}
+
+		public string ContractNamespace {
+			get { return contractNS; }
+			set { contractNS = value; }
+		}
+	}
+}

+ 25 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/DataContractAttribute.cs

@@ -0,0 +1,25 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, 
+		Inherited = false, AllowMultiple = false)]
+	public sealed class DataContractAttribute : Attribute
+	{
+		string name, ns;
+
+		public DataContractAttribute ()
+		{
+		}
+
+		public string Name {
+			get { return name; }
+			set { name = value; }
+		}
+
+		public string Namespace {
+			get { return ns; }
+			set { ns = value; }
+		}
+	}
+}

+ 32 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/DataMemberAttribute.cs

@@ -0,0 +1,32 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Property | AttributeTargets.Field,
+		Inherited = false, AllowMultiple = false)]
+	public sealed class DataMemberAttribute : Attribute
+	{
+		bool isRequired;
+		string name;
+		int order;
+
+		public DataMemberAttribute ()
+		{
+		}
+
+		public bool IsRequired {
+			get { return isRequired; }
+			set { isRequired = value; }
+		}
+
+		public string Name {
+			get { return name; }
+			set { name = value; }
+		}
+
+		public int Order {
+			get { return order; }
+			set { order = value; }
+		}
+	}
+}

+ 21 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/ExportOptions.cs

@@ -0,0 +1,21 @@
+namespace System.Runtime.Serialization
+{
+	public class ExportOptions
+	{
+		IDataContractSurrogate surrogate;
+		KnownTypeCollection knownTypes;
+
+		public ExportOptions ()
+		{
+		}
+
+		public IDataContractSurrogate DataContractSurrogate {
+			get { return surrogate; }
+			set { surrogate = value; }
+		}
+
+		public KnownTypeCollection KnownTypes {
+			get { return knownTypes; }
+		}
+	}
+}

+ 31 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/IDataContractSurrogate.cs

@@ -0,0 +1,31 @@
+using System;
+using System.CodeDom;
+using System.Reflection;
+
+namespace System.Runtime.Serialization
+{
+	public interface IDataContractSurrogate
+	{
+		object GetCustomDataToExport (MemberInfo memberInfo,
+			Type dataContractType);
+		object GetCustomDataToExport (Type clrType,
+			Type dataContractType);
+
+		Type GetDataContractType (Type type);
+
+		object GetDeserializedObject (object obj, Type targetType);
+
+		void GetKnownCustomDataTypes (
+			KnownTypeCollection customDataTypes);
+
+		object GetObjectToSerialize (object obj, Type targetType);
+
+		Type GetReferencedTypeOnImport (string typeName,
+			string typeNamespace, object customData);
+
+		CodeTypeDeclaration ProcessImportedType (
+			CodeTypeDeclaration typeDeclaration,
+			CodeCompileUnit compileUnit);
+
+	}
+}

+ 7 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/IUnknownSerializationData.cs

@@ -0,0 +1,7 @@
+namespace System.Runtime.Serialization
+{
+	public interface IUnknownSerializationData
+	{
+		UnknownSerializationData UnknownData { get; set; }
+	}
+}

+ 58 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/ImportOptions.cs

@@ -0,0 +1,58 @@
+using System.Collections.Generic;
+
+namespace System.Runtime.Serialization
+{
+	public class ImportOptions
+	{
+		IDataContractSurrogate surrogate;
+		ICollection<Type> referencedCollectionTypes = new List<Type> ();
+		ICollection<Type> referencedTypes = new List<Type> ();
+		bool enableDataBinding;
+		bool generateInternal;
+		bool generateSerializable;
+		bool importXmlType;
+		IDictionary<string, string> namespaces =
+			new Dictionary<string, string> ();
+
+		public ImportOptions ()
+		{
+		}
+
+		public IDataContractSurrogate DataContractSurrogate {
+			get { return surrogate; }
+			set { surrogate = value; }
+		}
+
+		public bool EnableDataBinding {
+			get { return enableDataBinding; }
+			set { enableDataBinding = value; }
+		}
+
+		public bool GenerateInternal {
+			get { return generateInternal; }
+			set { generateInternal = value; }
+		}
+
+		public bool GenerateSerializable {
+			get { return generateSerializable; }
+			set { generateSerializable = value; }
+		}
+
+		public bool ImportXmlType {
+			get { return importXmlType; }
+			set { importXmlType = value; }
+		}
+
+		public IDictionary<string, string> Namespaces {
+			get { return namespaces; }
+		}
+
+		public ICollection<Type> ReferencedCollectionTypes {
+			get { return referencedCollectionTypes; }
+		}
+
+		public ICollection<Type> ReferencedTypes {
+			get { return referencedTypes; }
+		}
+	}
+}

+ 30 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/InvalidDataContractException.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Xml;
+
+namespace System.Runtime.Serialization
+{
+	[Serializable]
+	public class InvalidDataContractException : SerializationException
+	{
+		public InvalidDataContractException ()
+			: base ()
+		{
+		}
+
+		public InvalidDataContractException (string message)
+			: base (message)
+		{
+		}
+
+		public InvalidDataContractException (SerializationInfo info,
+			StreamingContext context)
+			: base (info, context)
+		{
+		}
+
+		public InvalidDataContractException (string message, Exception innerException)
+			: base (message, innerException)
+		{
+		}
+	}
+}

+ 28 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/KnownTypeAttribute.cs

@@ -0,0 +1,28 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field,
+		Inherited = false, AllowMultiple = true)]
+	public sealed class KnownTypeAttribute : Attribute
+	{
+		string methodName;
+		Type type;
+
+		public KnownTypeAttribute (string methodName)
+		{
+		}
+
+		public KnownTypeAttribute (Type type)
+		{
+		}
+
+		public string MethodName {
+			get { return methodName; }
+		}
+
+		public Type Type {
+			get { return type; }
+		}
+	}
+}

+ 32 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/KnownTypeCollection.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.ObjectModel;
+
+namespace System.Runtime.Serialization
+{
+	public sealed class KnownTypeCollection : Collection<Type>
+	{
+		public KnownTypeCollection ()
+		{
+		}
+
+		public void ClearItems ()
+		{
+			base.Clear ();
+		}
+
+		public void InsertItem (int index, Type type)
+		{
+			base.Insert (index, type);
+		}
+
+		public void RemoveItem (int index)
+		{
+			base.RemoveAt (index);
+		}
+
+		public void SetItem (int index, Type type)
+		{
+			base [index] = type;
+		}
+	}
+}

+ 13 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/SerializationFactoryMethodAttribute.cs

@@ -0,0 +1,13 @@
+using System;
+
+namespace System.Runtime.Serialization
+{
+	[AttributeUsage (AttributeTargets.Method,
+		Inherited = false, AllowMultiple = false)]
+	public sealed class SerializationFactoryMethodAttribute : Attribute
+	{
+		public SerializationFactoryMethodAttribute ()
+		{
+		}
+	}
+}

+ 8 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/SerializationMode.cs

@@ -0,0 +1,8 @@
+
+namespace System.Runtime.Serialization
+{
+	public enum SerializationMode {
+		SharedContract,
+		SharedType
+	}
+}

+ 15 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/UnknownSerializationData.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.ObjectModel;
+
+namespace System.Runtime.Serialization
+{
+	public sealed class UnknownSerializationData
+	{
+		object target;
+
+		internal UnknownSerializationData (object target)
+		{
+			this.target = target;
+		}
+	}
+}

+ 123 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/XmlFormatter.cs

@@ -0,0 +1,123 @@
+using System;
+using System.IO;
+using System.Xml;
+
+namespace System.Runtime.Serialization
+{
+	public sealed class XmlFormatter : IFormatter
+	{
+		StreamingContext context;
+		SerializationMode mode;
+		KnownTypeCollection knownTypes;
+		IDataContractSurrogate surrogate;
+		int maxItems;
+
+		public XmlFormatter ()
+		{
+		}
+
+		public XmlFormatter (SerializationMode mode)
+		{
+		}
+
+		public XmlFormatter (StreamingContext context)
+		{
+		}
+
+		public XmlFormatter (SerializationMode mode,
+			StreamingContext context)
+		{
+		}
+
+		public XmlFormatter (SerializationMode mode,
+			StreamingContext context, KnownTypeCollection knownTypes)
+		{
+		}
+
+		SerializationBinder IFormatter.Binder {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		ISurrogateSelector IFormatter.SurrogateSelector {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public StreamingContext Context {
+			get { return context; }
+			set { context = value; }
+		}
+
+		public IDataContractSurrogate DataContractSurrogate {
+			get { return surrogate; }
+			set { surrogate = value; }
+		}
+
+		public KnownTypeCollection KnownTypes {
+			get { return knownTypes; }
+		}
+
+		public int MaxItemsInObjectGraph {
+			get { return maxItems; }
+			set { maxItems= value; }
+		}
+
+		public SerializationMode Mode {
+			get { return mode; }
+		}
+
+		object IFormatter.Deserialize (Stream stream)
+		{
+			return Deserialize (stream, null);
+		}
+
+		public object Deserialize (Stream stream, Type type)
+		{
+			return Deserialize (XmlReader.Create (stream), type);
+		}
+
+		public object Deserialize (XmlReader reader, Type type)
+		{
+			return Deserialize (reader, type, false);
+		}
+
+		public object Deserialize (XmlReader reader, Type type, bool readContentOnly)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public T Deserialize<T> (Stream stream)
+		{
+			return (T) Deserialize (XmlReader.Create (stream), typeof (T));
+		}
+
+		public T Deserialize<T> (XmlReader reader)
+		{
+			return (T) Deserialize (reader, typeof (T), false);
+		}
+
+		public T Deserialize<T> (XmlReader reader, bool readContentOnly)
+		{
+			return (T) Deserialize (reader, typeof (T), readContentOnly);
+		}
+
+		public void Serialize (Stream stream, object graph)
+		{
+			Serialize (XmlWriter.Create (stream), graph);
+		}
+
+		public void Serialize (XmlWriter writer, object graph)
+		{
+			Serialize (writer, graph, null, true, false, true);
+		}
+
+		public void Serialize (XmlWriter writer, object graph,
+			Type rootType, bool preserveObjectReferences,
+			bool writeContentOnly,
+			bool ignoreUnknownSerializationData)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 34 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/XmlSerializableServices.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using System.Xml.Schema;
+
+using QName = System.Xml.XmlQualifiedName;
+
+namespace System.Runtime.Serialization
+{
+	public static class XmlSerializableServices
+	{
+		static Dictionary<QName, XmlSchemaSet> defaultSchemas
+			= new Dictionary<QName, XmlSchemaSet> ();
+
+		public static void AddDefaultSchema (
+			XmlSchemaSet schemas,
+			QName typeQName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public static XmlNode [] ReadNodes (XmlReader xmlReader)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public static void WriteNodes (XmlWriter xmlWriter,
+			XmlNode [] nodes)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 87 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/XsdDataContractExporter.cs

@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Xml;
+using System.Xml.Schema;
+
+using QName = System.Xml.XmlQualifiedName;
+
+namespace System.Runtime.Serialization
+{
+	public class XsdDataContractExporter
+	{
+		ExportOptions options;
+		XmlSchemaSet schemas;
+
+		public XsdDataContractExporter ()
+		{
+		}
+
+		public XsdDataContractExporter (XmlSchemaSet schemas)
+		{
+			this.schemas = schemas;
+		}
+
+		public XmlSchemaSet Schemas {
+			get { return schemas; }
+		}
+
+		public ExportOptions Options {
+			get { return options; }
+			set { options = value; }
+		}
+
+		public bool CanExport (IList<Type> types)
+		{
+			foreach (Type t in types)
+				if (!CanExport (t))
+					return false;
+			return true;
+		}
+
+		public bool CanExport (IList<Assembly> assemblies)
+		{
+			foreach (Assembly a in assemblies)
+				foreach (Module m in a.GetModules ())
+					foreach (Type t in m.GetTypes ())
+						if (!CanExport (t))
+							return false;
+			return true;
+		}
+
+		public bool CanExport (Type type)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public void Export (IList<Type> types)
+		{
+			foreach (Type t in types)
+				Export (t);
+		}
+
+		public void Export (IList<Assembly> assemblies)
+		{
+			foreach (Assembly a in assemblies)
+				foreach (Module m in a.GetModules ())
+					foreach (Type t in m.GetTypes ())
+						Export (t);
+		}
+
+		public void Export (Type type)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public static XmlQualifiedName GetRootElementName (Type type)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public static XmlQualifiedName GetSchemaTypeName (Type type)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 92 - 0
mcs/class/System.ServiceModel/System.Runtime.Serialization/XsdDataContractImporter.cs

@@ -0,0 +1,92 @@
+using System;
+using System.CodeDom;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+using System.Xml.Schema;
+
+using QName = System.Xml.XmlQualifiedName;
+
+namespace System.Runtime.Serialization
+{
+	public class XsdDataContractImporter
+	{
+		ImportOptions options;
+		CodeCompileUnit ccu;
+
+		public XsdDataContractImporter ()
+		{
+		}
+
+		public XsdDataContractImporter (CodeCompileUnit ccu)
+		{
+			this.ccu = ccu;
+		}
+
+		public CodeCompileUnit CodeCompileUnit {
+			get { return ccu; }
+		}
+
+		public ImportOptions Options {
+			get { return options; }
+			set { options = value; }
+		}
+
+		public CodeTypeReference GetCodeTypeReference (QName typeName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public bool CanImport (XmlSchemaSet schemas)
+		{
+			foreach (XmlSchemaElement e in schemas.GlobalElements)
+				if (!CanImport (schemas, e))
+					return false;
+			return true;
+		}
+
+		public bool CanImport (XmlSchemaSet schemas,
+			IList<QName> typeNames)
+		{
+			foreach (QName name in typeNames)
+				if (!CanImport (schemas, name))
+					return false;
+			return true;
+		}
+
+		public bool CanImport (XmlSchemaSet schemas, QName name)
+		{
+			return CanImport (schemas,
+				(XmlSchemaElement) schemas.GlobalElements [name]);
+		}
+
+		public bool CanImport (XmlSchemaSet schemas, XmlSchemaElement element)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public void Import (XmlSchemaSet schemas)
+		{
+			foreach (XmlSchemaElement e in schemas.GlobalElements)
+				Import (schemas, e);
+		}
+
+		public void Import (XmlSchemaSet schemas,
+			IList<QName> typeNames)
+		{
+			foreach (QName name in typeNames)
+				Import (schemas, name);
+		}
+
+		public void Import (XmlSchemaSet schemas, QName name)
+		{
+			Import (schemas,
+				(XmlSchemaElement) schemas.GlobalElements [name]);
+		}
+
+		public QName Import (XmlSchemaSet schemas, XmlSchemaElement element)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 23 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlBinaryReaderInitializer.cs

@@ -0,0 +1,23 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	public interface IXmlBinaryReaderInitializer
+	{
+		void SetInput (
+			Stream stream,
+			IXmlDictionary dictionary,
+			XmlDictionaryReaderQuotas quota,
+			XmlBinaryReaderSession session,
+			OnXmlDictionaryReaderClose onClose,
+			XmlParserContext context);
+
+		void SetInput (byte [] buffer, int offset, int count,
+			IXmlDictionary dictionary,
+			XmlDictionaryReaderQuotas quota,
+			XmlBinaryReaderSession session,
+			OnXmlDictionaryReaderClose onClose,
+			XmlParserContext context);
+	}
+}

+ 13 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlBinaryWriterInitializer.cs

@@ -0,0 +1,13 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	public interface IXmlBinaryWriterInitializer
+	{
+		void SetOutput (Stream stream,
+			IXmlDictionary dictionary,
+			XmlBinaryWriterSession session,
+			bool ownsStream);
+	}
+}

+ 10 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlDictionary.cs

@@ -0,0 +1,10 @@
+namespace System.Xml
+{
+	public interface IXmlDictionary
+	{
+		bool TryLookup (int key, out XmlDictionaryString result);
+		bool TryLookup (string value, out XmlDictionaryString result);
+		bool TryLookup (XmlDictionaryString value,
+			out XmlDictionaryString result);
+	}
+}

+ 17 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlMtomReaderInitializer.cs

@@ -0,0 +1,17 @@
+using System;
+using System.IO;
+using System.Text;
+
+namespace System.Xml
+{
+	public interface IXmlMtomReaderInitializer
+	{
+		void SetInput (Stream stream, Encoding [] encodings,
+			string contentType, OnXmlDictionaryReaderClose onClose,
+			XmlParserContext context);
+
+		void SetInput (byte [] buffer, int offset, int count, Encoding [] encodings,
+			string contentType, OnXmlDictionaryReaderClose onClose,
+			XmlParserContext context);
+	}
+}

+ 13 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlMtomWriterInitializer.cs

@@ -0,0 +1,13 @@
+using System;
+using System.IO;
+using System.Text;
+
+namespace System.Xml
+{
+	public interface IXmlMtomWriterInitializer
+	{
+		void SetOutput (Stream stream, Encoding encoding,
+			int maxSizeInBytes, string startInfo, string boundary,
+			string startUri, bool writeMessageHeaders);
+	}
+}

+ 13 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlUTF8ReaderInitializer.cs

@@ -0,0 +1,13 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	public interface IXmlUTF8ReaderInitializer
+	{
+		void SetInput (byte [] buffer, int offset, int count,
+			XmlDictionaryReaderQuotas quota,
+			OnXmlDictionaryReaderClose onClose,
+			XmlParserContext context);
+	}
+}

+ 10 - 0
mcs/class/System.ServiceModel/System.Xml/IXmlUTF8WriterInitializer.cs

@@ -0,0 +1,10 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	public interface IXmlUTF8WriterInitializer
+	{
+		void SetOutput (Stream stream, bool ownsStream);
+	}
+}

+ 5 - 0
mcs/class/System.ServiceModel/System.Xml/OnXmlDictionaryReaderClose.cs

@@ -0,0 +1,5 @@
+namespace System.Xml
+{
+	public delegate void OnXmlDictionaryReaderClose (XmlDictionaryReader reader);
+}
+

+ 101 - 0
mcs/class/System.ServiceModel/System.Xml/UniqueId.cs

@@ -0,0 +1,101 @@
+using System;
+
+namespace System.Xml
+{
+	public class UniqueId
+	{
+		[MonoTODO]
+		public UniqueId ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public UniqueId (byte [] id)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public UniqueId (Guid id)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public UniqueId (string id)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public UniqueId (byte [] id, int offset, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public UniqueId (char [] id, int offset, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public int CharArrayLength {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public bool IsGuid {
+			get { throw new NotImplementedException (); }
+		}
+
+		[MonoTODO]
+		public override bool Equals (Object obj)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public override int GetHashCode ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static bool operator == (UniqueId id1, UniqueId id2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public static bool operator != (UniqueId id1, UniqueId id2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public int ToCharArray (char [] array, int offset)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public override string ToString ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool TryGetGuid (out Guid guid)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool TryGetGuid (byte [] buffer, int offset)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 40 - 0
mcs/class/System.ServiceModel/System.Xml/XmlBinaryReaderSession.cs

@@ -0,0 +1,40 @@
+namespace System.Xml
+{
+	public class XmlBinaryReaderSession : IXmlDictionary
+	{
+		public XmlBinaryReaderSession ()
+		{
+		}
+
+		[MonoTODO]
+		public XmlDictionaryString Add (int id, string value)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public void Clear ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool TryLookup (int key, out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool TryLookup (string value, out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public bool TryLookup (XmlDictionaryString value,
+			out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 33 - 0
mcs/class/System.ServiceModel/System.Xml/XmlBinaryWriterSession.cs

@@ -0,0 +1,33 @@
+namespace System.Xml
+{
+	public class XmlBinaryWriterSession
+	{
+		bool emitStrings;
+
+		public XmlBinaryWriterSession ()
+		{
+		}
+
+		public XmlBinaryWriterSession (bool emitStrings)
+		{
+			this.emitStrings = emitStrings;
+		}
+
+		public bool EmitStrings {
+			get { return emitStrings; }
+		}
+
+		[MonoTODO]
+		public void Reset ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		[MonoTODO]
+		public virtual bool TryAdd (XmlDictionaryString value,
+			out int key)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 144 - 0
mcs/class/System.ServiceModel/System.Xml/XmlC14NWriter.cs

@@ -0,0 +1,144 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	[MonoTODO]
+	public class XmlC14NWriter : XmlCanonicalWriter
+	{
+		bool includeComments;
+
+		public XmlC14NWriter (Stream stream)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public bool IncludeComments {
+			get { return includeComments; }
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+
+		public override void Close ()
+		{
+			Flush ();
+		}
+
+		public override void Flush ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual void SetOutput (Stream stream)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteBase64 (byte [] buffer, int index, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteCharEntity (int ch)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteComment (string text)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteComment (byte [] data, int offset, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteDeclaration ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEndAttribute ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEndElement (string prefix, string localName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEndElement (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEndStartElement (bool isEmpty)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEscapedText (string text)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteEscapedText (byte [] text, int offset, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteNode (XmlReader reader)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteStartAttribute (string prefix, string localName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteStartAttribute (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteStartElement (string prefix, string localName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteStartElement (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteText (string text)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteText (int ch)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteText (byte [] text, int offset, int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteXmlnsAttribute (
+			string prefix, string namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public override void WriteXmlnsAttribute (byte [] prefix, int offset1, int count1, byte [] namespaceUri, int offset2, int count2)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 61 - 0
mcs/class/System.ServiceModel/System.Xml/XmlCanonicalWriter.cs

@@ -0,0 +1,61 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	[MonoTODO]
+	public abstract class XmlCanonicalWriter
+	{
+		protected XmlCanonicalWriter ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public abstract void Close ();
+
+		public abstract void Flush ();
+
+		public abstract void WriteBase64 (byte [] buffer, int index, int count);
+
+		public abstract void WriteCharEntity (int ch);
+
+		public abstract void WriteComment (string text);
+
+		public abstract void WriteComment (byte [] data, int offset, int count);
+
+		public abstract void WriteDeclaration ();
+
+		public abstract void WriteEndAttribute ();
+
+		public abstract void WriteEndElement (string prefix, string localName);
+
+		public abstract void WriteEndElement (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2);
+
+		public abstract void WriteEndStartElement (bool isEmpty);
+
+		public abstract void WriteEscapedText (string text);
+
+		public abstract void WriteEscapedText (byte [] text, int offset, int count);
+
+		public abstract void WriteNode (XmlReader reader);
+
+		public abstract void WriteStartAttribute (string prefix, string localName);
+
+		public abstract void WriteStartAttribute (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2);
+
+		public abstract void WriteStartElement (string prefix, string localName);
+
+		public abstract void WriteStartElement (byte [] prefix, int offset1, int count1, byte [] localName, int offset2, int count2);
+
+		public abstract void WriteText (string text);
+
+		public abstract void WriteText (byte [] text, int offset, int count);
+
+		public abstract void WriteText (int ch);
+
+		public abstract void WriteXmlnsAttribute (
+			string prefix, string namespaceUri);
+
+		public abstract void WriteXmlnsAttribute (byte [] prefix, int offset1, int count1, byte [] namespaceUri, int offset2, int count2);
+	}
+}

+ 58 - 0
mcs/class/System.ServiceModel/System.Xml/XmlDictionary.cs

@@ -0,0 +1,58 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System.Xml
+{
+	public class XmlDictionary : IXmlDictionary
+	{
+		static XmlDictionary empty = new XmlDictionary (true);
+
+		public static XmlDictionary Empty {
+			get { return empty; }
+		}
+
+		readonly bool isReadOnly;
+		Dictionary<string, XmlDictionaryString> dict;
+
+		public XmlDictionary ()
+		{
+			dict = new Dictionary<string, XmlDictionaryString> ();
+		}
+
+		public XmlDictionary (int capacity)
+		{
+			dict = new Dictionary<string, XmlDictionaryString> (capacity);
+		}
+
+		// for static empty.
+		private XmlDictionary (bool isReadOnly)
+			: this ()
+		{
+			this.isReadOnly = isReadOnly;
+		}
+
+		public virtual XmlDictionaryString Add (string value)
+		{
+			if (isReadOnly)
+				throw new InvalidOperationException ();
+			throw new NotImplementedException ();
+		}
+
+		public bool TryLookup (int key, out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public bool TryLookup (string value, out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public bool TryLookup (XmlDictionaryString value,
+			out XmlDictionaryString result)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 111 - 0
mcs/class/System.ServiceModel/System.Xml/XmlDictionaryReader.cs

@@ -0,0 +1,111 @@
+using System;
+using System.Xml;
+
+namespace System.Xml
+{
+	public abstract class XmlDictionaryReader : XmlReader
+	{
+		protected XmlDictionaryReader ()
+		{
+		}
+
+		public virtual bool CanCanonicalize {
+			get { return false; }
+		}
+
+		public virtual bool CanGetContext {
+			get { return false; }
+		}
+
+		// FIXME: several factory methods here.
+
+		public virtual void EndCanonicalization ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual string GetAttribute (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public XmlParserContext GetContext ()
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual int IndexOfLocalName (
+			string [] localNames, string namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual int IndexOfLocalName (
+			XmlDictionaryString [] localNames,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool IsNamespaceUri (string namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool IsNamespaceUri (XmlDictionaryString namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public bool IsStartArray (out Type type)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool IsStartElement (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual void MoveToStartElement (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotImplementedException ();
+		}
+
+		// FIXME: add Read*Array() overloads
+
+		public virtual void StartCanonicalization (
+			XmlCanonicalWriter writer)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool TryGetArrayLength (out int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool TryGetBase64ContentLength (out int count)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool TryGetLocalNameAsDictionaryString (
+			out XmlDictionaryString localName)
+		{
+			throw new NotImplementedException ();
+		}
+
+		public virtual bool TryGetNamespaceUriAsDictionaryString (
+			out XmlDictionaryString localName)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 62 - 0
mcs/class/System.ServiceModel/System.Xml/XmlDictionaryReaderQuotas.cs

@@ -0,0 +1,62 @@
+namespace System.Xml
+{
+	public class XmlDictionaryReaderQuotas
+	{
+		public XmlDictionaryReaderQuotas ()
+		{
+		}
+
+		[MonoTODO]
+		public const int DefaultMaxArrayLength = int.MaxValue;
+
+		[MonoTODO]
+		public const int DefaultMaxBytesPerRead = int.MaxValue;
+
+		[MonoTODO]
+		public const int DefaultMaxDepth = int.MaxValue;
+
+		[MonoTODO]
+		public const int DefaultMaxNameTableCharCount = int.MaxValue;
+
+		[MonoTODO]
+		public const int DefaultMaxStringContentLength = int.MaxValue;
+
+		public static XmlDictionaryReaderQuotas Default {
+			get { throw new NotImplementedException (); }
+		}
+
+		public static XmlDictionaryReaderQuotas Max {
+			get { throw new NotImplementedException (); }
+		}
+
+		public int MaxArrayLength {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public int MaxBytesPerRead {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public int MaxDepth {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public int MaxNameTableCharCount {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public int MaxStringContentLength {
+			get { throw new NotImplementedException (); }
+			set { throw new NotImplementedException (); }
+		}
+
+		public void CopyTo (XmlDictionaryReaderQuotas quota)
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 38 - 0
mcs/class/System.ServiceModel/System.Xml/XmlDictionaryString.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections;
+
+namespace System.Xml
+{
+	public class XmlDictionaryString
+	{
+		IXmlDictionary dict;
+		string value;
+		int key;
+
+		public XmlDictionaryString (IXmlDictionary dictionary,
+			string value, int key)
+		{
+			this.dict = dictionary;
+			this.value = value;
+			this.key = key;
+		}
+
+		public IXmlDictionary Dictionary {
+			get { return dict; }
+		}
+
+		public int Key {
+			get { return key; }
+		}
+
+		public string Value {
+			get { return value; }
+		}
+
+		[MonoTODO]
+		public override string ToString ()
+		{
+			throw new NotImplementedException ();
+		}
+	}
+}

+ 161 - 0
mcs/class/System.ServiceModel/System.Xml/XmlDictionaryWriter.cs

@@ -0,0 +1,161 @@
+using System;
+using System.IO;
+
+namespace System.Xml
+{
+	public abstract class XmlDictionaryWriter : XmlShimWriter
+	{
+		protected XmlDictionaryWriter ()
+		{
+		}
+
+		public bool CanCanonicalize {
+			get { return false; }
+		}
+
+		public bool CanFragment {
+			get { return false; }
+		}
+
+		// FIXME: add a bunch of factory methods
+
+		public void EndCanonicalization ()
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void EndFragment ()
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void StartCanonicalization (XmlCanonicalWriter writer)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void StartFragment (Stream stream)
+		{
+			throw new NotSupportedException ();
+		}
+
+		// FIXME: add Write*Array() overloads.
+
+		public void WriteAttributeString (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri,
+			string value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteAttributeString (string prefix,
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri,
+			string value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteElementString (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri,
+			string value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteElementString (string prefix,
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri,
+			string value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteFragment (byte [] buffer, int offset,
+			int count)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteNode (XmlDictionaryReader reader,
+			bool defattr)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteQualifiedName (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteStartAttribute (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteStartAttribute (string prefix,
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteStartElement (
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteStartElement (string prefix,
+			XmlDictionaryString localName,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteString (XmlDictionaryString value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteValue (UniqueId id)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteValue (XmlDictionaryString value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteXmlAttribute (string localName, string value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteXmlAttribute (XmlDictionaryString localName,
+			XmlDictionaryString value)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteXmlnsAttribute (
+			string prefix, string namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+
+		public void WriteXmlnsAttribute (string prefix,
+			XmlDictionaryString namespaceUri)
+		{
+			throw new NotSupportedException ();
+		}
+	}
+}

+ 9 - 0
mcs/class/System.ServiceModel/System.Xml/XmlShimWriter.cs

@@ -0,0 +1,9 @@
+namespace System.Xml
+{
+	public abstract class XmlShimWriter : XmlWriter
+	{
+		protected XmlShimWriter ()
+		{
+		}
+	}
+}