{"action":"opened","number":60,"pull_request":{"url":"https://api.github.com/repos/Catel/Catel/pulls/60","id":47334221,"html_url":"https://github.com/Catel/Catel/pull/60","diff_url":"https://github.com/Catel/Catel/pull/60.diff","patch_url":"https://github.com/Catel/Catel/pull/60.patch","issue_url":"https://api.github.com/repos/Catel/Catel/issues/60","number":60,"state":"open","locked":false,"title":"Master","user":{"login":"gmlohaels","id":11768870,"avatar_url":"https://avatars.githubusercontent.com/u/11768870?v=3","gravatar_id":"","url":"https://api.github.com/users/gmlohaels","html_url":"https://github.com/gmlohaels","followers_url":"https://api.github.com/users/gmlohaels/followers","following_url":"https://api.github.com/users/gmlohaels/following{/other_user}","gists_url":"https://api.github.com/users/gmlohaels/gists{/gist_id}","starred_url":"https://api.github.com/users/gmlohaels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmlohaels/subscriptions","organizations_url":"https://api.github.com/users/gmlohaels/orgs","repos_url":"https://api.github.com/users/gmlohaels/repos","events_url":"https://api.github.com/users/gmlohaels/events{/privacy}","received_events_url":"https://api.github.com/users/gmlohaels/received_events","type":"User","site_admin":false},"body":"Hey.. How about  MVVM automatic mapping improvements\r\n\r\n\r\nFirst one\r\n\r\n  public T XGetValue<T>([CallerMemberNameAttribute] string name=\"\")\r\n        {\r\n            return GetValue<T>(name);\r\n        }\r\n\r\n        public void XSetValue(object value, [CallerMemberNameAttribute] string name = \"\")\r\n        {\r\n            SetValue(name,value);\r\n        }\r\n\r\n        [ViewModelToModel(nameof(Model))]\r\n        public bool AllowSelected\r\n        {\r\n            get{return XGetValue<bool>();}\r\n            set { XSetValue(value); }\r\n        }\r\n\r\n================\r\nThis can be OVERLOADed methods to existing GetValue/SetValue.\r\n[CallerMemberNameAttribute]  set name of property automatically.\r\n\r\n\r\n\r\nNext thing is add some method to ViewModelBase\r\n\r\nThat register all properties (RegisterProperty) automatically for ALL properties that has a   [ViewModelToModel(nameof(Model))]\r\n\r\n\r\nI really dont understand why it must be going manually.\r\n\r\nLittle  Example (just as pseudocode)\r\n\r\n\r\npublic void RegisterAllPropertiesThatHasViewModelAttribute()\r\n{\r\n  this.GetType().GetAttributes.Where(t=t.HasAttribute(typeof(ViewModelToModel)).ForEach(t=>t.RegisterProperty).......\r\n}\r\n\r\nAnd this ... is gone automatically.\r\n-----------------\r\npublic static readonly PropertyData PersonProperty = RegisterProperty(\"Person\", typeof(IPerson));\r\n public static readonly PropertyData SettingsDataProperty =   RegisterProperty(\"SettingsData\", typeof(SettingsDataObject));\r\n\r\n\r\nand 100 millions of them.....\r\n------------------\r\n\r\n\r\nThe next thing is.. Why we must specify \r\n[ViewModelToModel(nameof(Model))]\r\nName of Model ? I  guess many ViewModels has only one Model\r\nso maybe Overload which Gets FirstOrDefault (and throws if few [Model] in VM class found)\r\n\r\n\r\nAlso.\r\nCatel.Localization in Catel Examples is broken. \r\n\r\nI Can write working code if u interested on it as pull request.\r\n\r\nThank you.\r\n\r\n\r\n\r\n","created_at":"2015-10-10T01:23:28Z","updated_at":"2015-10-10T01:23:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Catel/Catel/pulls/60/commits","review_comments_url":"https://api.github.com/repos/Catel/Catel/pulls/60/comments","review_comment_url":"https://api.github.com/repos/Catel/Catel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Catel/Catel/issues/60/comments","statuses_url":"https://api.github.com/repos/Catel/Catel/statuses/fb34493644f56fec0730cd77ada299d7ddcd80bf","head":{"label":"Catel:master","ref":"master","sha":"fb34493644f56fec0730cd77ada299d7ddcd80bf","user":{"login":"Catel","id":4129749,"avatar_url":"https://avatars.githubusercontent.com/u/4129749?v=3","gravatar_id":"","url":"https://api.github.com/users/Catel","html_url":"https://github.com/Catel","followers_url":"https://api.github.com/users/Catel/followers","following_url":"https://api.github.com/users/Catel/following{/other_user}","gists_url":"https://api.github.com/users/Catel/gists{/gist_id}","starred_url":"https://api.github.com/users/Catel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catel/subscriptions","organizations_url":"https://api.github.com/users/Catel/orgs","repos_url":"https://api.github.com/users/Catel/repos","events_url":"https://api.github.com/users/Catel/events{/privacy}","received_events_url":"https://api.github.com/users/Catel/received_events","type":"Organization","site_admin":false},"repo":{"id":9501756,"name":"Catel","full_name":"Catel/Catel","owner":{"login":"Catel","id":4129749,"avatar_url":"https://avatars.githubusercontent.com/u/4129749?v=3","gravatar_id":"","url":"https://api.github.com/users/Catel","html_url":"https://github.com/Catel","followers_url":"https://api.github.com/users/Catel/followers","following_url":"https://api.github.com/users/Catel/following{/other_user}","gists_url":"https://api.github.com/users/Catel/gists{/gist_id}","starred_url":"https://api.github.com/users/Catel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catel/subscriptions","organizations_url":"https://api.github.com/users/Catel/orgs","repos_url":"https://api.github.com/users/Catel/repos","events_url":"https://api.github.com/users/Catel/events{/privacy}","received_events_url":"https://api.github.com/users/Catel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Catel/Catel","description":"An application development platform","fork":false,"url":"https://api.github.com/repos/Catel/Catel","forks_url":"https://api.github.com/repos/Catel/Catel/forks","keys_url":"https://api.github.com/repos/Catel/Catel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Catel/Catel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Catel/Catel/teams","hooks_url":"https://api.github.com/repos/Catel/Catel/hooks","issue_events_url":"https://api.github.com/repos/Catel/Catel/issues/events{/number}","events_url":"https://api.github.com/repos/Catel/Catel/events","assignees_url":"https://api.github.com/repos/Catel/Catel/assignees{/user}","branches_url":"https://api.github.com/repos/Catel/Catel/branches{/branch}","tags_url":"https://api.github.com/repos/Catel/Catel/tags","blobs_url":"https://api.github.com/repos/Catel/Catel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Catel/Catel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Catel/Catel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Catel/Catel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Catel/Catel/statuses/{sha}","languages_url":"https://api.github.com/repos/Catel/Catel/languages","stargazers_url":"https://api.github.com/repos/Catel/Catel/stargazers","contributors_url":"https://api.github.com/repos/Catel/Catel/contributors","subscribers_url":"https://api.github.com/repos/Catel/Catel/subscribers","subscription_url":"https://api.github.com/repos/Catel/Catel/subscription","commits_url":"https://api.github.com/repos/Catel/Catel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Catel/Catel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Catel/Catel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Catel/Catel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Catel/Catel/contents/{+path}","compare_url":"https://api.github.com/repos/Catel/Catel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Catel/Catel/merges","archive_url":"https://api.github.com/repos/Catel/Catel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Catel/Catel/downloads","issues_url":"https://api.github.com/repos/Catel/Catel/issues{/number}","pulls_url":"https://api.github.com/repos/Catel/Catel/pulls{/number}","milestones_url":"https://api.github.com/repos/Catel/Catel/milestones{/number}","notifications_url":"https://api.github.com/repos/Catel/Catel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Catel/Catel/labels{/name}","releases_url":"https://api.github.com/repos/Catel/Catel/releases{/id}","created_at":"2013-04-17T16:07:56Z","updated_at":"2015-10-02T09:48:50Z","pushed_at":"2015-10-06T10:03:40Z","git_url":"git://github.com/Catel/Catel.git","ssh_url":"git@github.com:Catel/Catel.git","clone_url":"https://github.com/Catel/Catel.git","svn_url":"https://github.com/Catel/Catel","homepage":"http://www.catelproject.com","size":29011,"stargazers_count":143,"watchers_count":143,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":3,"forks":62,"open_issues":3,"watchers":143,"default_branch":"develop"}},"base":{"label":"Catel:develop","ref":"develop","sha":"b3e4a8bc1ad00a468f2113509471b0d655b41d33","user":{"login":"Catel","id":4129749,"avatar_url":"https://avatars.githubusercontent.com/u/4129749?v=3","gravatar_id":"","url":"https://api.github.com/users/Catel","html_url":"https://github.com/Catel","followers_url":"https://api.github.com/users/Catel/followers","following_url":"https://api.github.com/users/Catel/following{/other_user}","gists_url":"https://api.github.com/users/Catel/gists{/gist_id}","starred_url":"https://api.github.com/users/Catel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catel/subscriptions","organizations_url":"https://api.github.com/users/Catel/orgs","repos_url":"https://api.github.com/users/Catel/repos","events_url":"https://api.github.com/users/Catel/events{/privacy}","received_events_url":"https://api.github.com/users/Catel/received_events","type":"Organization","site_admin":false},"repo":{"id":9501756,"name":"Catel","full_name":"Catel/Catel","owner":{"login":"Catel","id":4129749,"avatar_url":"https://avatars.githubusercontent.com/u/4129749?v=3","gravatar_id":"","url":"https://api.github.com/users/Catel","html_url":"https://github.com/Catel","followers_url":"https://api.github.com/users/Catel/followers","following_url":"https://api.github.com/users/Catel/following{/other_user}","gists_url":"https://api.github.com/users/Catel/gists{/gist_id}","starred_url":"https://api.github.com/users/Catel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Catel/subscriptions","organizations_url":"https://api.github.com/users/Catel/orgs","repos_url":"https://api.github.com/users/Catel/repos","events_url":"https://api.github.com/users/Catel/events{/privacy}","received_events_url":"https://api.github.com/users/Catel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Catel/Catel","description":"An application development platform","fork":false,"url":"https://api.github.com/repos/Catel/Catel","forks_url":"https://api.github.com/repos/Catel/Catel/forks","keys_url":"https://api.github.com/repos/Catel/Catel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Catel/Catel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Catel/Catel/teams","hooks_url":"https://api.github.com/repos/Catel/Catel/hooks","issue_events_url":"https://api.github.com/repos/Catel/Catel/issues/events{/number}","events_url":"https://api.github.com/repos/Catel/Catel/events","assignees_url":"https://api.github.com/repos/Catel/Catel/assignees{/user}","branches_url":"https://api.github.com/repos/Catel/Catel/branches{/branch}","tags_url":"https://api.github.com/repos/Catel/Catel/tags","blobs_url":"https://api.github.com/repos/Catel/Catel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Catel/Catel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Catel/Catel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Catel/Catel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Catel/Catel/statuses/{sha}","languages_url":"https://api.github.com/repos/Catel/Catel/languages","stargazers_url":"https://api.github.com/repos/Catel/Catel/stargazers","contributors_url":"https://api.github.com/repos/Catel/Catel/contributors","subscribers_url":"https://api.github.com/repos/Catel/Catel/subscribers","subscription_url":"https://api.github.com/repos/Catel/Catel/subscription","commits_url":"https://api.github.com/repos/Catel/Catel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Catel/Catel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Catel/Catel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Catel/Catel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Catel/Catel/contents/{+path}","compare_url":"https://api.github.com/repos/Catel/Catel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Catel/Catel/merges","archive_url":"https://api.github.com/repos/Catel/Catel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Catel/Catel/downloads","issues_url":"https://api.github.com/repos/Catel/Catel/issues{/number}","pulls_url":"https://api.github.com/repos/Catel/Catel/pulls{/number}","milestones_url":"https://api.github.com/repos/Catel/Catel/milestones{/number}","notifications_url":"https://api.github.com/repos/Catel/Catel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Catel/Catel/labels{/name}","releases_url":"https://api.github.com/repos/Catel/Catel/releases{/id}","created_at":"2013-04-17T16:07:56Z","updated_at":"2015-10-02T09:48:50Z","pushed_at":"2015-10-06T10:03:40Z","git_url":"git://github.com/Catel/Catel.git","ssh_url":"git@github.com:Catel/Catel.git","clone_url":"https://github.com/Catel/Catel.git","svn_url":"https://github.com/Catel/Catel","homepage":"http://www.catelproject.com","size":29011,"stargazers_count":143,"watchers_count":143,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":3,"forks":62,"open_issues":3,"watchers":143,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Catel/Catel/pulls/60"},"html":{"href":"https://github.com/Catel/Catel/pull/60"},"issue":{"href":"https://api.github.com/repos/Catel/Catel/issues/60"},"comments":{"href":"https://api.github.com/repos/Catel/Catel/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/Catel/Catel/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/Catel/Catel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Catel/Catel/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/Catel/Catel/statuses/fb34493644f56fec0730cd77ada299d7ddcd80bf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":0,"deletions":0,"changed_files":0}}