Example #1
0
        internal void RouteForConflict(IEvent @event)
        {
            var route = Resolver.Conflict(this, @event.GetType());

            if (route == null)
            {
                throw new NoRouteException($"Failed to route {@event.GetType().FullName} for conflict resolution on entity {typeof(TThis).FullName} stream id {StreamId}.  If you want to handle conflicts here, define a new method of signature `private void Conflict({@event.GetType().Name} e)`");
            }

            route(this, @event);
        }