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

            this.Locator     = locator;
            this.GlobalStore = globalStore;
        }
 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);
     }
 }