9 internal enum EnumeratorType
16 internal struct XmlSchemaObjectEntry
50 public int Count => size;
52 public object SyncRoot => ((
ICollection)entries).SyncRoot;
54 public bool IsSynchronized => ((
ICollection)entries).IsSynchronized;
58 this.entries = entries;
62 public void CopyTo(
Array array,
int arrayIndex)
72 for (
int i = 0; i < size; i++)
74 array.SetValue(entries[i].qname, arrayIndex++);
80 return new XSOEnumerator(entries, size, EnumeratorType.Keys);
90 public int Count => size;
92 public object SyncRoot => ((
ICollection)entries).SyncRoot;
94 public bool IsSynchronized => ((
ICollection)entries).IsSynchronized;
98 this.entries = entries;
102 public void CopyTo(
Array array,
int arrayIndex)
112 for (
int i = 0; i < size; i++)
114 array.SetValue(entries[i].xso, arrayIndex++);
120 return new XSOEnumerator(entries, size, EnumeratorType.Values);
128 private EnumeratorType enumType;
130 protected int currentIndex;
138 public object Current
142 if (currentIndex == -1)
146 if (currentIndex >= size)
152 case EnumeratorType.Keys:
154 case EnumeratorType.Values:
156 case EnumeratorType.DictionaryEntry:
166 this.entries = entries;
168 this.enumType = enumType;
172 public bool MoveNext()
174 if (currentIndex >= size - 1)
181 currentValue = entries[currentIndex].xso;
182 currentKey = entries[currentIndex].qname;
200 if (currentIndex == -1)
204 if (currentIndex >= size)
216 if (currentIndex == -1)
220 if (currentIndex >= size)
232 if (currentIndex == -1)
236 if (currentIndex >= size)
245 : base(entries, size, enumType)
287 table.
Add(name, value);
288 entries.
Add(
new XmlSchemaObjectEntry(name, value));
293 XmlSchemaObject value2 =
null;
297 int index = FindIndexByValue(value2);
298 entries[index] =
new XmlSchemaObjectEntry(name, value);
306 internal void Replace(XmlQualifiedName name, XmlSchemaObject value)
308 if (table.
TryGetValue(name, out XmlSchemaObject value2))
311 int index = FindIndexByValue(value2);
312 entries[index] =
new XmlSchemaObjectEntry(name, value);
316 internal void Clear()
322 internal void Remove(XmlQualifiedName name)
324 if (table.
TryGetValue(name, out XmlSchemaObject value))
327 int index = FindIndexByValue(value);
332 private int FindIndexByValue(XmlSchemaObject xso)
334 for (
int i = 0; i < entries.
Count; i++)
336 if (entries[i].xso == xso)
357 return new XSODictionaryEnumerator(entries, table.
Count, EnumeratorType.DictionaryEntry);
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
int Count
Gets the number of elements contained in the T:System.Collections.Generic.List`1.
void RemoveAt(int index)
Removes the element at the specified index of the T:System.Collections.Generic.List`1.
Represents the root class for the Xml schema object model hierarchy and serves as a base class for cl...
The exception that is thrown when the value of an argument is outside the allowable range of values a...
string Namespace
Gets a string representation of the namespace of the T:System.Xml.XmlQualifiedName.
bool ContainsKey(TKey key)
Determines whether the T:System.Collections.Generic.Dictionary`2 contains the specified key.
int Count
Gets the number of items contained in the T:System.Xml.Schema.XmlSchemaObjectTable.
void Add(T item)
Adds an object to the end of the T:System.Collections.Generic.List`1.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
string Name
Gets a string representation of the qualified name of the T:System.Xml.XmlQualifiedName.
ICollection Names
Returns a collection of all the named elements in the T:System.Xml.Schema.XmlSchemaObjectTable.
int Count
Gets the number of key/value pairs contained in the T:System.Collections.Generic.Dictionary`2.
Provides the collections for contained elements in the T:System.Xml.Schema.XmlSchema class (for examp...
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents an XML qualified name.
Represents a collection of keys and values.To browse the .NET Framework source code for this type,...
bool Contains(XmlQualifiedName name)
Determines if the qualified name specified exists in the collection.
void Clear()
Removes all elements from the T:System.Collections.Generic.List`1.
Enumerates the elements of a nongeneric dictionary.
The exception that is thrown when a method call is invalid for the object's current state.
void Add(TKey key, TValue value)
Adds the specified key and value to the dictionary.
IDictionaryEnumerator GetEnumerator()
Returns an enumerator that can iterate through the T:System.Xml.Schema.XmlSchemaObjectTable.
Defines size, enumerators, and synchronization methods for all nongeneric collections.
ICollection Values
Returns a collection of all the values for all the elements in the T:System.Xml.Schema....
Defines a dictionary key/value pair that can be set or retrieved.
void Clear()
Removes all keys and values from the T:System.Collections.Generic.Dictionary`2.
bool TryGetValue(TKey key, out TValue value)
Gets the value associated with the specified key.
Supports a simple iteration over a non-generic collection.