Exemple #1
0
        internal RedwoodType GetIndicatedType()
        {
            RedwoodType knownType =
                TypeName.Constant ?
                TypeName.EvaluateConstant() as RedwoodType :
                null;

            if (GenericInnerTypes == null)
            {
                return(knownType);
            }
            else if (knownType.CSharpType == null)
            {
                // TODO: Just compile dynamic checks where necessary?
                throw new NotImplementedException();
            }
            else
            {
                knownType.CSharpType.MakeGenericType(
                    GenericInnerTypes.Select(typeSyntax =>
                {
                    RedwoodType genericType = typeSyntax.GetIndicatedType();
                    // TODO?
                    if (genericType == null)
                    {
                        return(typeof(object));
                    }
                    // Definitely TODO... I guess this will just happen
                    // with dynamic checks everywhere?
                    if (genericType.CSharpType == null)
                    {
                        return(typeof(RedwoodObject));
                    }
                    return(genericType.CSharpType);
                }).ToArray()
                    );
                throw new NotImplementedException();
            }
        }