public void InitServer() { var activator = new ServiceActivator(); var invoker = new ServiceInvoker(); var logger = new RedisLogger(new Uri("test")); var queue = new DefaultQueue(); var handler = new CfHandler(activator, invoker, logger, queue); var configurationProvider = new DefaultConfigurationProvider(); configurationProvider.BaseAddress = "http://localhost:8090"; var bus = new CfServiceBus(handler, logger, configurationProvider); bus.Host <IPingPongService>(new PingPongService()); bus.Start(); }
static void Main(string[] args) { var activator = new ServiceActivator(); var invoker = new ServiceInvoker(); var logger = new ConsoleLogger(); var queue = new DefaultQueue(); var handler = new CfHandler(activator, invoker, logger, queue); var configurationProvider = new DefaultConfigurationProvider(); configurationProvider.BaseAddress = "http://localhost:8090"; configurationProvider.QueuePath = "SchedulerQueue"; var bus = new CfServiceBus(handler, logger, configurationProvider); bus.Host <IPingService>(new PingService()); bus.Start(); Console.ReadLine(); }
static void Main(string[] args) { ILogger logger = new ConsoleLogger(); IServiceActivator activator = new ServiceActivator(); IServiceInvoker invoker = new ServiceInvoker(); IQueue queue = new DefaultQueue(); ICfHandler handler = new CfHandler(activator, invoker, logger, queue); IConfigurationProvider configurationProvider = new DefaultConfigurationProvider(); configurationProvider.BaseAddress = "http://localhost:8088"; configurationProvider.QueuePath = "CustumerMessageQueue"; ICfBus bus = new CfServiceBus(handler, logger, configurationProvider); bus.Host <ICustomerService>(new CustomerService(new CashierProxy("http://localhost:8089"))); bus.Start(); logger.Write("Customer cashierService has started"); Console.ReadLine(); }