Esempio n. 1
0
    protected override ValueTask GroupEvents(IEventGrouping <Guid> grouping, IQuerySession session, List <IEvent> events)
    {
        grouping.AddEventsWithMetadata <BoardStateEvent>(e => e.StreamId, events);
        grouping.AddEvents <IBoardEvent>(x => x.BoardId, events);

        return(ValueTask.CompletedTask);
    }
    protected override ValueTask GroupEvents(IEventGrouping <int> grouping, IQuerySession session, List <IEvent> events)
    {
        // Tell the projection how to group the events
        // by Day document
        grouping.AddEventsWithMetadata <IDayEvent>(e => e.Data.Day, events);

        // This just lets the projection work independently
        // on each Movement child of the Travel event
        // as if it were its own event
        grouping.FanOutOnEach <Travel, Movement>(x => x.Movements);

        return(ValueTask.CompletedTask);
    }
 protected abstract ValueTask GroupEvents(IEventGrouping <TId> grouping, IQuerySession session, List <IEvent> events);