public EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate Create(Marten.Events.IEvent @event, Marten.IQuerySession session) { return(new EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate()); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Aggregation.RoomsAvailability> ApplyEvent(Marten.IQuerySession session, Marten.Events.Projections.EventSlice <EventSourcingTests.Aggregation.RoomsAvailability, System.Guid> slice, Marten.Events.IEvent evt, EventSourcingTests.Aggregation.RoomsAvailability aggregate, System.Threading.CancellationToken cancellationToken) { switch (evt) { case Marten.Events.IEvent <EventSourcingTests.Aggregation.HotelRoomsDefined> event_HotelRoomsDefined104: aggregate ??= new EventSourcingTests.Aggregation.RoomsAvailability(); aggregate.Apply(event_HotelRoomsDefined104.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.Aggregation.RoomBooked> event_RoomBooked105: aggregate ??= new EventSourcingTests.Aggregation.RoomsAvailability(); aggregate.Apply(event_RoomBooked105.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.Aggregation.GuestCheckedOut> event_GuestCheckedOut106: aggregate ??= new EventSourcingTests.Aggregation.RoomsAvailability(); aggregate.Apply(event_GuestCheckedOut106.Data); return(aggregate); } return(aggregate); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate> BuildAsync(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate snapshot, System.Threading.CancellationToken cancellation) { if (!events.Any()) { return(null); } EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate innerAggregate = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = await Apply(@event, snapshot, session, cancellation); } return(snapshot); }
public EventSourcingTests.Aggregation.RoomsAvailability Create(Marten.Events.IEvent @event, Marten.IQuerySession session) { return(new EventSourcingTests.Aggregation.RoomsAvailability()); }
public EventSourcingTests.Aggregation.RoomsAvailability Apply(Marten.Events.IEvent @event, EventSourcingTests.Aggregation.RoomsAvailability aggregate, Marten.IQuerySession session) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.Aggregation.HotelRoomsDefined> event_HotelRoomsDefined101: aggregate.Apply(event_HotelRoomsDefined101.Data); break; case Marten.Events.IEvent <EventSourcingTests.Aggregation.RoomBooked> event_RoomBooked102: aggregate.Apply(event_RoomBooked102.Data); break; case Marten.Events.IEvent <EventSourcingTests.Aggregation.GuestCheckedOut> event_GuestCheckedOut103: aggregate.Apply(event_GuestCheckedOut103.Data); break; } return(aggregate); }
public EventSourcingTests.Aggregation.Invoice Apply(Marten.Events.IEvent @event, EventSourcingTests.Aggregation.Invoice aggregate, Marten.IQuerySession session) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceInitiated> event_InvoiceInitiated91: aggregate.Apply(event_InvoiceInitiated91.Data); break; case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceIssued> event_InvoiceIssued92: aggregate.Apply(event_InvoiceIssued92.Data); break; case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceSent> event_InvoiceSent93: aggregate.Apply(event_InvoiceSent93.Data); break; } return(aggregate); }
public override EventSourcingTests.Aggregation.RoomsAvailability Build(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Aggregation.RoomsAvailability snapshot) { if (!events.Any()) { return(null); } EventSourcingTests.Aggregation.RoomsAvailability roomsAvailability = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = Apply(@event, snapshot, session); } return(snapshot); }
public EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity Create(Marten.Events.IEvent @event, Marten.IQuerySession session) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.UserCreated> event_UserCreated107: return(new EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity(event_UserCreated107.Data)); break; } throw new System.InvalidOperationException("There is no default constructor for EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity"); }
public EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity Apply(Marten.Events.IEvent @event, EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity aggregate, Marten.IQuerySession session) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.IdentityAdded> event_IdentityAdded108: aggregate.Apply(event_IdentityAdded108.Data); break; } return(aggregate); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Projections.QuestParty> ApplyEvent(Marten.IQuerySession session, Marten.Events.Projections.EventSlice <EventSourcingTests.Projections.QuestParty, System.Guid> slice, Marten.Events.IEvent evt, EventSourcingTests.Projections.QuestParty aggregate, System.Threading.CancellationToken cancellationToken) { switch (evt) { case Marten.Events.IEvent <EventSourcingTests.MembersJoined> event_MembersJoined508: aggregate ??= new EventSourcingTests.Projections.QuestParty(); aggregate.Apply(event_MembersJoined508.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.MembersDeparted> event_MembersDeparted509: aggregate ??= new EventSourcingTests.Projections.QuestParty(); aggregate.Apply(event_MembersDeparted509.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.QuestStarted> event_QuestStarted510: aggregate ??= new EventSourcingTests.Projections.QuestParty(); aggregate.Apply(event_QuestStarted510.Data); return(aggregate); } return(aggregate); }
public override EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity Build(System.Collections.Generic.IReadOnlyList <Marten.Events.IEvent> events, Marten.IQuerySession session, EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity snapshot) { if (!events.Any()) { return(null); } EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity identity = null; snapshot ??= Create(events[0], session); foreach (var @event in events) { snapshot = Apply(@event, snapshot, session); } return(snapshot); }
public EventSourcingTests.Projections.QuestParty Apply(Marten.Events.IEvent @event, EventSourcingTests.Projections.QuestParty aggregate, Marten.IQuerySession session) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.MembersJoined> event_MembersJoined505: aggregate.Apply(event_MembersJoined505.Data); break; case Marten.Events.IEvent <EventSourcingTests.MembersDeparted> event_MembersDeparted506: aggregate.Apply(event_MembersDeparted506.Data); break; case Marten.Events.IEvent <EventSourcingTests.QuestStarted> event_QuestStarted507: aggregate.Apply(event_QuestStarted507.Data); break; } return(aggregate); }
public EventSourcingTests.Projections.QuestParty Create(Marten.Events.IEvent @event, Marten.IQuerySession session) { return(new EventSourcingTests.Projections.QuestParty()); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Aggregation.Invoice> ApplyEvent(Marten.IQuerySession session, Marten.Events.Projections.EventSlice <EventSourcingTests.Aggregation.Invoice, System.Guid> slice, Marten.Events.IEvent evt, EventSourcingTests.Aggregation.Invoice aggregate, System.Threading.CancellationToken cancellationToken) { switch (evt) { case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceInitiated> event_InvoiceInitiated94: aggregate ??= new EventSourcingTests.Aggregation.Invoice(); aggregate.Apply(event_InvoiceInitiated94.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceIssued> event_InvoiceIssued95: aggregate ??= new EventSourcingTests.Aggregation.Invoice(); aggregate.Apply(event_InvoiceIssued95.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.Aggregation.InvoiceSent> event_InvoiceSent96: aggregate ??= new EventSourcingTests.Aggregation.Invoice(); aggregate.Apply(event_InvoiceSent96.Data); return(aggregate); } return(aggregate); }
public async System.Threading.Tasks.ValueTask <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate> Apply(Marten.Events.IEvent @event, EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate aggregate, Marten.IQuerySession session, System.Threading.CancellationToken cancellation) { switch (@event) { case Marten.Events.IEvent <EventSourcingTests.EventA> event_EventA92: aggregate.Apply(event_EventA92.Data); break; case Marten.Events.IEvent <EventSourcingTests.EventB> event_EventB93: aggregate.Apply(event_EventB93); break; case Marten.Events.IEvent <EventSourcingTests.EventC> event_EventC94: aggregate = aggregate.Apply(event_EventC94); break; case Marten.Events.IEvent <EventSourcingTests.EventD> event_EventD95: aggregate = await aggregate.Apply(event_EventD95.Data, session); break; } return(aggregate); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity> ApplyEvent(Marten.IQuerySession session, Marten.Events.Projections.EventSlice <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity, System.Guid> slice, Marten.Events.IEvent evt, EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity aggregate, System.Threading.CancellationToken cancellationToken) { switch (evt) { case Marten.Events.IEvent <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.UserCreated> event_UserCreated111: aggregate ??= new EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity(event_UserCreated111.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.IdentityAdded> event_IdentityAdded110: if (aggregate == default) { throw new ArgumentException("Projection for EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection+Identity should either have the Create Method or Constructor for event of type Marten.Events.IEvent<EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.IdentityAdded>, or EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection+Identity should have a Default Constructor."); } aggregate.Apply(event_IdentityAdded110.Data); return(aggregate); } return(aggregate); }
public override async System.Threading.Tasks.ValueTask <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate> ApplyEvent(Marten.IQuerySession session, Marten.Events.Projections.EventSlice <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate, System.Guid> slice, Marten.Events.IEvent evt, EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate aggregate, System.Threading.CancellationToken cancellationToken) { switch (evt) { case Marten.Events.IEvent <EventSourcingTests.EventA> event_EventA96: aggregate ??= new EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate(); aggregate.Apply(event_EventA96.Data); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.EventB> event_EventB97: aggregate ??= new EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate(); aggregate.Apply(event_EventB97); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.EventC> event_EventC98: aggregate ??= new EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate(); aggregate = aggregate.Apply(event_EventC98); return(aggregate); case Marten.Events.IEvent <EventSourcingTests.EventD> event_EventD99: aggregate ??= new EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate(); aggregate = await aggregate.Apply(event_EventD99.Data, session); return(aggregate); } return(aggregate); }
public EventSourcingTests.Aggregation.Invoice Create(Marten.Events.IEvent @event, Marten.IQuerySession session) { return(new EventSourcingTests.Aggregation.Invoice()); }