private void OnFoliated(XmlNode node)
{
while (true)
{
try
{
if (_pointers.Count > 0)
{
foreach (DictionaryEntry entry in _pointers)
{
object pointer = entry.Value;
Debug.Assert(pointer != null);
((IXmlDataVirtualNode)pointer).OnFoliated(node);
}
}
return;
}
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.
// Solution is to re-try OnFoliated.
}
}
// You should never get here in regular cases
}