3 internal class ActivationAttributeStack
5 private object[] activationTypes;
7 private object[] activationAttributes;
11 internal ActivationAttributeStack()
13 activationTypes =
new object[4];
14 activationAttributes =
new object[4];
18 internal void Push(
Type typ,
object[] attr)
20 if (freeIndex == activationTypes.Length)
22 object[] destinationArray =
new object[activationTypes.Length * 2];
23 object[] destinationArray2 =
new object[activationAttributes.Length * 2];
24 Array.
Copy(activationTypes, destinationArray, activationTypes.Length);
25 Array.
Copy(activationAttributes, destinationArray2, activationAttributes.Length);
26 activationTypes = destinationArray;
27 activationAttributes = destinationArray2;
29 activationTypes[freeIndex] = typ;
30 activationAttributes[freeIndex] = attr;
34 internal object[] Peek(
Type typ)
36 if (freeIndex == 0 || activationTypes[freeIndex - 1] != typ)
40 return (
object[])activationAttributes[freeIndex - 1];
43 internal void Pop(
Type typ)
45 if (freeIndex != 0 && activationTypes[freeIndex - 1] == typ)
48 activationTypes[freeIndex] =
null;
49 activationAttributes[freeIndex] =
null;
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents type declarations: class types, interface types, array types, value types,...
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 ...