DoEvaluate() приватный статический Метод

private static DoEvaluate ( Object source, VsaEngine engine, bool isUnsafe ) : Object
source Object
engine Microsoft.JScript.Vsa.VsaEngine
isUnsafe bool
Результат Object
Пример #1
0
 public static Object JScriptEvaluate(Object source, VsaEngine engine)
 {
     if (Convert.GetTypeCode(source) != TypeCode.String)
     {
         return(source);
     }
     return(Eval.DoEvaluate(source, engine, true));
 }
Пример #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));
        }