private void OnNodeInsertedInFragment(XmlNode node)
{
XmlBoundElement be;
if (_mapper.GetRegion(node, out be))
{
if (be == node)
{
Debug.Assert(!IsRowLive(be.Row));
SetNestedParentRegion(be);
}
else
{
ArrayList rowElemList = new ArrayList();
OnNonRowElementInsertedInFragment(node, be, rowElemList);
// Set nested parent for the 1st level subregions (they should already be associated w/ Deleted or Detached rows)
while (rowElemList.Count > 0)
{
Debug.Assert(rowElemList[0] != null && rowElemList[0] is XmlBoundElement);
XmlBoundElement subRowElem = (XmlBoundElement)(rowElemList[0]);
rowElemList.RemoveAt(0);
SetNestedParentRegion(subRowElem, be);
}
}
// Check to make sure all sub-regions are disconnected
AssertNonLiveRows(node);
return;
}
// Nothing to do, since the node belongs to no region
// Check to make sure all sub-regions are disconnected
AssertNonLiveRows(node);
}