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

◆ BuildIdentityMap() [3/4]

void System.Data.XmlToDatasetMap.BuildIdentityMap ( XmlNameTable nameTable,
DataSet dataSet )
inlineprivate

Definition at line 231 of file XmlToDatasetMap.cs.

232 {
233 _tableSchemaMap = new XmlNodeIdHashtable(dataSet.Tables.Count);
234 string text = nameTable.Get(dataSet.Namespace);
235 if (text == null)
236 {
237 text = nameTable.Add(dataSet.Namespace);
238 }
240 foreach (DataTable table in dataSet.Tables)
241 {
242 TableSchemaInfo tableSchemaInfo = AddTableSchema(nameTable, table);
243 if (tableSchemaInfo == null)
244 {
245 continue;
246 }
247 foreach (DataColumn column in table.Columns)
248 {
250 {
252 }
253 }
254 foreach (DataRelation childRelation in table.ChildRelations)
255 {
256 if (childRelation.Nested)
257 {
258 string array = XmlConvert.EncodeLocalName(childRelation.ChildTable.TableName);
259 string text2 = nameTable.Get(array);
260 if (text2 == null)
261 {
262 text2 = nameTable.Add(array);
263 }
264 string text3 = nameTable.Get(childRelation.ChildTable.Namespace);
265 if (text3 == null)
266 {
267 text3 = nameTable.Add(childRelation.ChildTable.Namespace);
268 }
269 XmlNodeIdentety key = new XmlNodeIdentety(text2, text3);
270 tableSchemaInfo.ColumnsSchemaMap[key] = childRelation.ChildTable;
271 }
272 }
273 }
274 }
bool AddColumnSchema(DataColumn col, XmlNameTable nameTable, XmlNodeIdHashtable columns)
XmlNodeIdHashtable _tableSchemaMap
static bool IsMappedColumn(DataColumn c)
TableSchemaInfo AddTableSchema(DataTable table, XmlNameTable nameTable)
static ? string EncodeLocalName(string? name)
Definition XmlConvert.cs:49

References System.Data.XmlToDatasetMap._tableSchemaMap, System.Data.XmlToDatasetMap.AddColumnSchema(), System.Data.XmlToDatasetMap.AddTableSchema(), System.array, System.Data.DataTable.ChildRelations, System.Data.DataTable.Columns, System.Xml.Dictionary, System.Xml.XmlConvert.EncodeLocalName(), System.Data.XmlToDatasetMap.IsMappedColumn(), System.key, and System.text.