/// <summary>
        /// Computes the changes related to this event
        /// </summary>
        /// <param name="apply">Indicates that the changes should be applied directly</param>
        public override bool ComputeChanges(bool apply)
        {
            bool retVal = base.ComputeChanges(apply);

            if (retVal)
            {
                Explanation         = new Interpreter.ExplanationPart(Action);
                Explanation.Message = "Action " + Action.Name;
                Interpreter.InterpretationContext context = new Interpreter.InterpretationContext(Instance);
                Changes = new ChangeList();
                Action.GetChanges(context, Changes, Explanation, apply);
                Changes.CheckChanges(Action);
                Message = Explanation.ToString();
            }

            return(retVal);
        }
示例#2
0
        /// <summary>
        ///     Computes the changes related to this event
        /// </summary>
        /// <param name="apply">Indicates that the changes should be applied directly</param>
        /// <param name="runner"></param>
        public override bool ComputeChanges(bool apply, Runner runner)
        {
            bool retVal = base.ComputeChanges(apply, runner);

            if (retVal)
            {
                if (runner.Explain)
                {
                    Explanation = new ExplanationPart(Action, "Action ", Action);
                }

                InterpretationContext context = new InterpretationContext(Instance);
                Changes = new ChangeList();
                Action.GetChanges(context, Changes, Explanation, apply, runner);
                Changes.CheckChanges(Action);
            }

            return(retVal);
        }