/// <summary> /// Evaluates the expression /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public DynValue Evaluate(ScriptExecutionContext context = null) { context = context ?? OwnerScript.CreateDynamicExecutionContext(); this.CheckScriptOwnership(context.GetScript()); if (m_Constant != null) return m_Constant; return m_Exp.Eval(context); }
/// <summary> /// Evaluates the expression /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public DynValue Evaluate(ScriptExecutionContext context) { this.CheckScriptOwnership(context.GetScript()); if (m_Constant.IsValid) { return(m_Constant); } return(m_Exp.Eval(context)); }
/// <summary> /// Evaluates the expression /// </summary> /// <param name="context">The context.</param> /// <returns></returns> public DynValue Evaluate(ScriptExecutionContext context = null) { context = context ?? OwnerScript.CreateDynamicExecutionContext(); if (m_Constant != null) { return(m_Constant); } return(m_Exp.Eval(context)); }
/// <summary> /// Evaluates the expression /// </summary> /// <param name="context">The context.</param> public DynValue Evaluate(ScriptExecutionContext context = null) { context ??= this.OwnerScript.CreateDynamicExecutionContext(ExecutionControlToken.Dummy); this.CheckScriptOwnership(context.GetScript()); if (_constant != null) { return(_constant); } return(_exp.Eval(context)); }