Exemplo n.º 1
0
        public static Server Configure(IServiceProvider container, IConfigurationRoot configuration)
        {
            var serverPort = Convert.ToInt32(configuration["RPC:ServerPort"]);

            var server = new Server
            {
                Services =
                {
                    UsersService.BindService(container.GetRequiredService <UsersController>())
                },
                Ports = { new ServerPort("localhost", serverPort, ServerCredentials.Insecure) }
            };

            return(server);
        }