merge r67228-r67235, r67237, r67251 and r67256-67259 to trunk (they are
[mono.git] / mcs / class / System.Runtime.Serialization / System.Runtime.Serialization / XsdDataContractImporter.cs
1 #if NET_2_0
2 using System;
3 using System.CodeDom;
4 using System.Collections.Generic;
5 using System.IO;
6 using System.Xml;
7 using System.Xml.Schema;
8
9 using QName = System.Xml.XmlQualifiedName;
10
11 namespace System.Runtime.Serialization
12 {
13         public class XsdDataContractImporter
14         {
15                 ImportOptions options;
16                 CodeCompileUnit ccu;
17
18                 public XsdDataContractImporter ()
19                 {
20                 }
21
22                 public XsdDataContractImporter (CodeCompileUnit ccu)
23                 {
24                         this.ccu = ccu;
25                 }
26
27                 public CodeCompileUnit CodeCompileUnit {
28                         get { return ccu; }
29                 }
30
31                 public ImportOptions Options {
32                         get { return options; }
33                         set { options = value; }
34                 }
35
36                 public CodeTypeReference GetCodeTypeReference (QName typeName)
37                 {
38                         throw new NotImplementedException ();
39                 }
40
41                 public bool CanImport (XmlSchemaSet schemas)
42                 {
43                         foreach (XmlSchemaElement e in schemas.GlobalElements)
44                                 if (!CanImport (schemas, e))
45                                         return false;
46                         return true;
47                 }
48
49                 public bool CanImport (XmlSchemaSet schemas,
50                         IList<QName> typeNames)
51                 {
52                         foreach (QName name in typeNames)
53                                 if (!CanImport (schemas, name))
54                                         return false;
55                         return true;
56                 }
57
58                 public bool CanImport (XmlSchemaSet schemas, QName name)
59                 {
60                         return CanImport (schemas,
61                                 (XmlSchemaElement) schemas.GlobalElements [name]);
62                 }
63
64                 public bool CanImport (XmlSchemaSet schemas, XmlSchemaElement element)
65                 {
66                         throw new NotImplementedException ();
67                 }
68
69                 public void Import (XmlSchemaSet schemas)
70                 {
71                         foreach (XmlSchemaElement e in schemas.GlobalElements)
72                                 Import (schemas, e);
73                 }
74
75                 public void Import (XmlSchemaSet schemas,
76                         IList<QName> typeNames)
77                 {
78                         foreach (QName name in typeNames)
79                                 Import (schemas, name);
80                 }
81
82                 public void Import (XmlSchemaSet schemas, QName name)
83                 {
84                         Import (schemas,
85                                 (XmlSchemaElement) schemas.GlobalElements [name]);
86                 }
87
88                 public QName Import (XmlSchemaSet schemas, XmlSchemaElement element)
89                 {
90                         throw new NotImplementedException ();
91                 }
92         }
93 }
94 #endif