예제 #1
0
 public void Start()
 {
     foreach (var proj in Projections)
     {
         Store.SetEventHandler((msg, seq) =>
         {
             var evt = new Model.PublishedEvent(msg, seq.Value);
             if (proj.Handles(evt))
             {
                 proj.Handle(evt);
                 proj.SetState(seq.Value);
             }
         });
     }
 }
예제 #2
0
 public void Handle(PublishedEvent evt)
 {
     EventHandlers.Single(c => c.Handles(evt)).Handle(evt);
 }
예제 #3
0
 public bool Handles(PublishedEvent evt)
 {
     return(EventHandlers.Any(c => c.Handles(evt)));
 }