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

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

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

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

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

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