コード例 #1
0
        private static CqsServer CreateServer()
        {
            var cmdBus = new SimpleCommandBus();
            cmdBus.Register(typeof (Program).Assembly);

            var queryBus = new SimpleQueryBus();
            queryBus.Register(typeof (Program).Assembly);

            var requestReplyBus = new SimpleRequestReplyBus();
            requestReplyBus.Register(typeof (Program).Assembly);

            var eventBus = new SimpleEventBus();
            eventBus.Register(typeof (Program).Assembly);

            var server = new CqsServer(cmdBus, queryBus, eventBus, requestReplyBus);
            server.SerializerFactory = () => new JsonMessageSerializer();
            
            return server;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: krigans/Griffin.Framework
        private static CqsServer CreateServer()
        {
            var cmdBus = new SimpleCommandBus();

            cmdBus.Register(typeof(Program).Assembly);

            var queryBus = new SimpleQueryBus();

            queryBus.Register(typeof(Program).Assembly);

            var requestReplyBus = new SimpleRequestReplyBus();

            requestReplyBus.Register(typeof(Program).Assembly);

            var eventBus = new SimpleEventBus();

            eventBus.Register(typeof(Program).Assembly);

            var server = new CqsServer(cmdBus, queryBus, eventBus, requestReplyBus);

            server.SerializerFactory = () => new JsonMessageSerializer();

            return(server);
        }