Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Add() [2/2]

override string System.Xml.NameTable.Add ( string key)
inline

Definition at line 33 of file NameTable.cs.

34 {
35 if (key == null)
36 {
37 throw new ArgumentNullException("key");
38 }
39 if (key.Length == 0)
40 {
41 return string.Empty;
42 }
43 int num = ComputeHash32(key);
44 for (Entry entry = _entries[num & _mask]; entry != null; entry = entry.next)
45 {
46 if (entry.hashCode == num && entry.str.Equals(key))
47 {
48 return entry.str;
49 }
50 }
51 return AddEntry(key, num);
52 }
static int ComputeHash32(string key)
Definition NameTable.cs:137
string AddEntry(string str, int hashCode)
Definition NameTable.cs:142

References System.Xml.NameTable._entries, System.Xml.NameTable._mask, System.Xml.NameTable.AddEntry(), System.Xml.NameTable.ComputeHash32(), System.Xml.Dictionary, System.key, and System.Xml.NameTable.Entry.next.

Referenced by System.Xml.Schema.XmlSchemaCollection.Add(), System.Xml.Xsl.IlGen.XmlILElementAnalyzer.AnalyzeAttributeCtor(), System.Xml.DocumentXPathNavigator.LookupNamespace(), System.Xml.XmlReader.ReadToDescendant(), System.Xml.XmlReader.ReadToDescendant(), System.Xml.XmlReader.ReadToFollowing(), System.Xml.XmlReader.ReadToFollowing(), System.Xml.XmlReader.ReadToNextSibling(), and System.Xml.XmlReader.ReadToNextSibling().