예제 #1
0
        public Windsor_Consumer_ConfigureEndpoint()
        {
            var container = new WindsorContainer();

            container.AddMassTransit(ConfigureRegistration);

            container.Register(Component.For <IConfigureReceiveEndpoint>().ImplementedBy <DoNotPublishFaults>());

            _container = container;
        }
예제 #2
0
        public Windsor_Consumer_Connect()
        {
            var container = new WindsorContainer();

            container.AddMassTransit(ConfigureRegistration);

            container.Register(Component.For <TaskCompletionSource <ConsumeContext <EasyMessage> > >().Instance(MessageCompletion)
                               );

            _container = container;
        }
        public Windsor_Consumer()
        {
            var container = new WindsorContainer();

            container.AddMassTransit(x =>
            {
                x.AddConsumer <SimpleConsumer>();
                x.AddBus(provider => BusControl);
            });

            container.Register(Component.For <ISimpleConsumerDependency>().ImplementedBy <SimpleConsumerDependency>().LifestyleScoped(),
                               Component.For <AnotherMessageConsumer>().ImplementedBy <AnotherMessageConsumerImpl>().LifestyleScoped()
                               );

            _container = container;
        }
예제 #4
0
        static IWindsorContainer ConfigureContainer()
        {
            var container = new WindsorContainer();

            container.AddMassTransit(cfg =>
            {
                cfg.AddConsumersFromNamespaceContaining <SubmitOrderConsumer>();
                cfg.AddSagaStateMachinesFromNamespaceContaining(typeof(OrderStateMachine));

                cfg.AddBus(kernel => BusFactory(container));
            });

            container.Register(Component.For <PublishOrderEventActivity>());

            container.RegisterInMemorySagaRepository();

            return(container);
        }
예제 #5
0
            public WindsorConsumersFromContainer()
            {
                var container = new WindsorContainer();

                container.Register(
                    Component.For <SimpleConsumer>()
                    .LifestyleScoped());

                container.AddMassTransit(x =>
                {
                    x.AddConsumersFromContainer(container);

                    x.UsingInMemory();
                });

                container.Register(Component.For <ISimpleConsumerDependency>().ImplementedBy <SimpleConsumerDependency>().LifestyleScoped(),
                                   Component.For <AnotherMessageConsumer>().ImplementedBy <AnotherMessageConsumerImpl>().LifestyleScoped()
                                   );

                _container = container;
            }