public CqsModule() { CommandBus = new SimpleCommandBus(); QueryBus = new SimpleQueryBus(); EventBus = new SimpleEventBus(); RequestReplyBus = new SimpleRequestReplyBus(); _requestMethod = GetType().GetMethod("ExecuteRequest", BindingFlags.NonPublic | BindingFlags.Instance); _commandMethod = GetType().GetMethod("ExecuteCommand", BindingFlags.NonPublic | BindingFlags.Instance); _queryMethod = GetType().GetMethod("ExecuteQuery", BindingFlags.NonPublic | BindingFlags.Instance); }
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; }
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); }