Пример #1
0
 public InMemorySession(
     IDictionary <Type, Func <IEnumerable <IEvent>, object> > builders,
     IEnumerable <Projector> projections,
     PendingEventsStore storeEvents)
 {
     _builders      = builders;
     _projections   = projections;
     _storeEvents   = storeEvents;
     _pendingEvents = new PendingEventsStore();
 }
Пример #2
0
        public FileSystemSession(
            IFileSystem fileSystem,
            Dictionary <Type, Func <IEnumerable <IEvent>, object> > builders,
            IEnumerable <Projector> projections,
            string root)
        {
            _fileSystem  = fileSystem;
            _builders    = builders;
            _projections = projections;
            _root        = root;

            _pending = new PendingEventsStore();
        }
Пример #3
0
 public InMemoryStorage(PendingEventsStore events = null)
 {
     _builders    = new Dictionary <Type, Func <IEnumerable <IEvent>, object> >();
     _events      = events ?? new PendingEventsStore();
     _projections = new Dictionary <Type, Projector>();
 }