Example #1
0
        public Task <IReadOnlyList <IEvent> > FetchStream(Guid streamId, int version = 0, DateTime?timestamp = null)
        {
            var selector = new EventSelector(_store.Events, _store.Serializer);
            var handler  = new EventQueryHandler <Guid>(selector, streamId, version, timestamp, _store.Events.TenancyStyle, _parent.Tenant.TenantId);

            return(AddItem(handler, null));
        }
Example #2
0
        public Task <IList <IEvent> > FetchStream(Guid streamId, int version = 0, DateTime?timestamp = null)
        {
            var selector = new EventSelector(_schema.Events.As <EventGraph>(), _serializer);
            var handler  = new EventQueryHandler(selector, streamId, version, timestamp);

            return(AddItem(handler));
        }
Example #3
0
        public Task <T> AggregateStream <T>(Guid streamId, int version = 0, DateTime?timestamp = null) where T : class, new()
        {
            var inner      = new EventQueryHandler(new EventSelector(_schema.Events.As <EventGraph>(), _serializer), streamId, version, timestamp);
            var aggregator = _schema.Events.AggregateFor <T>();
            var handler    = new AggregationQueryHandler <T>(aggregator, inner);

            return(AddItem(handler));
        }
Example #4
0
        public Task <T> AggregateStream <T>(Guid streamId, int version = 0, DateTime?timestamp = null)
            where T : class, new()
        {
            var inner = new EventQueryHandler <Guid>(new EventSelector(_store.Events, _store.Serializer), streamId, version,
                                                     timestamp, _store.Events.TenancyStyle, _parent.Tenant.TenantId);
            var aggregator = _store.Events.AggregateFor <T>();
            var handler    = new AggregationQueryHandler <T>(aggregator, inner);

            return(AddItem(handler, null));
        }
Example #5
0
        public Task <T> AggregateStream <T>(Guid streamId, int version = 0, DateTime?timestamp = null)
            where T : class
        {
            var events = _parent.DocumentStore.Events;
            var inner  = new EventQueryHandler <Guid>(_parent.Tenant.EventStorage(), streamId, version,
                                                      timestamp, events.TenancyStyle, _parent.Tenant.TenantId);
            var aggregator = events.AggregateFor <T>();
            var handler    = new AggregationQueryHandler <T>(aggregator, inner);

            return(AddItem(handler));
        }
Example #6
0
        public Task <IReadOnlyList <IEvent> > FetchStream(Guid streamId, int version = 0, DateTime?timestamp = null)
        {
            var handler = new EventQueryHandler <Guid>(_parent.Tenant.EventStorage(), streamId, version, timestamp, _parent.Options.Events.TenancyStyle, _parent.Tenant.TenantId);

            return(AddItem(handler));
        }