Mono.Cecil.ImportGenericContext.Pop C# (CSharp) Method

Pop() public method

public Pop ( ) : void
return void
        public void Pop()
        {
            stack.RemoveAt (stack.Count - 1);
        }

Usage Example

Esempio n. 1
0
        private TypeReference ImportGenericInstance(Type type, ImportGenericContext context)
        {
            TypeReference       reference2;
            TypeReference       reference = this.ImportType(type.GetGenericTypeDefinition(), context, ImportGenericKind.Definition);
            GenericInstanceType type2     = new GenericInstanceType(reference);

            Type[] genericArguments = type.GetGenericArguments();
            Collection <TypeReference> collection = type2.GenericArguments;

            context.Push(reference);
            try
            {
                int index = 0;
                while (true)
                {
                    if (index >= genericArguments.Length)
                    {
                        reference2 = type2;
                        break;
                    }
                    collection.Add(this.ImportType(genericArguments[index], context));
                    index++;
                }
            }
            finally
            {
                context.Pop();
            }
            return(reference2);
        }
All Usage Examples Of Mono.Cecil.ImportGenericContext::Pop