Microsoft.CSharp.RuntimeBinder.SymbolTable.GetConstructedType C# (CSharp) Méthode

GetConstructedType() private méthode

private GetConstructedType ( Type type, AggregateSymbol agg ) : CType
type System.Type
agg Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol
Résultat Microsoft.CSharp.RuntimeBinder.Semantics.CType
        private CType GetConstructedType(Type type, AggregateSymbol agg)
        {
            // We've found the one we want, so return it.
            if (type.GetTypeInfo().IsGenericType)
            {
                // If we're a generic type, then we need to add the type arguments.
                List<CType> types = new List<CType>();

                foreach (Type argument in type.GetGenericArguments())
                {
                    types.Add(GetCTypeFromType(argument));
                }

                TypeArray typeArray = _bsymmgr.AllocParams(types.ToArray());
                AggregateType aggType = _typeManager.GetAggregate(agg, typeArray);
                return aggType;
            }
            CType ctype = agg.getThisType();
            return ctype;
        }