Пример #1
0
    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));
        }
    }
Пример #2
0
    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);
                }
            });
        }
    }