2010-01-20 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / System.Runtime.Serialization / System.Runtime.Serialization / ImportOptions.cs
1 //
2 // ImportOptions.cs
3 //
4 // Author:
5 //      Atsushi Enomoto <atsushi@ximian.com>
6 //
7 // Copyright (C) 2005 Novell, Inc.  http://www.novell.com
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 #if NET_2_0
29
30 using System.CodeDom.Compiler;
31 using System.Collections.Generic;
32
33 namespace System.Runtime.Serialization
34 {
35         public class ImportOptions
36         {
37                 IDataContractSurrogate surrogate;
38                 ICollection<Type> referenced_collection_types =
39                         new List<Type> ();
40                 ICollection<Type> referenced_types = new List<Type> ();
41                 bool enable_data_binding;
42                 bool generate_internal;
43                 bool generate_serializable;
44                 bool import_xml_type;
45                 IDictionary<string, string> namespaces =
46                         new Dictionary<string, string> ();
47                 CodeDomProvider code_provider;
48
49                 public ImportOptions ()
50                 {
51                 }
52
53                 public CodeDomProvider CodeProvider {
54                         get { return code_provider; }
55                         set { code_provider = value; }
56                 }
57
58                 public IDataContractSurrogate DataContractSurrogate {
59                         get { return surrogate; }
60                         set { surrogate = value; }
61                 }
62
63                 public bool EnableDataBinding {
64                         get { return enable_data_binding; }
65                         set { enable_data_binding = value; }
66                 }
67
68                 public bool GenerateInternal {
69                         get { return generate_internal; }
70                         set { generate_internal = value; }
71                 }
72
73                 public bool GenerateSerializable {
74                         get { return generate_serializable; }
75                         set { generate_serializable = value; }
76                 }
77
78                 public bool ImportXmlType {
79                         get { return import_xml_type; }
80                         set { import_xml_type = value; }
81                 }
82
83                 public IDictionary<string, string> Namespaces {
84                         get { return namespaces; }
85                 }
86
87                 public ICollection<Type> ReferencedCollectionTypes {
88                         get { return referenced_collection_types; }
89                 }
90
91                 public ICollection<Type> ReferencedTypes {
92                         get { return referenced_types; }
93                 }
94         }
95 }
96
97 #endif