Пример #1
0
        public void BufferInvokesWhenBufferingStopped()
        {
            var sut        = new EventBuffer();
            var bufferable = CreateImmediatelyInvokedEvent(1);

            sut.StartBuffering();

            sut.StopBuffering();
            sut.Buffer(bufferable.Object, 1);

            bufferable.Verify();
        }
Пример #2
0
 public void Update(CalculatorUpdate update)
 {
     _eventBuffer.StartBuffering();
     foreach (var modifier in update.RemovedModifiers)
     {
         _modifierCollection.RemoveModifier(modifier);
     }
     foreach (var modifier in update.AddedModifiers)
     {
         _modifierCollection.AddModifier(modifier);
     }
     _graphPruner.RemoveUnusedNodes();
     _eventBuffer.Flush();
     _eventBuffer.StopBuffering();
 }