4 using System.Collections.Generic;
7 using System.Xml.Schema;
9 using QName = System.Xml.XmlQualifiedName;
11 namespace System.Runtime.Serialization
13 public class XsdDataContractImporter
15 ImportOptions options;
18 public XsdDataContractImporter ()
22 public XsdDataContractImporter (CodeCompileUnit ccu)
27 public CodeCompileUnit CodeCompileUnit {
31 public ImportOptions Options {
32 get { return options; }
33 set { options = value; }
36 public CodeTypeReference GetCodeTypeReference (QName typeName)
38 throw new NotImplementedException ();
41 public bool CanImport (XmlSchemaSet schemas)
43 foreach (XmlSchemaElement e in schemas.GlobalElements)
44 if (!CanImport (schemas, e))
49 public bool CanImport (XmlSchemaSet schemas,
50 IList<QName> typeNames)
52 foreach (QName name in typeNames)
53 if (!CanImport (schemas, name))
58 public bool CanImport (XmlSchemaSet schemas, QName name)
60 return CanImport (schemas,
61 (XmlSchemaElement) schemas.GlobalElements [name]);
64 public bool CanImport (XmlSchemaSet schemas, XmlSchemaElement element)
66 throw new NotImplementedException ();
69 public void Import (XmlSchemaSet schemas)
71 foreach (XmlSchemaElement e in schemas.GlobalElements)
75 public void Import (XmlSchemaSet schemas,
76 IList<QName> typeNames)
78 foreach (QName name in typeNames)
79 Import (schemas, name);
82 public void Import (XmlSchemaSet schemas, QName name)
85 (XmlSchemaElement) schemas.GlobalElements [name]);
88 public QName Import (XmlSchemaSet schemas, XmlSchemaElement element)
90 throw new NotImplementedException ();