????xxx???????????????????????????????Profile?????????????????????????????????????????綽????????????????????????м??ɡ?????????????????????????У???????????????????????????????????????·????????????Key??

?????????????????????????????????????e?????????????ASP .NET Core?????????У?????project.json???????????NuGet??“Microsoft.Extensions.Configuration.Binder”?????????????????????????Main?????ж?????????????????
1: public class Program
2: {
3:     public static void Main(string[] args)
4:     {
5:         IConfiguration configuration = new ConfigurationBuilder().Add(new MemoryConfigurationProvider(new Dictionary<string?? string>
6:             {
7:                 ["Profile:Gender"]             = "Male"??
8:                 ["Profile:Age"]                = "18"??
9:                 ["Profile:ContactInfo:Email"]  = "foobar@outlook.com"??
10:                 ["Profile:ContactInfo:PhoneNo"]= "123456789"??
11:             })).Build();
12:
13:         Profile profile = configuration.Get<Profile>("Profile");
14:         Console.WriteLine("{0??-10}:{1}"?? "Gender"?? profile.Gender);
15:         Console.WriteLine("{0??-10}:{1}"?? "Age"?? profile.Age);
16:         Console.WriteLine("{0??-10}:{1}"?? "Email"?? profile.ContactInfo.Email);
17:         Console.WriteLine("{0??-10}:{1}"?? "PhoneNo"?? profile.ContactInfo.PhoneNo);
18:     }
19: }
??????????????????????????????????ConfigurationBuilder??????????????MemoryConfigurationProvider????????????2??????????????????????????????????ConfigurationBuilder????????Configuration???????????ConfigurationSection??Get??????Key?“Profile”?????y??????Profile?????????????e??????????????????????Profile?????????????????????ó??????????????????????????????????????
????1: Gender    :Male
????2: Age       :18
????3: Email     :foobar@outlook.com
????4: PhoneNo   :123456789
????????????????
???????e?????????????????????????????????????????????????????????????????????????????????????????????????????????????e????????????????????????????????????????????????????????????????????????????????????????????????????????Profile??????????????????????????????

??????????8????????????????????????????????????????????????????????????y??????“Profile”???Key??????????????????·??????????????·?????????????????????????????????Key???????????????????????????????????????????????????????????????????????????????0??1??2?? …??????????y??Key????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????е???????????????????е??????????????·???????????????Key?? ?????????????????????????????????