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

◆ SynchronizeRowFromRowElementEx()

void System.Xml.XmlDataDocument.SynchronizeRowFromRowElementEx ( XmlBoundElement rowElement,
ArrayList rowElemList )
inlineprivate

Definition at line 1972 of file XmlDataDocument.cs.

1973 {
1974 DataRow row = rowElement.Row;
1975 Hashtable hashtable = new Hashtable();
1976 string empty = string.Empty;
1977 RegionIterator regionIterator = new RegionIterator(rowElement);
1979 bool flag;
1980 if (textOnlyColumn != null)
1981 {
1982 hashtable[textOnlyColumn] = textOnlyColumn;
1983 flag = regionIterator.NextInitialTextLikeNodes(out var value);
1984 if (value.Length == 0 && ((empty = rowElement.GetAttribute("xsi:nil")) == "1" || empty == "true"))
1985 {
1986 row[textOnlyColumn] = DBNull.Value;
1987 }
1988 else
1989 {
1991 }
1992 }
1993 else
1994 {
1995 flag = regionIterator.Next();
1996 }
1997 while (flag)
1998 {
1999 if (!(regionIterator.CurrentNode is XmlElement xmlElement))
2000 {
2001 flag = regionIterator.Next();
2002 continue;
2003 }
2004 if (xmlElement is XmlBoundElement { Row: not null })
2005 {
2007 flag = regionIterator.NextRight();
2008 continue;
2009 }
2011 if (columnSchemaForNode != null && hashtable[columnSchemaForNode] == null)
2012 {
2014 flag = regionIterator.NextInitialTextLikeNodes(out var value2);
2015 if (value2.Length == 0 && ((empty = xmlElement.GetAttribute("xsi:nil")) == "1" || empty == "true"))
2016 {
2018 }
2019 else
2020 {
2022 }
2023 }
2024 else
2025 {
2026 flag = regionIterator.Next();
2027 }
2028 }
2029 foreach (XmlAttribute attribute in rowElement.Attributes)
2030 {
2032 if (columnSchemaForNode2 != null && hashtable[columnSchemaForNode2] == null)
2033 {
2036 }
2037 }
2038 foreach (DataColumn column in row.Table.Columns)
2039 {
2040 if (hashtable[column] == null && !IsNotMapped(column))
2041 {
2042 if (!column.AutoIncrement)
2043 {
2045 }
2046 else
2047 {
2048 column.Init(row._tempRecord);
2049 }
2050 }
2051 }
2052 }
void Add(TKey key, TValue value)
DataColumn GetColumnSchemaForNode(XmlBoundElement rowElem, XmlNode node)
DataColumn GetTextOnlyColumn(DataRow row)
bool IsNotMapped(DataColumn c)
static void SetRowValueFromXmlText(DataRow row, DataColumn col, string xmlText)
static void SetRowValueToNull(DataRow row, DataColumn col)

References System.Xml.XmlDataDocument._mapper, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, System.Xml.DataSetMapper.GetColumnSchemaForNode(), System.Xml.XmlDataDocument.GetTextOnlyColumn(), System.Xml.XmlDataDocument.IsNotMapped(), System.Xml.XmlDataDocument.SetRowValueFromXmlText(), System.Xml.XmlDataDocument.SetRowValueToNull(), System.DBNull.Value, and System.value.

Referenced by System.Xml.XmlDataDocument.OnNonRowElementInsertedInFragment(), and System.Xml.XmlDataDocument.SynchronizeRowFromRowElement().