Пример #1
0
        public Ex FindReference <T>(string name)
        {
            var t = typeof(T);

            if (t == tfloat)
            {
                if (name == "i")
                {
                    return(i_float);
                }
                else if (name == "pi")
                {
                    return(pi_float);
                }
                else
                {
                    return(fs.DictSafeGet(ExC(name), $"No float exists by name {name}."));
                }
            }
            if (t == tv2)
            {
                return(v2s.DictSafeGet(ExC(name), $"No v2 exists by name {name}."));
            }
            if (t == tv3)
            {
                return(v3s.DictSafeGet(ExC(name), $"No v3 exists by name {name}."));
            }
            if (t == tvrv2)
            {
                return(rv2s.DictSafeGet(ExC(name), $"No V2RV2 exists by name {name}."));
            }
            throw new Exception($"No handling in GenCtx for type {Reflector.NameType(t)}");
        }