DoEvaluate() private static method

private static DoEvaluate ( Object source, VsaEngine engine, bool isUnsafe ) : Object
source Object
engine Microsoft.JScript.Vsa.VsaEngine
isUnsafe bool
return Object
Exemplo n.º 1
0
 public static Object JScriptEvaluate(Object source, VsaEngine engine)
 {
     if (Convert.GetTypeCode(source) != TypeCode.String)
     {
         return(source);
     }
     return(Eval.DoEvaluate(source, engine, true));
 }
Exemplo n.º 2
0
        public static Object JScriptEvaluate(Object source, Object unsafeOption, VsaEngine engine)
        {
            if (Convert.GetTypeCode(source) != TypeCode.String)
            {
                return(source);
            }
            bool isUnsafe = false;

            if (Convert.GetTypeCode(unsafeOption) == TypeCode.String)
            {
                if (((IConvertible)unsafeOption).ToString() == "unsafe")
                {
                    isUnsafe = true;
                }
            }
            return(Eval.DoEvaluate(source, engine, isUnsafe));
        }