/// <summary>
        /// Evaluate the given JScript expression, returning the evaluation result
        /// as a string.
        /// </summary>
        /// <param name="expr">JScript expression</param>
        /// <exception cref="EvaluationException"/>
        /// <returns></returns>
        public string EvalExprAsString(string expr)
        {
            string str;

            try
            {
                object obj2  = Evaluator.EvalToObject(expr);
                var    dummy = obj2 as IEnumerable;
                if (!(obj2 is string) && (dummy != null))
                {
                    var builder = new StringBuilder();
                    foreach (object obj3 in dummy)
                    {
                        builder.Append(obj3);
                    }
                    return(builder.ToString());
                }
                str = obj2.ToString();
            }
            catch (Exception exception)
            {
                throw EvaluationException.CreateException(expr, exception);
            }
            return(str);
        }
        /// <summary>
        /// Evaluates the given boolean JScript.NET expression, returns the result.
        /// </summary>
        /// <returns>comparison evaluation</returns>
        public bool EvalBool(string expr)
        {
            bool flag;

            try
            {
                flag = Evaluator.EvalToType <bool>(expr);
            }
            catch (Exception exception)
            {
                throw EvaluationException.CreateException(expr, exception);
            }
            return(flag);
        }
        /// <summary>
        /// Evaluate the given JScript.NET expression, return the result
        /// as a text node.
        /// </summary>
        /// <param name="expr"></param>
        /// <returns></returns>
        public IEnumerable <XNode> EvalExpr(string expr)
        {
            IEnumerable <XNode> iterator;

            try
            {
                object obj2  = Evaluator.EvalToObject(expr);
                var    dummy = obj2 as IEnumerable;
                if (!(obj2 is string) && (dummy != null))
                {
                    return(_GetAsNodeSet(dummy));
                }
                iterator = _GetAsNodeSet(new[] { obj2.ToString() });
            }
            catch (EvaluationException)
            {
                throw;
            }
            catch (Exception exception)
            {
                throw EvaluationException.CreateException(expr, exception);
            }
            return(iterator);
        }