Ejemplo n.º 1
0
        public Startup(IConfiguration config)
        {
            _config = config;

            _config.GetSection("json_array").Bind(jsonArray);
            _config.GetSection("starship").Bind(starship);
            _config.GetSection("tvshow").Bind(tvshow);

            Console.WriteLine("Startup:");
            ConsoleExtensions.WriteObject(jsonArray, "jsonArray");
            ConsoleExtensions.WriteObject(starship, "starship");
            ConsoleExtensions.WriteObject(tvshow, "tvshow");

            Console.WriteLine(jsonArray.ToJson());
            Console.WriteLine(starship.ToJson());
            Console.WriteLine(tvshow.ToJson());
        }