public void Configure(BehaviorGraph graph) { var sagaHandlers = graph.Behaviors.SelectMany(x => x).OfType<HandlerCall>() .Where(IsSagaHandler) .ToArray(); var settings = graph.Settings.Get<TransportSettings>(); sagaHandlers.Each(call => { var types = ToSagaTypes(call); var sagaNode = new StatefulSagaNode(types) { Repository = DetermineSagaRepositoryDef(settings, types) }; call.AddBefore(sagaNode); }); }
public void Configure(BehaviorGraph graph) { var sagaHandlers = graph.Behaviors.SelectMany(x => x).OfType <HandlerCall>() .Where(IsSagaHandler) .ToArray(); var settings = graph.Settings.Get <TransportSettings>(); sagaHandlers.Each(call => { var types = ToSagaTypes(call); var sagaNode = new StatefulSagaNode(types) { Repository = DetermineSagaRepositoryDef(settings, types) }; call.AddBefore(sagaNode); }); }