Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ AddRelation()

void System.Data.ProviderBase.SchemaMapping.AddRelation ( DataColumn parentChapterColumn,
DataColumn chapterColumn )
inlineprivate

Definition at line 1011 of file SchemaMapping.cs.

1012 {
1013 if (_dataSet != null)
1014 {
1015 string columnName = chapterColumn.ColumnName;
1016 DataRelation dataRelation = new DataRelation(columnName, new DataColumn[1] { parentChapterColumn }, new DataColumn[1] { chapterColumn }, createConstraints: false);
1017 int num = 1;
1018 string relationName = columnName;
1019 DataRelationCollection relations = _dataSet.Relations;
1020 while (-1 != relations.IndexOf(relationName))
1021 {
1022 relationName = columnName + num;
1023 num++;
1024 }
1027 }
1028 }
void Add(TKey key, TValue value)
DataRelationCollection Relations
Definition DataSet.cs:393

References System.Data.ProviderBase.SchemaMapping._dataSet, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, and System.Data.DataSet.Relations.

Referenced by System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo(), and System.Data.ProviderBase.SchemaMapping.SetupSchemaWithoutKeyInfo().