internal bool HasPointers(XmlNode node)
{
while (true)
{
try
{
if (_pointers.Count > 0)
{
object pointer = null;
foreach (DictionaryEntry entry in _pointers)
{
pointer = entry.Value;
Debug.Assert(pointer != null);
if (((IXmlDataVirtualNode)pointer).IsOnNode(node))
return true;
}
}
return false;
}
catch (Exception e) when (Data.Common.ADP.IsCatchableExceptionType(e))
{
// This can happens only when some threads are creating navigators (thus modifying this.pointers) while other threads are in the foreach loop.
}
}
//should never get to this point due to while (true) loop
}