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

◆ GetElementFollowing()

static bool MS.Internal.Xml.Cache.XPathNodeHelper.GetElementFollowing ( ref XPathNode[] pageCurrent,
ref int idxCurrent,
XPathNode[] pageEnd,
int idxEnd,
string localName,
string namespaceName )
inlinestatic

Definition at line 273 of file XPathNodeHelper.cs.

274 {
275 XPathNode[] pageNode = pageCurrent;
276 int i = idxCurrent;
277 if (pageNode[i].NodeType == XPathNodeType.Element && (object)pageNode[i].LocalName == localName)
278 {
279 int num = 0;
280 if (pageEnd != null)
281 {
282 num = pageEnd[0].PageInfo.PageNumber;
283 int pageNumber = pageNode[0].PageInfo.PageNumber;
284 if (pageNumber > num || (pageNumber == num && i >= idxEnd))
285 {
286 pageEnd = null;
287 }
288 }
289 while (true)
290 {
291 i = pageNode[i].GetSimilarElement(out pageNode);
292 if (i != 0)
293 {
294 if (pageEnd != null)
295 {
296 int pageNumber = pageNode[0].PageInfo.PageNumber;
297 if (pageNumber > num || (pageNumber == num && i >= idxEnd))
298 {
299 goto IL_00bd;
300 }
301 }
302 if ((object)pageNode[i].LocalName == localName && pageNode[i].NamespaceUri == namespaceName)
303 {
304 break;
305 }
306 continue;
307 }
308 goto IL_00bd;
309 IL_00bd:
310 return false;
311 }
312 }
313 else
314 {
315 i++;
316 while (true)
317 {
318 if (pageNode == pageEnd && i <= idxEnd)
319 {
320 for (; i != idxEnd; i++)
321 {
322 if (pageNode[i].ElementMatch(localName, namespaceName))
323 {
324 goto end_IL_00c3;
325 }
326 }
327 }
328 else
329 {
330 for (; i < pageNode[0].PageInfo.NodeCount; i++)
331 {
332 if (pageNode[i].ElementMatch(localName, namespaceName))
333 {
334 goto end_IL_00c3;
335 }
336 }
337 pageNode = pageNode[0].PageInfo.NextPage;
338 i = 1;
339 if (pageNode != null)
340 {
341 continue;
342 }
343 }
344 return false;
345 continue;
346 end_IL_00c3:
347 break;
348 }
349 }
350 pageCurrent = pageNode;
351 idxCurrent = i;
352 return true;
353 }

References MS.Internal.Xml.Cache.XPathNode.GetSimilarElement(), MS.Internal.Xml.Cache.XPathNode.LocalName, MS.Internal.Xml.Cache.XPathNodePageInfo.NextPage, MS.Internal.Xml.Cache.XPathNodePageInfo.NodeCount, MS.Internal.Xml.Cache.XPathNode.PageInfo, and MS.Internal.Xml.Cache.XPathNodePageInfo.PageNumber.

Referenced by MS.Internal.Xml.Cache.XPathDocumentNavigator.MoveToFollowing().