Hi,
Is their a way to scan and register all the StateMachineSagas for Castle windsor , just like their is a way for Autofac and Lamar ?
var container = new WindsorContainer();
// register each consumer manually
container.Register(Component.For<YourConsumer>().LifestyleTransient());
//or use Windsor's excellent scanning capabilities
container.Register(AllTypes.FromThisAssembly().BasedOn<IConsumer>());
e.g.
container.Register(Component.For(typeof(ISagaRepository<>)).ImplementedBy(typeof(InMemorySagaRepository<>)));
container.Register(AllTypes.FromThisAssembly().BasedOn(typeof(SagaStateMachine<>)));
var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host(new Uri("rabbitmq://localhost/"), h =>
{
h.Username("guest");
h.Password("guest");
});
sbc.ReceiveEndpoint("customer_update_queue", ec =>
{
ec.EnableMessageScope();
ec.LoadFrom(container);
ec.LoadStateMachineSagasFrom(container);
})
});
container.Register(Component.For<IBus>().Instance(busControl));
container.Register(Component.For<IBusControl>().Instance(busControl));
Is the above possible with windsor ? I read there were some scope related issues previously with windsor , is that still the case ?
Regards,
Hannan