/// <summary> /// Handles a change of the model element by invalidating the cache of all element in CacheDependancy /// </summary> /// <param name="cacheImpact"></param> public virtual void HandleChange(CacheImpact cacheImpact) { if (CacheDependancy != null) { foreach (ModelElement element in CacheDependancy) { cacheImpact.Add(element); } } }
/// <summary> /// Actions to be taken when the variable's value changes /// </summary> /// <param name="cacheImpact"></param> public void HandleChange(CacheImpact cacheImpact) { StructureValue value = Enclosing as StructureValue; if (value != null) { IVariable variable = value.Enclosing as IVariable; if (variable != null) { variable.HandleChange(cacheImpact); } } StructureElement.HandleChange(cacheImpact); }
public void HandleChange(CacheImpact cacheImpact) { // Nothing to do }
/// <summary> /// Handles the changes for this variable /// </summary> /// <param name="cacheImpact"></param> public override void HandleChange(CacheImpact cacheImpact) { base.HandleChange(cacheImpact); Structure structure = Type as Structure; if (structure != null) { structure.HandleChange(cacheImpact); } StructureValue enclosingStructureValue = Enclosing as StructureValue; if (enclosingStructureValue != null) { IVariable enclosingVariable = enclosingStructureValue.Enclosing as IVariable; if (enclosingVariable != null) { enclosingVariable.HandleChange(cacheImpact); } } }
/// <summary> /// Steps one step backward in this run /// </summary> public void StepBack() { CacheImpact = new CacheImpact(); EventTimeLine.StepBack(this, _step); ClearCaches(); _currentSubStepIndex = RebuildCurrentSubStep; _currentStepIndex = RebuildCurrentSubStep; _currentTestCaseIndex = RebuildCurrentSubStep; }
/// <summary> /// Setups the sub-step by applying its actions and adding its expects in the expect list /// </summary> public void SetupSubStep(SubStep subStep) { Util.DontNotify(() => { LogInstance = subStep; // No setup can occur when some expectations are still active if (!EventTimeLine.ContainsSubStep(subStep)) { CacheImpact = new CacheImpact(); EventTimeLine.AddModelEvent(new SubStepActivated(subStep, CurrentPriority), this, true); ClearCaches(); } }); }
/// <summary> /// Executes a single rule priority (shared version of the method) /// </summary> /// <param name="priority"></param> private void InnerExecuteOnePriority(acceptor.RulePriority priority) { Util.DontNotify(() => { CacheImpact = new CacheImpact(); CurrentPriority = priority; // Activates the processing engine HashSet<Activation> activations = new HashSet<Activation>(); foreach (Dictionary dictionary in EfsSystem.Instance.Dictionaries) { foreach (NameSpace nameSpace in dictionary.NameSpaces) { SetupNameSpaceActivations(priority, activations, nameSpace); } } List<VariableUpdate> updates = new List<VariableUpdate>(); EvaluateActivations(activations, priority, ref updates); ApplyUpdates(updates); ClearCaches(); CheckExpectationsState(priority); }); }
/// <summary> /// Handles a change of the model element by invalidating the cache of all element in CacheDependancy /// </summary> /// <param name="cacheImpact"></param> public override void HandleChange(CacheImpact cacheImpact) { base.HandleChange(cacheImpact); Structure.HandleChange(cacheImpact); }
/// <summary> /// Actions to be taken when the variable's value changes /// </summary> /// <param name="cacheImpact"></param> public void HandleChange(CacheImpact cacheImpact) { Type.HandleChange(cacheImpact); }