예제 #1
0
        /// <summary>
        ///     Activates the rules in the dictionary until stabilisation
        /// </summary>
        public void Cycle()
        {
            CurrentPriority = null;

            LastActivationTime = Time;

            Utils.ModelElement.Errors = new Dictionary <Utils.ModelElement, List <ElementLog> >();

            foreach (acceptor.RulePriority priority in PrioritiesOrder)
            {
                InnerExecuteOnePriority(priority);
            }
            CurrentPriority = null;

            RegisterErrors(Utils.ModelElement.Errors);

            EventTimeLine.GarbageCollect();

            NextCycle();
        }
예제 #2
0
        /// <summary>
        ///     Executes the interpretation machine for one priority
        /// </summary>
        /// <param name="priority"></param>
        public void ExecuteOnePriority(acceptor.RulePriority priority)
        {
            try
            {
                ControllersManager.NamableController.DesactivateNotification();
                LastActivationTime = Time;

                Utils.ModelElement.Errors = new Dictionary <Utils.ModelElement, List <ElementLog> >();

                // Executes a single rule priority
                InnerExecuteOnePriority(priority);

                EventTimeLine.GarbageCollect();
            }
            finally
            {
                ControllersManager.NamableController.ActivateNotification();
            }

            if (priority == acceptor.RulePriority.aCleanUp)
            {
                NextCycle();
            }
        }