CreateTypeParameter() public method

public CreateTypeParameter ( Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterSymbol pSymbol ) : Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType
pSymbol Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterSymbol
return Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType
Exemplo n.º 1
0
        public TypeParameterType GetTypeParameter(TypeParameterSymbol pSymbol)
        {
            // These guys should be singletons for each.

            TypeParameterType pTypeParameter = _typeTable.LookupTypeParameter(pSymbol);

            if (pTypeParameter == null)
            {
                pTypeParameter = _typeFactory.CreateTypeParameter(pSymbol);
                _typeTable.InsertTypeParameter(pSymbol, pTypeParameter);
            }

            return(pTypeParameter);
        }
Exemplo n.º 2
0
 // These are singletons for each.
 public TypeParameterType GetTypeParameter(TypeParameterSymbol pSymbol)
 {
     Debug.Assert(pSymbol.GetTypeParameterType() == null); // Should have been checked first before creating
     return(_typeFactory.CreateTypeParameter(pSymbol));
 }