Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DefoliateRegion()

void System.Xml.XmlDataDocument.DefoliateRegion ( XmlBoundElement rowElem)
inlineprivate

Definition at line 373 of file XmlDataDocument.cs.

374 {
375 if (!_optimizeStorage || rowElem.ElementState != ElementState.WeakFoliation || !_mapper.IsRegionRadical(rowElem))
376 {
377 return;
378 }
380 IgnoreXmlEvents = true;
381 rowElem.ElementState = ElementState.Defoliating;
382 try
383 {
384 rowElem.RemoveAllAttributes();
385 XmlNode xmlNode = rowElem.FirstChild;
386 while (xmlNode != null)
387 {
388 XmlNode nextSibling = xmlNode.NextSibling;
389 if (xmlNode is XmlBoundElement { Row: not null })
390 {
391 break;
392 }
393 rowElem.RemoveChild(xmlNode);
395 }
396 rowElem.ElementState = ElementState.Defoliated;
397 }
398 finally
399 {
401 }
402 }
bool IsRegionRadical(XmlBoundElement rowElem)

References System.Xml.XmlDataDocument._mapper, System.Xml.XmlDataDocument._optimizeStorage, System.Xml.Dictionary, System.Xml.XmlDataDocument.IgnoreXmlEvents, and System.Xml.DataSetMapper.IsRegionRadical().

Referenced by System.Xml.XmlDataDocument.SyncRows(), and System.Xml.XmlDataDocument.SyncTree().