예제 #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 void DefineScope()
 {
     var mvr = new MiniVanRegistry();
     SUT = new SpecBus(mvr);
     mvr.RegisterArType<Account>();
 }