示例#1
0
        protected async Task StartServer(IOutputInput outputInput, BindingConfigurationBase bindingConfigurationBase, ServerConfiguration serverConfiguration)
        {
            var service = new TestService(outputInput);
            var server  = Server.CreateSingle <ITestService>(bindingConfigurationBase, service, serverConfiguration);

            server.Start();
            outputInput.WriteLine("Server started at: " + bindingConfigurationBase.ServiceAddress);
            await outputInput.Wait();

            server.Dispose();
        }