예제 #1
0
        public LinkedCode(string declarations, string valueExpression, TypeCode[] types, TypeCode mainType)
        {
            Declarations = declarations??"";
            ValueExpression = valueExpression??"";
            Types = types;

            CacheKey = mainType.UsingsAndCode + string.Join ("", types.Select (x => x.UsingsAndCode));
        }
예제 #2
0
        public static TypeCode Get(string name)
        {
            var key = name;
            TypeCode ci;
            if (infos.TryGetValue (key, out ci)) {
                return ci;
            }

            ci = new TypeCode {
                Name = name,
            };
            infos [key] = ci;
            return ci;
        }