public TypeReference TypeParameter(string type, int position)
{
for (int i = this.stack.Count - 1; i >= 0; i--)
{
TypeReference typeReference = ImportGenericContext.GenericTypeFor(this.stack[i]);
if (typeReference.FullName == type)
{
return(typeReference.GenericParameters[position]);
}
}
throw new InvalidOperationException();
}