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

◆ ProcessDiffs() [2/2]

void System.Data.XMLDiffLoader.ProcessDiffs ( DataSet ds,
XmlReader ssync )
inlinepackage

Definition at line 66 of file XMLDiffLoader.cs.

67 {
68 int pos = -1;
69 int depth = ssync.Depth;
70 ssync.Read();
72 while (depth < ssync.Depth)
73 {
74 DataTable table = null;
75 string text = null;
76 int num = -1;
77 text = ssync.GetAttribute("id", "urn:schemas-microsoft-com:xml-diffgram-v1");
78 bool flag = ssync.GetAttribute("hasErrors", "urn:schemas-microsoft-com:xml-diffgram-v1") == "true";
79 num = ReadOldRowData(ds, ref table, ref pos, ssync);
80 if (num == -1)
81 {
82 continue;
83 }
84 if (table == null)
85 {
86 throw ExceptionBuilder.DiffgramMissingSQL();
87 }
88 DataRow dataRow = (DataRow)table.RowDiffId[text];
89 if (dataRow != null)
90 {
92 table._recordManager[num] = dataRow;
93 continue;
94 }
95 dataRow = table.NewEmptyRow();
96 table._recordManager[num] = dataRow;
99 table.Rows.DiffInsertAt(dataRow, pos);
100 dataRow.Delete();
101 if (flag)
102 {
103 table.RowDiffId[text] = dataRow;
104 }
105 }
106 }
int ReadOldRowData(DataSet ds, ref DataTable table, ref int pos, XmlReader row)
void SkipWhitespaces(XmlReader reader)

References System.Data.DataTable._recordManager, System.Xml.Dictionary, System.Data.ExceptionBuilder.DiffgramMissingSQL(), System.Data.DataRowCollection.DiffInsertAt(), System.Data.DataTable.NewEmptyRow(), System.Data.XMLDiffLoader.ReadOldRowData(), System.Data.DataTable.RowDiffId, System.Data.DataTable.Rows, System.Data.XMLDiffLoader.SkipWhitespaces(), and System.text.

Referenced by System.Data.XMLDiffLoader.LoadDiffGram(), and System.Data.XMLDiffLoader.LoadDiffGram().