public MessageChannel(Container container, RabbitMQServer server, ICommandDiscovery commandDiscovery, IEventDiscovery eventDiscovery) { _container = container; _server = server; _commandDiscovery = commandDiscovery; _eventDiscovery = eventDiscovery; }
public void Register(Container container) { container.RegisterSingleton(() => { var rabbitMqServer = new RabbitMQServer(); // TODO set hostname rabbitMqServer.Startup(); return rabbitMqServer; }); container.RegisterSingleton<ICommandBus, CommandBus>(); container.RegisterSingleton<IEventBus, EventBus>(); container.RegisterSingleton<IMessageChannel, MessageChannel>(); }