{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Configuration/issues/535","repository_url":"https://api.github.com/repos/aspnet/Configuration","labels_url":"https://api.github.com/repos/aspnet/Configuration/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Configuration/issues/535/comments","events_url":"https://api.github.com/repos/aspnet/Configuration/issues/535/events","html_url":"https://github.com/aspnet/Configuration/pull/535","id":185253622,"number":535,"title":"Return of Get<T> (RIP Bind<T>)","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Configuration/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-25T22:44:30Z","updated_at":"2016-10-27T17:51:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/535","html_url":"https://github.com/aspnet/Configuration/pull/535","diff_url":"https://github.com/aspnet/Configuration/pull/535.diff","patch_url":"https://github.com/aspnet/Configuration/pull/535.patch"},"body":"- Bind<T> morphing back into Get<T>\r\n+ T Get<T>() + object Get(Type type)\r\n\r\nInitial starting point for PR is what we had before minus the overloads for default values and sugar for specifying a sectionName, where Value is used if specified, otherwise children are bound. (uses the bind logic exactly) \r\n\r\n@divega I know you have some ideas around what this should do instead, what did you have in mind?\r\n\r\ncc @glennc \r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Configuration/issues/comments/256719972","html_url":"https://github.com/aspnet/Configuration/pull/535#issuecomment-256719972","issue_url":"https://api.github.com/repos/aspnet/Configuration/issues/535","id":256719972,"user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T17:51:21Z","updated_at":"2016-10-27T17:51:21Z","body":"Yeah that's why I'm not touching GetValue, the change to Bind, is making a blocked scenario work.\r\n\r\nBefore this change, if a section had both a value and children, Bind would only attempt to convert the value which would throw, now it will call CanConvertFrom(string) to avoid blowing up, and attempt to bind the children instead which will make the following work\r\n\r\nExample config\r\nobjkey = bogusvalue\r\nobjkey:property1 = value1\r\nobjkey:propery2 = value2\r\n\r\n```\r\nvar myObj = new MyObj();\r\nconfig.Bind(myObj)\r\n// or\r\nvar myObj = config.GetSection(\"objkey\").Get<MyObj>()\r\n```"}}
{"actor":{"display_login":"HaoK"}}