Exemple #1
0
        protected override bool InnerHasVariable(string variableName)
        {
            bool result = _jsEngine.HasGlobalValue(variableName);

            if (result)
            {
                object value = _jsEngine.GetGlobalValue(variableName);
                result = (value.ToString() != "undefined");
            }

            return(result);
        }
        protected override bool InnerHasVariable(string variableName)
        {
            bool result;

            lock (_executionSynchronizer)
            {
                result = _jsEngine.HasGlobalValue(variableName);
                if (result)
                {
                    object value = _jsEngine.GetGlobalValue(variableName);
                    result = value.ToString() != "undefined";
                }
            }

            return(result);
        }