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

◆ GenerateConstraintNames() [3/3]

void System.Data.XmlTreeGen.GenerateConstraintNames ( DataTable table,
bool fromTable )
inlineprivate

Definition at line 247 of file XmlTreeGen.cs.

248 {
250 foreach (Constraint constraint in table.Constraints)
251 {
252 if (fromTable && constraint is ForeignKeyConstraint && !_tables.Contains(((ForeignKeyConstraint)constraint).RelatedTable))
253 {
254 continue;
255 }
256 int num = 0;
257 string text = constraint.ConstraintName;
259 {
260 if (stringBuilder == null)
261 {
263 }
264 stringBuilder.Append(table.TableName).Append('_').Append(constraint.ConstraintName);
265 if (0 < num)
266 {
267 stringBuilder.Append('_').Append(num);
268 }
269 num++;
270 text = stringBuilder.ToString();
272 }
275 }
276 }
virtual int Add(object? value)
virtual bool Contains(object? item)
readonly ArrayList _tables
Definition XmlTreeGen.cs:26
ArrayList _constraintNames
Definition XmlTreeGen.cs:16

References System.Data.XmlTreeGen._constraintNames, System.Data.XmlTreeGen._tables, System.Collections.ArrayList.Add(), System.Data.Constraint.ConstraintName, System.Collections.ArrayList.Contains(), System.Xml.Dictionary, and System.text.

Referenced by System.Data.XmlTreeGen.GenerateConstraintNames(), System.Data.XmlTreeGen.GenerateConstraintNames(), System.Data.XmlTreeGen.SchemaTree(), and System.Data.XmlTreeGen.SchemaTree().