Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Key.cs
Go to the documentation of this file.
3
5
6internal sealed class Key
7{
8 private readonly XmlQualifiedName _name;
9
10 private readonly int _matchKey;
11
12 private readonly int _useKey;
13
15
17
18 public int MatchKey => _matchKey;
19
20 public int UseKey => _useKey;
21
22 public Key(XmlQualifiedName name, int matchkey, int usekey)
23 {
24 _name = name;
27 _keyNodes = null;
28 }
29
30 public void AddKey(XPathNavigator root, Hashtable table)
31 {
32 if (_keyNodes == null)
33 {
34 _keyNodes = new ArrayList();
35 }
36 _keyNodes.Add(new DocumentKeyList(root, table));
37 }
38
40 {
41 if (_keyNodes != null)
42 {
43 for (int i = 0; i < _keyNodes.Count; i++)
44 {
45 if (((DocumentKeyList)_keyNodes[i]).RootNav.IsSamePosition(root))
46 {
47 return ((DocumentKeyList)_keyNodes[i]).KeyTable;
48 }
49 }
50 }
51 return null;
52 }
53
54 public Key Clone()
55 {
56 return new Key(_name, _matchKey, _useKey);
57 }
58}
virtual int Add(object? value)
readonly XmlQualifiedName _name
Definition Key.cs:8
readonly int _matchKey
Definition Key.cs:10
void AddKey(XPathNavigator root, Hashtable table)
Definition Key.cs:30
ArrayList _keyNodes
Definition Key.cs:14
Key(XmlQualifiedName name, int matchkey, int usekey)
Definition Key.cs:22
readonly int _useKey
Definition Key.cs:12
Hashtable GetKeys(XPathNavigator root)
Definition Key.cs:39
XmlQualifiedName Name
Definition Key.cs:16