Ejemplo n.º 1
0
        /// <summary>
        /// Indicates whether the expression is based on a placeholder value, ommiting the parameter provided
        /// </summary>
        /// <param name="context">The current interpretation context</param>
        /// <param name="expression">The expression to evaluate</param>
        /// <returns></returns>
        private bool ExpressionBasedOnPlaceHolder(Interpreter.InterpretationContext context, Interpreter.BinaryExpression expression)
        {
            bool retVal = false;

            if (expression != null)
            {
                foreach (Types.ITypedElement element in expression.GetRightSides())
                {
                    Parameter parameter = element as Parameter;
                    if (parameter != null)
                    {
                        Variables.IVariable variable = context.findOnStack(parameter);
                        if (variable != null)
                        {
                            Values.PlaceHolder placeHolder = variable.Value as Values.PlaceHolder;

                            if (placeHolder != null)
                            {
                                retVal = true;
                                break;
                            }
                        }
                    }
                }
            }

            return retVal;
        }