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

◆ AssignNameSlots()

void System.Text.RegularExpressions.RegexParser.AssignNameSlots ( )
inlineprivate

Definition at line 1634 of file RegexParser.cs.

1635 {
1636 if (_capnames != null)
1637 {
1638 for (int i = 0; i < _capnamelist.Count; i++)
1639 {
1640 while (IsCaptureSlot(_autocap))
1641 {
1642 _autocap++;
1643 }
1644 string key = _capnamelist[i];
1645 int pos = (int)_capnames[key];
1648 _autocap++;
1649 }
1650 }
1651 if (_capcount < _captop)
1652 {
1653 _capnumlist = new int[_capcount];
1654 int num = 0;
1656 while (enumerator.MoveNext())
1657 {
1658 _capnumlist[num++] = (int)enumerator.Key;
1659 }
1660 Array.Sort(_capnumlist);
1661 }
1662 if (_capnames == null && _capnumlist == null)
1663 {
1664 return;
1665 }
1666 int num2 = 0;
1668 int num3;
1669 if (_capnames == null)
1670 {
1671 list = null;
1672 _capnames = new Hashtable();
1673 _capnamelist = new List<string>();
1674 num3 = -1;
1675 }
1676 else
1677 {
1679 _capnamelist = new List<string>();
1680 num3 = (int)_capnames[list[0]];
1681 }
1682 for (int j = 0; j < _capcount; j++)
1683 {
1684 int num4 = ((_capnumlist == null) ? j : _capnumlist[j]);
1685 if (num3 == num4)
1686 {
1688 num3 = ((num2 == list.Count) ? (-1) : ((int)_capnames[list[num2]]));
1689 }
1690 else
1691 {
1692 string text = num4.ToString(_culture);
1694 _capnames[text] = num4;
1695 }
1696 }
1697 }
IEnumerator IEnumerable. GetEnumerator()
Definition Hashtable.cs:899

References System.Text.RegularExpressions.RegexParser._autocap, System.Text.RegularExpressions.RegexParser._capcount, System.Text.RegularExpressions.RegexParser._capnamelist, System.Text.RegularExpressions.RegexParser._capnames, System.Text.RegularExpressions.RegexParser._capnumlist, System.Text.RegularExpressions.RegexParser._caps, System.Text.RegularExpressions.RegexParser._captop, System.Text.RegularExpressions.RegexParser._culture, System.Collections.Generic.List< T >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Collections.Generic.List< T >.Count, System.Collections.Hashtable.GetEnumerator(), System.Text.RegularExpressions.i, System.Text.RegularExpressions.RegexParser.IsCaptureSlot(), System.key, System.list, System.Text.RegularExpressions.RegexParser.NoteCaptureSlot(), System.Array.Sort(), and System.text.

Referenced by System.Text.RegularExpressions.RegexParser.CountCaptures().