Esempio n. 1
0
        public TypeInfo GenerateTableType(TypeNode node, string name = null)
        {
            var type = Visit(node as dynamic);

            var tableTypeTemplate = types.GetTemplate("List`1");

            return(tableTypeTemplate.Generate(name, type));
        }
Esempio n. 2
0
        private void BuildType(System.Type type)
        {
            if (type.IsGenericType)
            {
                var genericTemplate = storage.GetTemplate(type.Name);

                genericLoader.Build(genericTemplate, type);
            }
            else
            {
                var typeInfo = storage.GetType(type.Name);

                if (type.IsAbstract)
                {
                    packageLoader.Build(typeInfo as PackageType, type);
                }
                else
                {
                    classLoader.Build(typeInfo as ClassType, type);
                }
            }
        }