public GetTypeParameter ( Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterSymbol pSymbol ) : Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType | ||
pSymbol | Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterSymbol | |
return | Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType |
//////////////////////////////////////////////////////////////////////////////// // Get the standard type variable (eg, !0, !1, or !!0, !!1). // // iv is the index. // pbsm is the containing symbol manager // fMeth designates whether this is a method type var or class type var // // The standard class type variables are useful during emit, but not for type // comparison when binding. The standard method type variables are useful during // binding for signature comparison. public TypeParameterType GetTypeVarSym(int iv, TypeManager pTypeManager, bool fMeth) { Debug.Assert(iv >= 0); TypeParameterType tpt = null; if (iv >= this.prgptvs.Count) { TypeParameterSymbol pTypeParameter = new TypeParameterSymbol(); pTypeParameter.SetIsMethodTypeParameter(fMeth); pTypeParameter.SetIndexInOwnParameters(iv); pTypeParameter.SetIndexInTotalParameters(iv); pTypeParameter.SetAccess(ACCESS.ACC_PRIVATE); tpt = pTypeManager.GetTypeParameter(pTypeParameter); this.prgptvs.Add(tpt); } else { tpt = this.prgptvs[iv]; } Debug.Assert(tpt != null); return(tpt); }
//////////////////////////////////////////////////////////////////////////////// // Get the standard type variable (eg, !0, !1, or !!0, !!1). // // iv is the index. // pbsm is the containing symbol manager // fMeth designates whether this is a method type var or class type var // // The standard class type variables are useful during emit, but not for type // comparison when binding. The standard method type variables are useful during // binding for signature comparison. public TypeParameterType GetTypeVarSym(int iv, TypeManager pTypeManager, bool fMeth) { Debug.Assert(iv >= 0); TypeParameterType tpt = null; if (iv >= this.prgptvs.Count) { TypeParameterSymbol pTypeParameter = new TypeParameterSymbol(); pTypeParameter.SetIsMethodTypeParameter(fMeth); pTypeParameter.SetIndexInOwnParameters(iv); pTypeParameter.SetIndexInTotalParameters(iv); pTypeParameter.SetAccess(ACCESS.ACC_PRIVATE); tpt = pTypeManager.GetTypeParameter(pTypeParameter); this.prgptvs.Add(tpt); } else { tpt = this.prgptvs[iv]; } Debug.Assert(tpt != null); return tpt; }