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

◆ RegisterName()

void System.Data.ConstraintCollection.RegisterName ( string name)
inlinepackage

Definition at line 564 of file ConstraintCollection.cs.

565 {
566 int count = List.Count;
567 for (int i = 0; i < count; i++)
568 {
569 if (NamesEqual(name, ((Constraint)List[i]).ConstraintName, fCaseSensitive: true, _table.Locale) != 0)
570 {
571 throw ExceptionBuilder.DuplicateConstraintName(((Constraint)List[i]).ConstraintName);
572 }
573 }
574 if (NamesEqual(name, MakeName(_defaultNameIndex), fCaseSensitive: true, _table.Locale) != 0)
575 {
577 }
578 }
int NamesEqual(string s1, string s2, bool fCaseSensitive, CultureInfo locale)

References System.Data.ConstraintCollection._defaultNameIndex, System.Data.ConstraintCollection._table, System.count, System.Collections.ArrayList.Count, System.Data.ExceptionBuilder.DuplicateConstraintName(), System.Data.ConstraintCollection.List, System.Data.DataTable.Locale, System.Data.ConstraintCollection.MakeName(), and System.Data.InternalDataCollectionBase.NamesEqual().

Referenced by System.Data.ConstraintCollection.Add(), and System.Data.ConstraintCollection.BaseAdd().