public InstanceWithRoutes() { _sut = new EventRouter(); _registeredRoute = new CapturingRoute(); _sut.RegisterRoute <EventWithRegisteredRoute>(_registeredRoute.Capture); }
/// <summary> /// Registers a route for the specified <typeparamref name="TEvent">type of event</typeparamref> to the logic that needs to be applied to this instance to support future behaviors. /// n.b. A ChildAggregate will need to filter events by Id before applying /// </summary> /// <typeparam name="TEvent">The type of event.</typeparam> /// <param name="route">The logic to route the event to.</param> protected void Register <TEvent>(Action <TEvent> route) { _router.RegisterRoute(route); }