public GetStdMethTypeVar ( int iv ) : Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType | ||
iv | int | |
return | Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType |
private static CType LoadTypeFromSignature(int[] signature, ref int indexIntoSignatures, TypeArray classTyVars) { Debug.Assert(signature != null); MethodSignatureEnum current = (MethodSignatureEnum)signature[indexIntoSignatures]; indexIntoSignatures++; switch (current) { case MethodSignatureEnum.SIG_SZ_ARRAY: return(TypeManager.GetArray(LoadTypeFromSignature(signature, ref indexIntoSignatures, classTyVars), 1, true)); case MethodSignatureEnum.SIG_METH_TYVAR: return(TypeManager.GetStdMethTypeVar(signature[indexIntoSignatures++])); case MethodSignatureEnum.SIG_CLASS_TYVAR: return(classTyVars[signature[indexIntoSignatures++]]); case (MethodSignatureEnum)PredefinedType.PT_VOID: return(VoidType.Instance); default: Debug.Assert(current >= 0 && (int)current < (int)PredefinedType.PT_COUNT); AggregateSymbol agg = GetPredefAgg((PredefinedType)current); int typeCount = agg.GetTypeVars().Count; if (typeCount == 0) { return(TypeManager.GetAggregate(agg, TypeArray.Empty)); } CType[] typeArgs = new CType[typeCount]; for (int iTypeArg = 0; iTypeArg < typeArgs.Length; iTypeArg++) { typeArgs[iTypeArg] = LoadTypeFromSignature(signature, ref indexIntoSignatures, classTyVars); } return(TypeManager.GetAggregate(agg, TypeArray.Allocate(typeArgs))); } }