Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSepideh Khoshnood <sekho@microsoft.com>2017-03-10 09:46:37 +0300
committerDan Moseley <danmose@microsoft.com>2017-03-10 09:46:37 +0300
commitd24669c752d4127c1566d7c46457d551edff3bde (patch)
treefaef650b4add36de12b421be9d3135bcf4df71f6 /src/System.Private.Xml.Linq
parentd1e8639de77c0039d19be31835b653f21c7d46bd (diff)
Fix XPathEvaluate bug on XNode (#16885)
* Fix XPathEvaluate bug on XNode * Remove usage of internal member
Diffstat (limited to 'src/System.Private.Xml.Linq')
-rw-r--r--src/System.Private.Xml.Linq/src/System/Xml/XPath/XNodeNavigator.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/System.Private.Xml.Linq/src/System/Xml/XPath/XNodeNavigator.cs b/src/System.Private.Xml.Linq/src/System/Xml/XPath/XNodeNavigator.cs
index 6061e60151..7abd8ea21d 100644
--- a/src/System.Private.Xml.Linq/src/System/Xml/XPath/XNodeNavigator.cs
+++ b/src/System.Private.Xml.Linq/src/System/Xml/XPath/XNodeNavigator.cs
@@ -878,12 +878,12 @@ namespace System.Xml.XPath
XText t = r as XText;
if (t != null && t.GetParent() != null)
{
- foreach (XNode node in t.GetParent().Nodes())
+ do
{
- t = node as XText;
+ t = t.NextNode as XText;
if (t == null) break;
yield return (T)(object)t;
- }
+ } while (t != t.GetParent().LastNode);
}
}
}