Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DataDocumentXPathNavigator.cs
Go to the documentation of this file.
3
4namespace System.Xml;
5
7{
8 private readonly XPathNodePointer _curNode;
9
11
12 private readonly XPathNodePointer _temp;
13
15
17
19
20 public override string LocalName => _curNode.LocalName;
21
22 public override string NamespaceURI => _curNode.NamespaceURI;
23
24 public override string Name => _curNode.Name;
25
26 public override string Prefix => _curNode.Prefix;
27
28 public override string Value
29 {
30 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
31 get
32 {
34 if (nodeType != XPathNodeType.Element && nodeType != 0)
35 {
36 return _curNode.Value;
37 }
38 return _curNode.InnerText;
39 }
40 }
41
42 public override string BaseURI => _curNode.BaseURI;
43
44 public override string XmlLang => _curNode.XmlLang;
45
46 public override bool IsEmptyElement => _curNode.IsEmptyElement;
47
49
50 public override bool HasAttributes => _curNode.AttributeCount > 0;
51
52 public override bool HasChildren => _curNode.HasChildren;
53
54 [RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly.")]
61
62 [RequiresUnreferencedCode("Members from serialized types may be trimmed if not referenced directly.")]
64 {
65 _curNode = other._curNode.Clone(this);
66 _temp = other._temp.Clone(this);
67 _doc = other._doc;
68 }
69
70 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
71 public override XPathNavigator Clone()
72 {
73 return new DataDocumentXPathNavigator(this);
74 }
75
76 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
77 public override string GetAttribute(string localName, string namespaceURI)
78 {
79 if (_curNode.NodeType != XPathNodeType.Element)
80 {
81 return string.Empty;
82 }
84 if (!_temp.MoveToAttribute(localName, namespaceURI))
85 {
86 return string.Empty;
87 }
88 return _temp.Value;
89 }
90
91 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
92 public override string GetNamespace(string name)
93 {
94 return _curNode.GetNamespace(name);
95 }
96
97 public override bool MoveToNamespace(string name)
98 {
99 if (_curNode.NodeType == XPathNodeType.Element)
100 {
101 return _curNode.MoveToNamespace(name);
102 }
103 return false;
104 }
105
106 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
108 {
109 if (_curNode.NodeType == XPathNodeType.Element)
110 {
112 }
113 return false;
114 }
115
116 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
118 {
119 if (_curNode.NodeType == XPathNodeType.Namespace)
120 {
122 }
123 return false;
124 }
125
126 public override bool MoveToAttribute(string localName, string namespaceURI)
127 {
128 if (_curNode.NodeType == XPathNodeType.Element)
129 {
130 return _curNode.MoveToAttribute(localName, namespaceURI);
131 }
132 return false;
133 }
134
135 public override bool MoveToFirstAttribute()
136 {
137 if (_curNode.NodeType == XPathNodeType.Element)
138 {
139 return _curNode.MoveToNextAttribute(bFirst: true);
140 }
141 return false;
142 }
143
144 public override bool MoveToNextAttribute()
145 {
146 if (_curNode.NodeType == XPathNodeType.Attribute)
147 {
148 return _curNode.MoveToNextAttribute(bFirst: false);
149 }
150 return false;
151 }
152
153 public override bool MoveToNext()
154 {
155 if (_curNode.NodeType != XPathNodeType.Attribute)
156 {
158 }
159 return false;
160 }
161
162 public override bool MoveToPrevious()
163 {
164 if (_curNode.NodeType != XPathNodeType.Attribute)
165 {
167 }
168 return false;
169 }
170
171 public override bool MoveToFirst()
172 {
173 if (_curNode.NodeType != XPathNodeType.Attribute)
174 {
175 return _curNode.MoveToFirst();
176 }
177 return false;
178 }
179
180 public override bool MoveToFirstChild()
181 {
182 return _curNode.MoveToFirstChild();
183 }
184
185 public override bool MoveToParent()
186 {
187 return _curNode.MoveToParent();
188 }
189
190 public override void MoveToRoot()
191 {
193 }
194
195 public override bool MoveTo(XPathNavigator other)
196 {
198 {
200 return true;
201 }
202 return false;
203 }
204
205 public override bool MoveToId(string id)
206 {
207 return false;
208 }
209
210 public override bool IsSamePosition(XPathNavigator other)
211 {
213 {
214 return true;
215 }
216 return false;
217 }
218
219 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
221 {
222 return _curNode.Node;
223 }
224
225 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "This whole class is unsafe. Constructors are marked as such.")]
227 {
228 if (other == null)
229 {
230 return XmlNodeOrder.Unknown;
231 }
233 {
235 }
236 return XmlNodeOrder.Unknown;
237 }
238}
DataDocumentXPathNavigator(XmlDataDocument doc, XmlNode node)
override bool IsSamePosition(XPathNavigator other)
DataDocumentXPathNavigator(DataDocumentXPathNavigator other)
override string GetAttribute(string localName, string namespaceURI)
override bool MoveTo(XPathNavigator other)
override bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
override XmlNodeOrder ComparePosition(XPathNavigator other)
override bool MoveToNextNamespace(XPathNamespaceScope namespaceScope)
override bool MoveToAttribute(string localName, string namespaceURI)
string GetNamespace(XmlBoundElement be, string name)
bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)
XmlNodeOrder ComparePosition(XPathNodePointer other)
bool MoveToNextAttribute(bool bFirst)
XPathNodePointer Clone(DataDocumentXPathNavigator owner)
bool MoveToNextNamespace(XmlBoundElement be, DataColumn col, XmlAttribute curAttr)
bool IsSamePosition(XPathNodePointer pointer)
bool MoveTo(XPathNodePointer pointer)
bool MoveToAttribute(string localName, string namespaceURI)
XmlDocument Document
Definition XmlNode.cs:253