{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Configuration/issues/359","repository_url":"https://api.github.com/repos/aspnet/Configuration","labels_url":"https://api.github.com/repos/aspnet/Configuration/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Configuration/issues/359/comments","events_url":"https://api.github.com/repos/aspnet/Configuration/issues/359/events","html_url":"https://github.com/aspnet/Configuration/issues/359","id":123234668,"number":359,"title":"ConfigurationBinder Get<T>() throw exception when T has a property with only getter","user":{"login":"langtu","id":903973,"avatar_url":"https://avatars.githubusercontent.com/u/903973?v=3","gravatar_id":"","url":"https://api.github.com/users/langtu","html_url":"https://github.com/langtu","followers_url":"https://api.github.com/users/langtu/followers","following_url":"https://api.github.com/users/langtu/following{/other_user}","gists_url":"https://api.github.com/users/langtu/gists{/gist_id}","starred_url":"https://api.github.com/users/langtu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/langtu/subscriptions","organizations_url":"https://api.github.com/users/langtu/orgs","repos_url":"https://api.github.com/users/langtu/repos","events_url":"https://api.github.com/users/langtu/events{/privacy}","received_events_url":"https://api.github.com/users/langtu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"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},"milestone":{"url":"https://api.github.com/repos/aspnet/Configuration/milestones/17","html_url":"https://github.com/aspnet/Configuration/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/Configuration/milestones/17/labels","id":1379633,"number":17,"title":"1.0.0-rc2","description":null,"creator":{"login":"divega","id":1253414,"avatar_url":"https://avatars.githubusercontent.com/u/1253414?v=3","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":15,"state":"open","created_at":"2015-10-27T15:31:59Z","updated_at":"2016-03-10T01:22:03Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-12-21T08:51:13Z","updated_at":"2016-03-15T12:26:10Z","closed_at":"2016-01-28T21:06:56Z","body":"In Json.net we have `[JsonIgnore]` to bypass deserialize properties. But now we don't have any attribute or any way to bypass bind process.\r\n\r\nMy config class has a property like:\r\n\r\n```\r\nprivate string _abc;\r\npublic string Abc\r\n{\r\n      get { return _abc ?? (_abc = Def.SubString(1)); }\r\n}\r\n```\r\n\r\nthe property `Def` in this case is still null because of the order of binding process.\r\n\r\nIMO, the code in `BindProperty()` method should check for not exists `getter` and return before trying to get value:\r\n\r\n``` C#\r\n            if (property.GetMethod == null ||\r\n                !property.GetMethod.IsPublic ||\r\n                property.GetMethod.GetParameters().Length > 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            var propertyValue = property.GetValue(instance);\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/Configuration/issues/comments/196797452","html_url":"https://github.com/aspnet/Configuration/issues/359#issuecomment-196797452","issue_url":"https://api.github.com/repos/aspnet/Configuration/issues/359","id":196797452,"user":{"login":"langtu","id":903973,"avatar_url":"https://avatars.githubusercontent.com/u/903973?v=3","gravatar_id":"","url":"https://api.github.com/users/langtu","html_url":"https://github.com/langtu","followers_url":"https://api.github.com/users/langtu/followers","following_url":"https://api.github.com/users/langtu/following{/other_user}","gists_url":"https://api.github.com/users/langtu/gists{/gist_id}","starred_url":"https://api.github.com/users/langtu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/langtu/subscriptions","organizations_url":"https://api.github.com/users/langtu/orgs","repos_url":"https://api.github.com/users/langtu/repos","events_url":"https://api.github.com/users/langtu/events{/privacy}","received_events_url":"https://api.github.com/users/langtu/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T12:26:10Z","updated_at":"2016-03-15T12:26:10Z","body":"Sorry for late response.\r\n@HaoK  @divega You're right. I talked about calling `GetValue()` before `setter`.\r\n@HaoK Another equivalent: `[JsonIgnore(Kind=Setter)]`, `Kind` = `[All, Setter, Getter]`, and default value = `All`"}}