Esempio n. 1
0
        public DemoQueries()
        {
            // MicroBus
            var busBuilder = new BusBuilder();

            busBuilder.RegisterHandlers(GetType().Assembly);
            // Autofac
            var builder = new ContainerBuilder();

            builder.RegisterMicroBus(busBuilder);
            DiContainer = builder.Build();
        }
Esempio n. 2
0
        public DemoCommands()
        {
            // MicroBus
            var busBuilder = new BusBuilder();

            busBuilder.RegisterHandlers(GetType().Assembly);
            busBuilder.RegisterGlobalHandler <WireTapHandler>();
            // Autofac
            var builder = new ContainerBuilder();

            builder.RegisterMicroBus(busBuilder);
            DiContainer = builder.Build();
        }
Esempio n. 3
0
        public DemoSaga()
        {
            // MicroBus
            var busBuilder = new BusBuilder();

            busBuilder.RegisterHandlers(GetType().Assembly);
            busBuilder.RegisterSaga <OrderShippingSaga>();//(FinderList.Empty.AddSagaFinder<OrderShippingSagaFinder>());
            // Autofac
            var builder = new ContainerBuilder();

            builder
            .RegisterType <OrderShippingSagaRepository>()
            .AsSelf()
            .AsImplementedInterfaces()
            .SingleInstance();
            builder.RegisterMicroBus(busBuilder);
            DiContainer = builder.Build();
        }