Inheritance: IEventModifier
 private SingleAggregateInstanceEventStreamMutator
     (IAggregateRootEvent creationEvent, IEnumerable<IEventMigration> eventMigrations, Action<IReadOnlyList<AggregateRootEvent>> eventsAddedCallback)
 {
     _eventModifier = new EventModifier(eventsAddedCallback ?? (_ => { }));
     _aggregateId = creationEvent.AggregateRootId;
     _eventMigrators = eventMigrations
         .Where(migration => migration.MigratedAggregateEventHierarchyRootInterface.IsInstanceOfType(creationEvent))
         .Select(migration => migration.CreateSingleAggregateInstanceHandlingMigrator())
         .ToArray();
 }
Beispiel #2
0
 private SingleAggregateInstanceEventStreamMutator
     (IAggregateRootEvent creationEvent, IEnumerable <IEventMigration> eventMigrations, Action <IReadOnlyList <AggregateRootEvent> > eventsAddedCallback)
 {
     _eventModifier  = new EventModifier(eventsAddedCallback ?? (_ => { }));
     _aggregateId    = creationEvent.AggregateRootId;
     _eventMigrators = eventMigrations
                       .Where(migration => migration.MigratedAggregateEventHierarchyRootInterface.IsInstanceOfType(creationEvent))
                       .Select(migration => migration.CreateSingleAggregateInstanceHandlingMigrator())
                       .ToArray();
 }