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

◆ InternalIndexOf()

int System.Data.ConstraintCollection.InternalIndexOf ( string constraintName)
inlinepackage

Definition at line 527 of file ConstraintCollection.cs.

528 {
529 int num = -1;
530 if (constraintName != null && 0 < constraintName.Length)
531 {
532 int count = List.Count;
533 int num2 = 0;
534 for (int i = 0; i < count; i++)
535 {
536 Constraint constraint = (Constraint)List[i];
537 switch (NamesEqual(constraint.ConstraintName, constraintName, fCaseSensitive: false, _table.Locale))
538 {
539 case 1:
540 return i;
541 case -1:
542 num = ((num == -1) ? i : (-2));
543 break;
544 }
545 }
546 }
547 return num;
548 }
int NamesEqual(string s1, string s2, bool fCaseSensitive, CultureInfo locale)

References System.Data.ConstraintCollection._table, System.Data.Constraint.ConstraintName, System.count, System.Collections.ArrayList.Count, System.Data.ConstraintCollection.List, System.Data.DataTable.Locale, and System.Data.InternalDataCollectionBase.NamesEqual().

Referenced by System.Data.ConstraintCollection.Contains(), System.Data.ConstraintCollection.Contains(), and System.Data.ConstraintCollection.IndexOf().