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

◆ IsSelfRelatedDataTable()

bool System.Xml.XmlDataDocument.IsSelfRelatedDataTable ( DataTable rootTable)
inlineprivate

Definition at line 2430 of file XmlDataDocument.cs.

2431 {
2433 bool flag = false;
2434 foreach (DataRelation childRelation in rootTable.ChildRelations)
2435 {
2436 DataTable childTable = childRelation.ChildTable;
2437 if (childTable == rootTable)
2438 {
2439 flag = true;
2440 break;
2441 }
2442 if (!list.Contains(childTable))
2443 {
2444 list.Add(childTable);
2445 }
2446 }
2447 if (!flag)
2448 {
2449 for (int i = 0; i < list.Count; i++)
2450 {
2451 foreach (DataRelation childRelation2 in list[i].ChildRelations)
2452 {
2454 if (childTable2 == rootTable)
2455 {
2456 flag = true;
2457 break;
2458 }
2459 if (!list.Contains(childTable2))
2460 {
2461 list.Add(childTable2);
2462 }
2463 }
2464 if (flag)
2465 {
2466 break;
2467 }
2468 }
2469 }
2470 return flag;
2471 }

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, and System.list.

Referenced by System.Xml.XmlDataDocument.OrderTables().