Beispiel #1
0
        /// <summary>
        ///     Provides the value associated to this Expression
        /// </summary>
        /// <param name="context">The context on which the value must be found</param>
        /// <param name="explain"></param>
        /// <returns></returns>
        public virtual IValue GetExpressionValue(InterpretationContext context, ExplanationPart explain)
        {
            IValue retVal = null;

            try
            {
                Util.DontNotify(() => { retVal = GetValue(context, explain); });
            }
            catch (Exception e)
            {
                ModelElement modelElement = context.Instance as ModelElement;
                if (modelElement != null)
                {
                    modelElement.AddErrorAndExplain(e.Message, explain);
                }
            }

            return(retVal);
        }