{"action":"created","comment":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/comments/83604271","pull_request_review_id":4436020,"id":83604271,"diff_hunk":"@@ -297,6 +306,9 @@ protected override bool OnBackButtonPressed()\n \n \t\tvoid InsertPageBefore(Page page, Page before)\n \t\t{\n+\t\t\tif (page == null || before == null)\n+\t\t\t\tthrow new ArgumentException($\"Both {nameof(page)} and {nameof(before)} must be initialized.\");","path":"Xamarin.Forms.Core/NavigationPage.cs","position":30,"original_position":30,"commit_id":"45e4afd4cc3d4fdb09adf3f1d298c0cd700ccdd2","original_commit_id":"45e4afd4cc3d4fdb09adf3f1d298c0cd700ccdd2","user":{"login":"StephaneDelcroix","id":313003,"avatar_url":"https://avatars.githubusercontent.com/u/313003?v=3","gravatar_id":"","url":"https://api.github.com/users/StephaneDelcroix","html_url":"https://github.com/StephaneDelcroix","followers_url":"https://api.github.com/users/StephaneDelcroix/followers","following_url":"https://api.github.com/users/StephaneDelcroix/following{/other_user}","gists_url":"https://api.github.com/users/StephaneDelcroix/gists{/gist_id}","starred_url":"https://api.github.com/users/StephaneDelcroix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephaneDelcroix/subscriptions","organizations_url":"https://api.github.com/users/StephaneDelcroix/orgs","repos_url":"https://api.github.com/users/StephaneDelcroix/repos","events_url":"https://api.github.com/users/StephaneDelcroix/events{/privacy}","received_events_url":"https://api.github.com/users/StephaneDelcroix/received_events","type":"User","site_admin":false},"body":"also, it's not required to check arguments on non-public APIs","created_at":"2016-10-17T09:16:14Z","updated_at":"2016-10-17T09:21:22Z","html_url":"https://github.com/xamarin/Xamarin.Forms/pull/464#discussion_r83604271","pull_request_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464","_links":{"self":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/comments/83604271"},"html":{"href":"https://github.com/xamarin/Xamarin.Forms/pull/464#discussion_r83604271"},"pull_request":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464"}}},"pull_request":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464","id":89544457,"html_url":"https://github.com/xamarin/Xamarin.Forms/pull/464","diff_url":"https://github.com/xamarin/Xamarin.Forms/pull/464.diff","patch_url":"https://github.com/xamarin/Xamarin.Forms/pull/464.patch","issue_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/464","number":464,"state":"open","locked":false,"title":"[Core] Added RootPage to NavigationPage","user":{"login":"adrianknight89","id":16855542,"avatar_url":"https://avatars.githubusercontent.com/u/16855542?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianknight89","html_url":"https://github.com/adrianknight89","followers_url":"https://api.github.com/users/adrianknight89/followers","following_url":"https://api.github.com/users/adrianknight89/following{/other_user}","gists_url":"https://api.github.com/users/adrianknight89/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianknight89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianknight89/subscriptions","organizations_url":"https://api.github.com/users/adrianknight89/orgs","repos_url":"https://api.github.com/users/adrianknight89/repos","events_url":"https://api.github.com/users/adrianknight89/events{/privacy}","received_events_url":"https://api.github.com/users/adrianknight89/received_events","type":"User","site_admin":false},"body":"### Description of Change ###\r\n\r\n`NavigationPage` has `CurrentPage` which points to the tail of the stack, but it lacks a pointer to the head. `RootPage` (a read-only property) should be used to get access to the first element of the stack. This makes it easier to look up the root and change it if needed via `InsertPageBefore()`\r\n\r\nWhen changing root, I should be able to do something like:\r\n\r\n```\r\nnp.InsertPageBefore(newPage, np.RootPage);\r\nawait np.PopToRootAsync();\r\n```\r\n\r\nRemoving root should be even easier:\r\n\r\n`np.RemovePage(np.RootPage);`\r\n\r\nAlso edited & added unit tests.\r\n\r\n### API Changes ###\r\n\r\nAdded:\r\n - static readonly BindablePropertyKey RootPagePropertyKey\r\n - public static readonly BindableProperty RootPageProperty\r\n\r\n### PR Checklist ###\r\n\r\n- [x] Has tests (if omitted, state reason in description)\r\n- [x] Rebased on top of master at time of PR\r\n- [x] Changes adhere to coding standard\r\n- [x] Consolidate commits as makes sense\r\n","created_at":"2016-10-16T23:18:01Z","updated_at":"2016-10-17T09:21:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5eb7f6374d93783424162f7d5981887ae7e52c1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464/commits","review_comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464/comments","review_comment_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/464/comments","statuses_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/statuses/45e4afd4cc3d4fdb09adf3f1d298c0cd700ccdd2","head":{"label":"adrianknight89:nav-root","ref":"nav-root","sha":"45e4afd4cc3d4fdb09adf3f1d298c0cd700ccdd2","user":{"login":"adrianknight89","id":16855542,"avatar_url":"https://avatars.githubusercontent.com/u/16855542?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianknight89","html_url":"https://github.com/adrianknight89","followers_url":"https://api.github.com/users/adrianknight89/followers","following_url":"https://api.github.com/users/adrianknight89/following{/other_user}","gists_url":"https://api.github.com/users/adrianknight89/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianknight89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianknight89/subscriptions","organizations_url":"https://api.github.com/users/adrianknight89/orgs","repos_url":"https://api.github.com/users/adrianknight89/repos","events_url":"https://api.github.com/users/adrianknight89/events{/privacy}","received_events_url":"https://api.github.com/users/adrianknight89/received_events","type":"User","site_admin":false},"repo":{"id":67881694,"name":"Xamarin.Forms","full_name":"adrianknight89/Xamarin.Forms","owner":{"login":"adrianknight89","id":16855542,"avatar_url":"https://avatars.githubusercontent.com/u/16855542?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianknight89","html_url":"https://github.com/adrianknight89","followers_url":"https://api.github.com/users/adrianknight89/followers","following_url":"https://api.github.com/users/adrianknight89/following{/other_user}","gists_url":"https://api.github.com/users/adrianknight89/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianknight89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianknight89/subscriptions","organizations_url":"https://api.github.com/users/adrianknight89/orgs","repos_url":"https://api.github.com/users/adrianknight89/repos","events_url":"https://api.github.com/users/adrianknight89/events{/privacy}","received_events_url":"https://api.github.com/users/adrianknight89/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrianknight89/Xamarin.Forms","description":"Xamarin.Forms official home","fork":true,"url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms","forks_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/forks","keys_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/teams","hooks_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/hooks","issue_events_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/issues/events{/number}","events_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/events","assignees_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/assignees{/user}","branches_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/branches{/branch}","tags_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/tags","blobs_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/statuses/{sha}","languages_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/languages","stargazers_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/stargazers","contributors_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/contributors","subscribers_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/subscribers","subscription_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/subscription","commits_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/contents/{+path}","compare_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/merges","archive_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/downloads","issues_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/issues{/number}","pulls_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/pulls{/number}","milestones_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/milestones{/number}","notifications_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/labels{/name}","releases_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/releases{/id}","deployments_url":"https://api.github.com/repos/adrianknight89/Xamarin.Forms/deployments","created_at":"2016-09-10T16:25:42Z","updated_at":"2016-09-10T16:25:46Z","pushed_at":"2016-10-16T23:12:53Z","git_url":"git://github.com/adrianknight89/Xamarin.Forms.git","ssh_url":"git@github.com:adrianknight89/Xamarin.Forms.git","clone_url":"https://github.com/adrianknight89/Xamarin.Forms.git","svn_url":"https://github.com/adrianknight89/Xamarin.Forms","homepage":"https://xamarin.com/forms","size":15400,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xamarin:master","ref":"master","sha":"92d462718ad3066b0ea449f465cabc415c2ccfe4","user":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"repo":{"id":54213490,"name":"Xamarin.Forms","full_name":"xamarin/Xamarin.Forms","owner":{"login":"xamarin","id":790012,"avatar_url":"https://avatars.githubusercontent.com/u/790012?v=3","gravatar_id":"","url":"https://api.github.com/users/xamarin","html_url":"https://github.com/xamarin","followers_url":"https://api.github.com/users/xamarin/followers","following_url":"https://api.github.com/users/xamarin/following{/other_user}","gists_url":"https://api.github.com/users/xamarin/gists{/gist_id}","starred_url":"https://api.github.com/users/xamarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xamarin/subscriptions","organizations_url":"https://api.github.com/users/xamarin/orgs","repos_url":"https://api.github.com/users/xamarin/repos","events_url":"https://api.github.com/users/xamarin/events{/privacy}","received_events_url":"https://api.github.com/users/xamarin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xamarin/Xamarin.Forms","description":"Xamarin.Forms official home","fork":false,"url":"https://api.github.com/repos/xamarin/Xamarin.Forms","forks_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/forks","keys_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/teams","hooks_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/hooks","issue_events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/events{/number}","events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/events","assignees_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/assignees{/user}","branches_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/branches{/branch}","tags_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/tags","blobs_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/git/refs{/sha}","trees_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/statuses/{sha}","languages_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/languages","stargazers_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/stargazers","contributors_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/contributors","subscribers_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/subscribers","subscription_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/subscription","commits_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/commits{/sha}","git_commits_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/git/commits{/sha}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/comments{/number}","issue_comment_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/comments{/number}","contents_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/contents/{+path}","compare_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/merges","archive_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/downloads","issues_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues{/number}","pulls_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls{/number}","milestones_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/milestones{/number}","notifications_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels{/name}","releases_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/releases{/id}","deployments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/deployments","created_at":"2016-03-18T15:52:03Z","updated_at":"2016-10-16T15:56:10Z","pushed_at":"2016-10-16T23:18:01Z","git_url":"git://github.com/xamarin/Xamarin.Forms.git","ssh_url":"git@github.com:xamarin/Xamarin.Forms.git","clone_url":"https://github.com/xamarin/Xamarin.Forms.git","svn_url":"https://github.com/xamarin/Xamarin.Forms","homepage":"https://xamarin.com/forms","size":27456,"stargazers_count":928,"watchers_count":928,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":314,"mirror_url":null,"open_issues_count":58,"forks":314,"open_issues":58,"watchers":928,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464"},"html":{"href":"https://github.com/xamarin/Xamarin.Forms/pull/464"},"issue":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/464"},"comments":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/464/comments"},"review_comments":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464/comments"},"review_comment":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/pulls/464/commits"},"statuses":{"href":"https://api.github.com/repos/xamarin/Xamarin.Forms/statuses/45e4afd4cc3d4fdb09adf3f1d298c0cd700ccdd2"}}}}
{"actor":{"display_login":"StephaneDelcroix"}}