/// <summary> /// Connects the saga to the service bus /// </summary> /// <typeparam name="TSaga">The consumer type</typeparam> /// <param name="bus"></param> /// <param name="sagaRepository"></param> public static UnsubscribeAction SubscribeSaga <TSaga>(this IServiceBus bus, ISagaRepository <TSaga> sagaRepository) where TSaga : class, ISaga { if (_log.IsDebugEnabled) { _log.DebugFormat("Subscribing Saga: {0}", typeof(TSaga)); } Guard.AgainstNull(sagaRepository, "sagaRepository", "A saga repository must be specified"); var connector = new SagaConnector <TSaga>(sagaRepository); return(bus.Configure(x => connector.Connect(x))); }
public SagaSubscriptionBuilder(ISagaRepository <TSaga> sagaRepository, Func <UnsubscribeAction, ISubscriptionReference> referenceFactory) { _connector = new SagaConnector <TSaga>(sagaRepository); _referenceFactory = referenceFactory; }
public void A_consumer_with_consumes_all_interfaces_is_inspected() { _factory = new SagaConnector <SimpleSaga>(new InMemorySagaRepository <SimpleSaga>()); }
public void A_consumer_with_consumes_all_interfaces_is_inspected() { _factory = new SagaConnector <SimpleSaga>(); }
public void A_consumer_with_consumes_all_interfaces_is_inspected() { _factory = new SagaConnector<SimpleSaga>(); }
public SagaSubscriptionBuilder(ISagaRepository <TSaga> sagaRepository, ReferenceFactory referenceFactory) { _connector = new SagaConnector <TSaga>(sagaRepository); _referenceFactory = referenceFactory; }
public void A_consumer_with_consumes_all_interfaces_is_inspected() { _factory = new SagaConnector<SimpleSaga>(new InMemorySagaRepository<SimpleSaga>()); }