private void OnNodeChanged(object sender, XmlNodeChangedEventArgs args)
{
if (_ignoreXmlEvents)
return;
bool wasIgnoreDataSetEvents = _ignoreDataSetEvents;
bool wasIgnoreXmlEvents = _ignoreXmlEvents;
bool wasFoliationEnabled = IsFoliationEnabled;
_ignoreDataSetEvents = true;
_ignoreXmlEvents = true;
IsFoliationEnabled = false;
bool fEnableCascading = DataSet._fEnableCascading;
DataSet._fEnableCascading = false;
try
{
// okay to allow text node value changes when bound.
XmlBoundElement rowElement = null;
Debug.Assert(DataSet.EnforceConstraints == false);
if (_mapper.GetRegion(args.Node, out rowElement))
{
SynchronizeRowFromRowElement(rowElement);
}
}
finally
{
_ignoreDataSetEvents = wasIgnoreDataSetEvents;
_ignoreXmlEvents = wasIgnoreXmlEvents;
IsFoliationEnabled = wasFoliationEnabled;
DataSet._fEnableCascading = fEnableCascading;
}
}