示例#1
0
        private void RegisterService(IAppHost host)
        {
            ServiceDiscovery = Settings.GetDiscoveryClient() ?? new ConsulDiscovery();
            ServiceDiscovery.Register(host);

            // register servicestack discovery services
            host.Register(ServiceDiscovery);
        }
        private void RegisterService(IAppHost host)
        {
            ServiceDiscovery = Settings.GetDiscoveryClient() ?? new ConsulDiscovery();
            ServiceDiscovery.Register(host);

            // register servicestack discovery services
            host.Register(ServiceDiscovery);
            host.GetContainer()
            .Register <IServiceGatewayFactory>(x => new ConsulServiceGatewayFactory(Settings.GetGateway(), ServiceDiscovery))
            .ReusedWithin(ReuseScope.None);
        }