Example #1
0
        static public object EvaluateToObject(string code)
        {
            UtilEvaluator eval = new UtilEvaluator(typeof(object), code, staticMethodName);

            return(eval.Evaluate(staticMethodName));
        }
Example #2
0
        static public bool EvaluateToBool(string code)
        {
            UtilEvaluator eval = new UtilEvaluator(typeof(bool), code, staticMethodName);

            return((bool)eval.Evaluate(staticMethodName));
        }
Example #3
0
        static public double EvaluateToDouble(string code)
        {
            UtilEvaluator eval = new UtilEvaluator(typeof(double), code, staticMethodName);

            return((double)eval.Evaluate(staticMethodName));
        }
Example #4
0
        static public string EvaluateToString(string code)
        {
            UtilEvaluator eval = new UtilEvaluator(typeof(string), code, staticMethodName);

            return((string)eval.Evaluate(staticMethodName));
        }
Example #5
0
        static public int EvaluateToInteger(string code)
        {
            UtilEvaluator eval = new UtilEvaluator(typeof(int), code, staticMethodName);

            return((int)eval.Evaluate(staticMethodName));
        }