예제 #1
0
        public EventStore(IServiceProvider locator, GlobalEventStore globalStore)
        {
            Contract.Requires(locator != null);
            Contract.Requires(globalStore != null);

            this.Locator     = locator;
            this.GlobalStore = globalStore;
        }
예제 #2
0
 public void Queue <T>(IEnumerable <T> events) where T : IDomainEvent
 {
     if (GlobalEventStore == null)
     {
         GlobalEventStore = Locator.Resolve <GlobalEventStore>();
     }
     foreach (var e in events)
     {
         GlobalEventStore.Queue(e);
     }
 }