Esempio n. 1
0
 private CommandResult(
     TAggregateRoot aggregateRoot,
     EventRouter<TAggregateRoot, TDomainEventBase> routes,
     ImmutableList<TDomainEventBase> appliedEvents)
 {
     AggregateRoot = aggregateRoot;
     _routes = routes;
     _appliedEvents = appliedEvents;
 }
Esempio n. 2
0
 /// <summary>
 /// Sets an EventRouter for routing events to apply methods on the aggregate root.
 /// </summary>
 public CommandResult<TAggregateRoot, TDomainEventBase> WithEventRouter(
     EventRouter<TAggregateRoot, TDomainEventBase> routes)
 {
     return new CommandResult<TAggregateRoot, TDomainEventBase>(AggregateRoot, routes, _appliedEvents);
 }