예제 #1
0
        private string GenericType(GenericClassType type)
        {
            string prefix = names[type.RealName];

            prefix += "<" + Convert(type.ItemsType[0]);

            for (int i = 1; i < type.ItemsType.Length; i++)
            {
                prefix += ", " + Convert(type.ItemsType[i]);
            }

            prefix += ">";

            return(prefix);
        }
예제 #2
0
        public TypeInfo Generate(string typeName, params TypeInfo[] types)
        {
            if (typeName == null)
            {
                typeName = Name;
                foreach (var item in types)
                {
                    typeName += item.Name;
                }
            }


            var res = new GenericClassType(Name, typeName, types);

            foreach (var item in Methods)
            {
                res.AddMethod(BuildMethod(item, types, res));
            }

            return(res);
        }