mscorlib(4.0.0.0) API with additions
ImportContext.cs
1 using System.Collections;
3 
5 {
7  public class ImportContext
8  {
9  private bool shareTypes;
10 
11  private SchemaObjectCache cache;
12 
13  private Hashtable mappings;
14 
15  private Hashtable elements;
16 
17  private CodeIdentifiers typeIdentifiers;
18 
19  internal SchemaObjectCache Cache
20  {
21  get
22  {
23  if (cache == null)
24  {
25  cache = new SchemaObjectCache();
26  }
27  return cache;
28  }
29  }
30 
31  internal Hashtable Elements
32  {
33  get
34  {
35  if (elements == null)
36  {
37  elements = new Hashtable();
38  }
39  return elements;
40  }
41  }
42 
43  internal Hashtable Mappings
44  {
45  get
46  {
47  if (mappings == null)
48  {
49  mappings = new Hashtable();
50  }
51  return mappings;
52  }
53  }
54 
58  {
59  get
60  {
61  if (typeIdentifiers == null)
62  {
63  typeIdentifiers = new CodeIdentifiers();
64  }
65  return typeIdentifiers;
66  }
67  }
68 
72  public bool ShareTypes => shareTypes;
73 
76  public StringCollection Warnings => Cache.Warnings;
77 
81  public ImportContext(CodeIdentifiers identifiers, bool shareTypes)
82  {
83  typeIdentifiers = identifiers;
84  this.shareTypes = shareTypes;
85  }
86 
87  internal ImportContext()
88  : this(null, shareTypes: false)
89  {
90  }
91  }
92 }
bool ShareTypes
Gets a value that determines whether custom types are shared.
Definition: __Canon.cs:3
StringCollection Warnings
Gets a collection of warnings that are generated when importing the code entity descriptions.
Describes the context in which a set of schema is bound to .NET Framework code entities.
Definition: ImportContext.cs:7
CodeIdentifiers TypeIdentifiers
Gets a set of code entities to which the context applies.
Represents a collection of strings.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
Definition: Hashtable.cs:17
ImportContext(CodeIdentifiers identifiers, bool shareTypes)
Initializes a new instance of the T:System.Xml.Serialization.ImportContext class for the given code i...
Maintains a group of names for related code entities or type mappings that are generated by the ....