protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _container = new Container(x => { x.For(typeof(ISagaRepository <>)).Use(typeof(InMemorySagaRepository <>)).Singleton(); x.For <TestStateMachineSaga>().Use <TestStateMachineSaga>().Singleton(); x.For(typeof(SagaStateMachine <TestInstance>)).Use(typeof(TestStateMachineSaga)).Singleton(); }); configurator.LoadStateMachineSagas(_container); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _container = new WindsorContainer(); _container.Register(Component.For(typeof(ISagaRepository <>)) .ImplementedBy(typeof(InMemorySagaRepository <>))); _container.Register(Component.For <PublishTestStartedActivity>() .LifestyleTransient()); _container.RegisterStateMachineSagas(GetType().Assembly); configurator.LoadStateMachineSagas(_container); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { var builder = new ContainerBuilder(); builder.RegisterGeneric(typeof(InMemorySagaRepository <>)) .As(typeof(ISagaRepository <>)) .SingleInstance(); builder.RegisterType <PublishTestStartedActivity>(); builder.RegisterStateMachineSagas(typeof(TestStateMachineSaga).GetTypeInfo().Assembly); _container = builder.Build(); configurator.LoadStateMachineSagas(_container); }
protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { var builder = new ContainerBuilder(); builder.RegisterGeneric(typeof(InMemorySagaRepository<>)) .As(typeof(ISagaRepository<>)) .SingleInstance(); builder.RegisterType<PublishTestStartedActivity>(); builder.RegisterStateMachineSagas(typeof(TestStateMachineSaga).Assembly); _container = builder.Build(); configurator.LoadStateMachineSagas(_container); }
protected override void ConfigureInMemoryReceiveEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _container = new Container(x => { x.For(typeof(ISagaRepository <>), new SingletonLifecycle()) .Use(typeof(InMemorySagaRepository <>)); x.ForConcreteType <PublishTestStartedActivity>(); x.For <TestStateMachineSaga>(new SingletonLifecycle()) .Use <TestStateMachineSaga>(); x.Forward <SagaStateMachine <TestInstance>, TestStateMachineSaga>(); }); configurator.LoadStateMachineSagas(_container); }
protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator) { _container = new Container(x => { x.For(typeof(ISagaRepository<>), new SingletonLifecycle()) .Use(typeof(InMemorySagaRepository<>)); x.ForConcreteType<PublishTestStartedActivity>(); x.For<TestStateMachineSaga>(new SingletonLifecycle()) .Use<TestStateMachineSaga>(); x.Forward<SagaStateMachine<TestInstance>, TestStateMachineSaga>(); }); configurator.LoadStateMachineSagas(_container); }