11 [global::__DynamicallyInvokable]
14 private T[] _rules =
new T[0];
16 private readonly
object cacheLock =
new object();
18 private const int MaxRules = 128;
20 private const int InsertPosition = 64;
26 internal T[] GetRules()
31 internal void MoveRule(
T rule,
int i)
35 int num = _rules.Length - i;
41 int num3 =
Math.
Min(_rules.Length, i + num);
42 for (
int j = i; j < num3; j++)
44 if (_rules[j] == rule)
53 _rules[num2] = _rules[num2 - 1];
54 _rules[num2 - 1] = _rules[num2 - 2];
55 _rules[num2 - 2] = val;
60 internal void AddRule(
T newRule)
64 _rules = AddOrInsert(_rules, newRule);
68 internal void ReplaceRule(
T oldRule,
T newRule)
72 int num =
Array.IndexOf(_rules, oldRule);
75 _rules[num] = newRule;
79 _rules = AddOrInsert(_rules, newRule);
84 private static T[] AddOrInsert(
T[] rules,
T item)
86 if (rules.Length < 64)
88 return rules.AddLast(item);
90 int num = rules.Length + 1;
103 Array.
Copy(rules, 64, array, 65, num - 64 - 1);
Represents a cache of runtime binding rules.
EditorBrowsableState
Specifies the browsable state of a property or method from within an editor.
static sbyte Min(sbyte val1, sbyte val2)
Returns the smaller of two 8-bit signed integers.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
Provides constants and static methods for trigonometric, logarithmic, and other common mathematical f...