Beispiel #1
0
    public void Then_the_event_processors_for_client_moved_event_will_be_registered()
    {
        IEnumerable <EventProcessor> eventProcessors;

        EventProcessorCache.TryGetEventProcessorsFor(typeof(ClientMovedEvent), out eventProcessors);
        eventProcessors.Count().WillBe(1);
    }
Beispiel #2
0
 public EventProvider(Type hostType, EventProcessorCache eventProcessorCache)
 {
     _hostType            = hostType;
     _eventProcessorCache = eventProcessorCache;
     EventVersion         = 0;
     _appliedEvents       = new List <IDomainEvent>();
     _internalState       = new Dictionary <string, object>();
 }
Beispiel #3
0
        public static EventProcessorCache CreateEventProcessorCache()
        {
            var eventProcessorCache = new EventProcessorCache();
            var preProcessor        = new PreProcessor(eventProcessorCache, new EventAccessor(new EventPropertyLocator()));

            preProcessor.RegisterForPreProcessing <ClientMovedEvent>();
            preProcessor.Process();
            return(eventProcessorCache);
        }
Beispiel #4
0
 public AggregateRootFactory(EventProcessorCache eventProcessorCache, ApprovedEntitiesCache approvedEntitiesCache)
 {
     _eventProcessorCache   = eventProcessorCache;
     _approvedEntitiesCache = approvedEntitiesCache;
     _proxyGenerator        = new ProxyGenerator();
 }