{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/74125173","id":74125173,"diff_hunk":"@@ -0,0 +1,173 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using System;\n+using System.Collections.Generic;\n+using System.Collections.Immutable;\n+using System.Linq;\n+using System.Threading;\n+using Microsoft.CodeAnalysis.FindSymbols;\n+using Roslyn.Utilities;\n+\n+namespace Microsoft.CodeAnalysis.CodeLens\n+{\n+    /// <summary>\n+    /// Tracks incremental progress of a find references search, we use this to\n+    /// count the number of references up until a certain cap is reached and cancel the search\n+    /// or until the search completes, if such a cap is not reached.\n+    /// </summary>\n+    /// <remarks>\n+    /// All public methods of this type could be called from multiple threads.\n+    /// </remarks>\n+    internal sealed class CodeLensFindReferencesProgress : IFindReferencesProgress, IDisposable\n+    {\n+        /// <summary>\n+        /// this token is linked to an aggregate token that is passed to the Find References\n+        /// operation, this is used solely to trigger the cancellation of an in progress\n+        /// find references operation, when the references count hits a given cap.\n+        /// </summary>\n+        private readonly CancellationTokenSource _cancellationTokenSource;","path":"src/Features/Core/Portable/CodeLens/CodeLensFindReferenceProgress.cs","position":28,"original_position":28,"commit_id":"bbd91ec8628c4f4b56f1a9d4210b6c635913057f","original_commit_id":"bbd91ec8628c4f4b56f1a9d4210b6c635913057f","user":{"login":"heejaechang","id":1333179,"avatar_url":"https://avatars.githubusercontent.com/u/1333179?v=3","gravatar_id":"","url":"https://api.github.com/users/heejaechang","html_url":"https://github.com/heejaechang","followers_url":"https://api.github.com/users/heejaechang/followers","following_url":"https://api.github.com/users/heejaechang/following{/other_user}","gists_url":"https://api.github.com/users/heejaechang/gists{/gist_id}","starred_url":"https://api.github.com/users/heejaechang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heejaechang/subscriptions","organizations_url":"https://api.github.com/users/heejaechang/orgs","repos_url":"https://api.github.com/users/heejaechang/repos","events_url":"https://api.github.com/users/heejaechang/events{/privacy}","received_events_url":"https://api.github.com/users/heejaechang/received_events","type":"User","site_admin":false},"body":"I don't think you need two CancellationTokenSource. I think you just need _aggregateCancellationTokenSource.\r\n\r\njust call cancel from _aggregateCancellationTokenSource.","created_at":"2016-08-09T19:10:05Z","updated_at":"2016-08-09T19:10:05Z","html_url":"https://github.com/dotnet/roslyn/pull/13037#discussion_r74125173","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/13037","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/74125173"},"html":{"href":"https://github.com/dotnet/roslyn/pull/13037#discussion_r74125173"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/13037"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/13037","id":80662239,"html_url":"https://github.com/dotnet/roslyn/pull/13037","diff_url":"https://github.com/dotnet/roslyn/pull/13037.diff","patch_url":"https://github.com/dotnet/roslyn/pull/13037.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/13037","number":13037,"state":"open","locked":false,"title":"Add Codelens service for VS","user":{"login":"panopticoncentral","id":684792,"avatar_url":"https://avatars.githubusercontent.com/u/684792?v=3","gravatar_id":"","url":"https://api.github.com/users/panopticoncentral","html_url":"https://github.com/panopticoncentral","followers_url":"https://api.github.com/users/panopticoncentral/followers","following_url":"https://api.github.com/users/panopticoncentral/following{/other_user}","gists_url":"https://api.github.com/users/panopticoncentral/gists{/gist_id}","starred_url":"https://api.github.com/users/panopticoncentral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panopticoncentral/subscriptions","organizations_url":"https://api.github.com/users/panopticoncentral/orgs","repos_url":"https://api.github.com/users/panopticoncentral/repos","events_url":"https://api.github.com/users/panopticoncentral/events{/privacy}","received_events_url":"https://api.github.com/users/panopticoncentral/received_events","type":"User","site_admin":false},"body":"My original PR was a fairly straight port of the CodeLens code from Visual Studio with the intention of minimizing CodeLens bugs by not doing much rewriting. After the feedback, I've gone the other route: I've tried boiling the original CodeLens service code down to its essence. Hopefully this feels a little more Roslyn-like. I tried my best not to duplicate anything in Roslyn, but if I missed something, let me know.\r\n\r\nThis is currently just a local service, the next (relatively simple) step is to add an out of process interface.\r\n\r\n@CyrusNajmabadi @srivatsn @heejaechang @balajikris ","created_at":"2016-08-09T17:34:33Z","updated_at":"2016-08-09T19:10:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e868d727d1475e9d51e6aeddd781e9db1be323e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/13037/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/13037/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/13037/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/bbd91ec8628c4f4b56f1a9d4210b6c635913057f","head":{"label":"panopticoncentral:codelens","ref":"codelens","sha":"bbd91ec8628c4f4b56f1a9d4210b6c635913057f","user":{"login":"panopticoncentral","id":684792,"avatar_url":"https://avatars.githubusercontent.com/u/684792?v=3","gravatar_id":"","url":"https://api.github.com/users/panopticoncentral","html_url":"https://github.com/panopticoncentral","followers_url":"https://api.github.com/users/panopticoncentral/followers","following_url":"https://api.github.com/users/panopticoncentral/following{/other_user}","gists_url":"https://api.github.com/users/panopticoncentral/gists{/gist_id}","starred_url":"https://api.github.com/users/panopticoncentral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panopticoncentral/subscriptions","organizations_url":"https://api.github.com/users/panopticoncentral/orgs","repos_url":"https://api.github.com/users/panopticoncentral/repos","events_url":"https://api.github.com/users/panopticoncentral/events{/privacy}","received_events_url":"https://api.github.com/users/panopticoncentral/received_events","type":"User","site_admin":false},"repo":{"id":43779299,"name":"roslyn","full_name":"panopticoncentral/roslyn","owner":{"login":"panopticoncentral","id":684792,"avatar_url":"https://avatars.githubusercontent.com/u/684792?v=3","gravatar_id":"","url":"https://api.github.com/users/panopticoncentral","html_url":"https://github.com/panopticoncentral","followers_url":"https://api.github.com/users/panopticoncentral/followers","following_url":"https://api.github.com/users/panopticoncentral/following{/other_user}","gists_url":"https://api.github.com/users/panopticoncentral/gists{/gist_id}","starred_url":"https://api.github.com/users/panopticoncentral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panopticoncentral/subscriptions","organizations_url":"https://api.github.com/users/panopticoncentral/orgs","repos_url":"https://api.github.com/users/panopticoncentral/repos","events_url":"https://api.github.com/users/panopticoncentral/events{/privacy}","received_events_url":"https://api.github.com/users/panopticoncentral/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/panopticoncentral/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/panopticoncentral/roslyn","forks_url":"https://api.github.com/repos/panopticoncentral/roslyn/forks","keys_url":"https://api.github.com/repos/panopticoncentral/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/panopticoncentral/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/panopticoncentral/roslyn/teams","hooks_url":"https://api.github.com/repos/panopticoncentral/roslyn/hooks","issue_events_url":"https://api.github.com/repos/panopticoncentral/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/panopticoncentral/roslyn/events","assignees_url":"https://api.github.com/repos/panopticoncentral/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/panopticoncentral/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/panopticoncentral/roslyn/tags","blobs_url":"https://api.github.com/repos/panopticoncentral/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/panopticoncentral/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/panopticoncentral/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/panopticoncentral/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/panopticoncentral/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/panopticoncentral/roslyn/languages","stargazers_url":"https://api.github.com/repos/panopticoncentral/roslyn/stargazers","contributors_url":"https://api.github.com/repos/panopticoncentral/roslyn/contributors","subscribers_url":"https://api.github.com/repos/panopticoncentral/roslyn/subscribers","subscription_url":"https://api.github.com/repos/panopticoncentral/roslyn/subscription","commits_url":"https://api.github.com/repos/panopticoncentral/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/panopticoncentral/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/panopticoncentral/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/panopticoncentral/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/panopticoncentral/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/panopticoncentral/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/panopticoncentral/roslyn/merges","archive_url":"https://api.github.com/repos/panopticoncentral/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/panopticoncentral/roslyn/downloads","issues_url":"https://api.github.com/repos/panopticoncentral/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/panopticoncentral/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/panopticoncentral/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/panopticoncentral/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/panopticoncentral/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/panopticoncentral/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/panopticoncentral/roslyn/deployments","created_at":"2015-10-06T21:17:49Z","updated_at":"2016-01-19T20:52:03Z","pushed_at":"2016-08-09T18:40:26Z","git_url":"git://github.com/panopticoncentral/roslyn.git","ssh_url":"git@github.com:panopticoncentral/roslyn.git","clone_url":"https://github.com/panopticoncentral/roslyn.git","svn_url":"https://github.com/panopticoncentral/roslyn","homepage":"","size":164089,"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":"dotnet:master","ref":"master","sha":"2dee81a646c5253464e9b7aedb8f918d35152208","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2016-08-09T14:13:19Z","pushed_at":"2016-08-09T18:58:56Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":322874,"stargazers_count":5976,"watchers_count":5976,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1426,"mirror_url":null,"open_issues_count":3123,"forks":1426,"open_issues":3123,"watchers":5976,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/13037"},"html":{"href":"https://github.com/dotnet/roslyn/pull/13037"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/13037"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/13037/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/13037/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/13037/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/bbd91ec8628c4f4b56f1a9d4210b6c635913057f"}}}}
{"actor":{"display_login":"heejaechang"}}