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

◆ ProcessErrors() [1/2]

void System.Data.XMLDiffLoader.ProcessErrors ( ArrayList dt,
XmlReader ssync )
inlinepackage

Definition at line 188 of file XMLDiffLoader.cs.

189 {
190 int depth = ssync.Depth;
191 ssync.Read();
192 while (depth < ssync.Depth)
193 {
194 DataTable table = GetTable(XmlConvert.DecodeName(ssync.LocalName), ssync.NamespaceURI);
195 if (table == null)
196 {
197 throw ExceptionBuilder.DiffgramMissingSQL();
198 }
199 string attribute = ssync.GetAttribute("id", "urn:schemas-microsoft-com:xml-diffgram-v1");
200 DataRow dataRow = (DataRow)table.RowDiffId[attribute];
201 if (dataRow == null)
202 {
203 for (int i = 0; i < dt.Count; i++)
204 {
205 dataRow = (DataRow)((DataTable)dt[i]).RowDiffId[attribute];
206 if (dataRow != null)
207 {
208 table = dataRow.Table;
209 break;
210 }
211 }
212 }
213 string attribute2 = ssync.GetAttribute("Error", "urn:schemas-microsoft-com:xml-diffgram-v1");
214 if (attribute2 != null)
215 {
217 }
218 int depth2 = ssync.Depth;
219 ssync.Read();
220 while (depth2 < ssync.Depth)
221 {
222 if (XmlNodeType.Element == ssync.NodeType)
223 {
224 DataColumn column = table.Columns[XmlConvert.DecodeName(ssync.LocalName), ssync.NamespaceURI];
225 string attribute3 = ssync.GetAttribute("Error", "urn:schemas-microsoft-com:xml-diffgram-v1");
226 dataRow.SetColumnError(column, attribute3);
227 }
228 ssync.Read();
229 }
230 while (ssync.NodeType == XmlNodeType.EndElement && depth < ssync.Depth)
231 {
232 ssync.Read();
233 }
234 }
235 }
DataTable GetTable(string tableName, string ns)
static ? string DecodeName(string? name)
Definition XmlConvert.cs:55

References System.Data.DataTable.Columns, System.Xml.XmlConvert.DecodeName(), System.Xml.Dictionary, System.Data.ExceptionBuilder.DiffgramMissingSQL(), System.Data.XMLDiffLoader.GetTable(), and System.Data.DataTable.RowDiffId.