{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/project-system/pulls/comments/228133550","pull_request_review_id":168330341,"id":228133550,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODEzMzU1MA==","diff_hunk":"@@ -37,19 +37,35 @@ internal class ProjectRuleHandler : DependenciesRuleHandlerBase\n                                   IDependenciesSnapshotProvider snapshotProvider,\n                                   IUnconfiguredProjectCommonServices commonServices)\n         {\n-            AggregateSnapshotProvider = aggregateSnapshotProvider;\n             SnapshotProvider = snapshotProvider;\n-            CommonServices = commonServices;\n \n-            AggregateSnapshotProvider.SnapshotChanged += OnSnapshotChanged;\n-            AggregateSnapshotProvider.SnapshotProviderUnloading += OnSnapshotProviderUnloading;\n+            aggregateSnapshotProvider.SnapshotChanged += OnAggregateSnapshotChanged;\n+            aggregateSnapshotProvider.SnapshotProviderUnloading += OnAggregateSnapshotProviderUnloading;\n \n-            CommonServices.Project.ProjectUnloading += OnUnconfiguredProjectUnloading;\n+            // Unregister event handlers when the project unloads\n+            commonServices.Project.ProjectUnloading += OnUnconfiguredProjectUnloading;\n+\n+            Task OnUnconfiguredProjectUnloading(object sender, EventArgs e)","path":"src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/Subscriptions/ProjectRuleHandler.cs","position":17,"original_position":17,"commit_id":"79f25f63f2fe6618ff09623bc3694c7011fe1c64","original_commit_id":"ed45737b9e4055b09c0edebbe12cbe34b6bbc2a3","user":{"login":"drewnoakes","id":350947,"node_id":"MDQ6VXNlcjM1MDk0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"body":"I generally like to add a redundant `return` in these cases. Missed this one, thanks. Added.","created_at":"2018-10-25T11:21:08Z","updated_at":"2018-10-25T11:21:08Z","html_url":"https://github.com/dotnet/project-system/pull/4166#discussion_r228133550","pull_request_url":"https://api.github.com/repos/dotnet/project-system/pulls/4166","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/comments/228133550"},"html":{"href":"https://github.com/dotnet/project-system/pull/4166#discussion_r228133550"},"pull_request":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/4166"}},"in_reply_to_id":228001216},"pull_request":{"url":"https://api.github.com/repos/dotnet/project-system/pulls/4166","id":225498812,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NDk4ODEy","html_url":"https://github.com/dotnet/project-system/pull/4166","diff_url":"https://github.com/dotnet/project-system/pull/4166.diff","patch_url":"https://github.com/dotnet/project-system/pull/4166.patch","issue_url":"https://api.github.com/repos/dotnet/project-system/issues/4166","number":4166,"state":"open","locked":false,"title":"More dependency node grooming","user":{"login":"drewnoakes","id":350947,"node_id":"MDQ6VXNlcjM1MDk0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"body":"Follows on from #4143, containing several small thematic commits with changes made while walking through the rest of the dependencies code.\r\n \r\nEasiest to review commit by commit. I tried splitting this up after the fact but the changes interleave and conflict.\r\n\r\nParticularly interesting commits:\r\n\r\n- b34f5001ef06a99d9bf329a5c1f372eda2963706 which is similar to ea1d2e42080aba2fce3406aba35b1d8803178dfe from #4143 which addressed issue #4140 \r\n- e4728901c257900b76c29e93424b35f3faeeeea3, af0d22ca981eef58a96a0cda9fa400ebeed894f0 and bcf32fbf06a943b28819f39aa37853ebad3cee07 which uses pooled `StringBuilder`s more efficiently\r\n- 42de3fa5f181b6034a57eb6461b578a3bfe426e0 which significantly reduces string allocations in `DependenciesSnapshot.FindDependency`\r\n\r\nI have a question about style for the team off the back of this PR. Several types have private properties as well as private fields. Historically I have preferred making private data fields, and using properties for non-private. I find it consuming code clearer. Is there some other pattern at play here, or do we have a mixture of different styles? See 3f2d7d7e7054c5502227c7187a4bb6088c7ae8b0 for an example.\r\n\r\n","created_at":"2018-10-24T18:06:25Z","updated_at":"2018-10-25T11:21:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25e03f8e143abbbe0bc0447bb9413d7401652327","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/project-system/pulls/4166/commits","review_comments_url":"https://api.github.com/repos/dotnet/project-system/pulls/4166/comments","review_comment_url":"https://api.github.com/repos/dotnet/project-system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/project-system/issues/4166/comments","statuses_url":"https://api.github.com/repos/dotnet/project-system/statuses/79f25f63f2fe6618ff09623bc3694c7011fe1c64","head":{"label":"drewnoakes:dep-node-grooming-2","ref":"dep-node-grooming-2","sha":"79f25f63f2fe6618ff09623bc3694c7011fe1c64","user":{"login":"drewnoakes","id":350947,"node_id":"MDQ6VXNlcjM1MDk0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"repo":{"id":145385600,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUzODU2MDA=","name":"project-system","full_name":"drewnoakes/project-system","private":false,"owner":{"login":"drewnoakes","id":350947,"node_id":"MDQ6VXNlcjM1MDk0Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"html_url":"https://github.com/drewnoakes/project-system","description":"The C#, F# and Visual Basic project system for Visual Studio","fork":true,"url":"https://api.github.com/repos/drewnoakes/project-system","forks_url":"https://api.github.com/repos/drewnoakes/project-system/forks","keys_url":"https://api.github.com/repos/drewnoakes/project-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drewnoakes/project-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drewnoakes/project-system/teams","hooks_url":"https://api.github.com/repos/drewnoakes/project-system/hooks","issue_events_url":"https://api.github.com/repos/drewnoakes/project-system/issues/events{/number}","events_url":"https://api.github.com/repos/drewnoakes/project-system/events","assignees_url":"https://api.github.com/repos/drewnoakes/project-system/assignees{/user}","branches_url":"https://api.github.com/repos/drewnoakes/project-system/branches{/branch}","tags_url":"https://api.github.com/repos/drewnoakes/project-system/tags","blobs_url":"https://api.github.com/repos/drewnoakes/project-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drewnoakes/project-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drewnoakes/project-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/drewnoakes/project-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drewnoakes/project-system/statuses/{sha}","languages_url":"https://api.github.com/repos/drewnoakes/project-system/languages","stargazers_url":"https://api.github.com/repos/drewnoakes/project-system/stargazers","contributors_url":"https://api.github.com/repos/drewnoakes/project-system/contributors","subscribers_url":"https://api.github.com/repos/drewnoakes/project-system/subscribers","subscription_url":"https://api.github.com/repos/drewnoakes/project-system/subscription","commits_url":"https://api.github.com/repos/drewnoakes/project-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/drewnoakes/project-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/drewnoakes/project-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/drewnoakes/project-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/drewnoakes/project-system/contents/{+path}","compare_url":"https://api.github.com/repos/drewnoakes/project-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drewnoakes/project-system/merges","archive_url":"https://api.github.com/repos/drewnoakes/project-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drewnoakes/project-system/downloads","issues_url":"https://api.github.com/repos/drewnoakes/project-system/issues{/number}","pulls_url":"https://api.github.com/repos/drewnoakes/project-system/pulls{/number}","milestones_url":"https://api.github.com/repos/drewnoakes/project-system/milestones{/number}","notifications_url":"https://api.github.com/repos/drewnoakes/project-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drewnoakes/project-system/labels{/name}","releases_url":"https://api.github.com/repos/drewnoakes/project-system/releases{/id}","deployments_url":"https://api.github.com/repos/drewnoakes/project-system/deployments","created_at":"2018-08-20T08:00:39Z","updated_at":"2018-10-25T08:55:14Z","pushed_at":"2018-10-25T11:16:28Z","git_url":"git://github.com/drewnoakes/project-system.git","ssh_url":"git@github.com:drewnoakes/project-system.git","clone_url":"https://github.com/drewnoakes/project-system.git","svn_url":"https://github.com/drewnoakes/project-system","homepage":"","size":21244,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"2392d4402001e07cd1ba3c6b395234da865b047c","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":56740275,"node_id":"MDEwOlJlcG9zaXRvcnk1Njc0MDI3NQ==","name":"project-system","full_name":"dotnet/project-system","private":false,"owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotnet/project-system","description":"The C#, F# and Visual Basic project system for Visual Studio","fork":false,"url":"https://api.github.com/repos/dotnet/project-system","forks_url":"https://api.github.com/repos/dotnet/project-system/forks","keys_url":"https://api.github.com/repos/dotnet/project-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/project-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/project-system/teams","hooks_url":"https://api.github.com/repos/dotnet/project-system/hooks","issue_events_url":"https://api.github.com/repos/dotnet/project-system/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/project-system/events","assignees_url":"https://api.github.com/repos/dotnet/project-system/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/project-system/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/project-system/tags","blobs_url":"https://api.github.com/repos/dotnet/project-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/project-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/project-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/project-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/project-system/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/project-system/languages","stargazers_url":"https://api.github.com/repos/dotnet/project-system/stargazers","contributors_url":"https://api.github.com/repos/dotnet/project-system/contributors","subscribers_url":"https://api.github.com/repos/dotnet/project-system/subscribers","subscription_url":"https://api.github.com/repos/dotnet/project-system/subscription","commits_url":"https://api.github.com/repos/dotnet/project-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/project-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/project-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/project-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/project-system/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/project-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/project-system/merges","archive_url":"https://api.github.com/repos/dotnet/project-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/project-system/downloads","issues_url":"https://api.github.com/repos/dotnet/project-system/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/project-system/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/project-system/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/project-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/project-system/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/project-system/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/project-system/deployments","created_at":"2016-04-21T03:40:18Z","updated_at":"2018-10-25T11:16:26Z","pushed_at":"2018-10-25T11:16:23Z","git_url":"git://github.com/dotnet/project-system.git","ssh_url":"git@github.com:dotnet/project-system.git","clone_url":"https://github.com/dotnet/project-system.git","svn_url":"https://github.com/dotnet/project-system","homepage":"","size":21218,"stargazers_count":426,"watchers_count":426,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":143,"mirror_url":null,"archived":false,"open_issues_count":588,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":143,"open_issues":588,"watchers":426,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/4166"},"html":{"href":"https://github.com/dotnet/project-system/pull/4166"},"issue":{"href":"https://api.github.com/repos/dotnet/project-system/issues/4166"},"comments":{"href":"https://api.github.com/repos/dotnet/project-system/issues/4166/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/4166/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/project-system/pulls/4166/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/project-system/statuses/79f25f63f2fe6618ff09623bc3694c7011fe1c64"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"drewnoakes"}}