public void Process(StateChange newState, StateChangeOptions options) { if ((options & StateChangeOptions.Update) != 0) { Process(newState); } if ((options & StateChangeOptions.Notify) != 0) { _dependencyList.ForEach(x => x.Process(newState, StateChangeOptions.UpdateAndNotify, this)); } }
public void Process(StateChange newState, StateChangeOptions options, IPropagator sender) { System.Console.WriteLine(options); if ((options & StateChangeOptions.Update) != 0) { Process(newState); } if ((options & StateChangeOptions.Notify) != 0) { _dependencyList.ForEach(x => { if (x != sender) { x.Process(newState, options, this); } }); } }