Beispiel #1
0
        private void reset()
        {
            _session   = (QuerySession)_store.QuerySession();
            _storage   = _session.EventStorage();
            _statement = new EventStatement(_storage)
            {
                Filters = _filters
            };

            _handler = (IQueryHandler <IReadOnlyList <IEvent> >) new ListQueryHandler <IEvent>(_statement, _storage);

            _cancellation = new CancellationTokenSource(5.Seconds());
            _cancellation.Token.Register(teardown);
        }
Beispiel #2
0
        public IEvent Load(Guid id)
        {
            var handler = new SingleEventQueryHandler(id, _session.EventStorage());

            return(_session.ExecuteHandler(handler));
        }