Пример #1
0
        public static SherlockOptions FromConfig(IConfiguration config)
        {
            var options = new SherlockOptions();

            config.GetSection("Sherlock").Bind(options);
            return(options);
        }
Пример #2
0
        public static void Main(string[] args)
        {
            _config = LoadConfig();
            var options = SherlockOptions.FromConfig(_config);

            Console.WriteLine($"Starting gRPC @ {options.Host}:{options.Port}");
            using (var s = new SherlockServer(options.Host, options.Port))
            {
                BuildWebHost(args, s).Run();
            }
        }