protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator) { configurator.ReceiveEndpoint("order-observer", e => { e.Consumer <OrderSubmittedConsumer>(); }); configurator.ReceiveEndpoint("order-state", e => { _machine = new OrderStateMachine(); _repository = new InMemorySagaRepository <OrderState>(); e.StateMachineSaga(_machine, _repository); }); }
protected override void ConfigureServiceBusBus(IServiceBusBusFactoryConfigurator configurator) { configurator.ReceiveEndpoint("order-observer", e => { e.Consumer <OrderSubmittedConsumer>(); }); configurator.ReceiveEndpoint("order-state", e => { _machine = new OrderStateMachine(); _repository = new InMemorySagaRepository <OrderState>(); e.StateMachineSaga(_machine, _repository); EndpointConvention.Map <OrderProcessed>(e.InputAddress); }); configurator.ReceiveEndpoint("execute-process-order", e => { e.ExecuteActivityHost <ProcessOrderActivity, ProcessOrderArguments>(); EndpointConvention.Map <ProcessOrderArguments>(e.InputAddress); }); }