Example #1
0
        private Experssion GetExper(DbElement gEle, DbAttribute attr)
        {
            Dictionary <string, Experssion> map = null;

            if (!experMap.TryGetValue(attr, out map))
            {
                map = new Dictionary <string, Experssion>();
                experMap.Add(attr, map);
            }

            Experssion exper = null;

            if (!map.TryGetValue(gEle.GetAsString(DbAttributeInstance.NAME), out exper))
            {
                exper = new Experssion(gEle.GetAsString(attr));
                map.Add(gEle.GetAsString(DbAttributeInstance.NAME), exper);
            }

            return(exper);
        }
Example #2
0
        private static double EvalDouble(string strExper, DbElement modelEle)
        {
            Experssion exper = new Experssion(strExper);

            return(exper.Eval(modelEle));
        }