/// <summary>
 /// Adds a change to the list of changes
 /// </summary>
 /// <param name="change">The change to add</param>
 /// <param name="apply">Indicates whether the change should be applied immediately</param>
 public void Add(Change change, bool apply)
 {
     Changes.Add(change);
     if (apply)
     {
         change.Apply();
     }
 }
Example #2
0
 /// <summary>
 ///     Adds a change to the list of changes
 /// </summary>
 /// <param name="change">The change to add</param>
 /// <param name="apply">Indicates whether the change should be applied immediately</param>
 /// <param name="runner"></param>
 public void Add(Change change, bool apply, Runner runner)
 {
     Changes.Add(change);
     if (apply)
     {
         // BUG: This is the case for procedure calls.
         // In this case, computing the next changes induced by the procedure must be based on this changes.
         // However, this contradicts a invariant : the state of the system does not change as long as all changes have not been computed
         // To fix this, changes should be unapplied at the end of the procedure call change evaluation to be applied back
         // during the activation application.
         change.Apply(runner);
         runner.CacheImpact.ClearCaches();
     }
 }
Example #3
0
 /// <summary>
 ///     Adds a change to the list of changes
 /// </summary>
 /// <param name="change">The change to add</param>
 /// <param name="apply">Indicates whether the change should be applied immediately</param>
 /// <param name="runner"></param>
 public void Add(Change change, bool apply, Runner runner)
 {
     Changes.Add(change);
     if (apply)
     {
         // BUG: This is the case for procedure calls.
         // In this case, computing the next changes induced by the procedure must be based on this changes.
         // However, this contradicts a invariant : the state of the system does not change as long as all changes have not been computed
         // To fix this, changes should be unapplied at the end of the procedure call change evaluation to be applied back
         // during the activation application.
         change.Apply(runner);
     }
 }
 /// <summary>
 /// Adds a change to the list of changes
 /// </summary>
 /// <param name="change">The change to add</param>
 /// <param name="apply">Indicates whether the change should be applied immediately</param>
 public void Add(Change change, bool apply)
 {
     Changes.Add(change);
     if (apply)
     {
         change.Apply();
     }
 }