Пример #1
0
 public void DefineScope()
 {
     var mvr = new MiniVanRegistry();
     SUT = new SpecBus(mvr);
     mvr.RegisterArType<Account>();
     mvr.RegisterNonArInstance(new AccountTransferSaga(SUT));
 }
Пример #2
0
        /// <summary>
        /// Load your modules or register your services here!
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        private static void RegisterServices(IKernel kernel)
        {
            var registry = new MiniVanRegistry();
            var bus = new MiniVan(registry);
            var qhub = new QueryHub();
            var chub = new CommandHub(bus);

            registry.RegisterArType<Account>();
            registry.RegisterNonArInstance(qhub, new AccountUniquenessSaga(bus), new AccountTransferSaga(bus));

            kernel.Bind<CommandHub>().ToConstant(chub);
            kernel.Bind<QueryHub>().ToConstant(qhub);
        }
Пример #3
0
 public MiniVan(MiniVanRegistry Registry)
 {
     this.Registry = Registry;
 }
Пример #4
0
 public void DefineScope()
 {
     var mvr = new MiniVanRegistry();
     SUT = new SpecBus(mvr);
     mvr.RegisterArType<Account>();
 }