{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/comments/203158515","pull_request_review_id":137994207,"id":203158515,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzE1ODUxNQ==","diff_hunk":"@@ -153,5 +158,34 @@ public static void Initialize(Package package, OleMenuCommandService commandServ\n                 Telemetry.TrackUserTask(\"Open-InstallDialog\");\n             }\n         }\n+\n+        private async Task<Manifest> GetManifestAsync(string configFilePath, IDependencies dependencies)\n+        {\n+            RunningDocumentTable rdt = new RunningDocumentTable(ServiceProvider.GlobalProvider);\n+            IVsTextBuffer textBuffer = rdt.FindDocument(configFilePath) as IVsTextBuffer;\n+\n+            Manifest manifest = null;\n+\n+            // If the textBuffer is null, then libman.json is not open. In that case, we'll get the manifest from the the file.\n+            // If textBuffer is not null, then libman.json file is open and could be dirty. So we'll get the contents for the manifest from the text buffer.\n+            if (textBuffer == null)\n+            {\n+                manifest = await Manifest.FromFileAsync(configFilePath, dependencies, CancellationToken.None).ConfigureAwait(false);\n+            }\n+            else\n+            {\n+                IComponentModel componentModel = ServiceProvider.GlobalProvider.GetService(typeof(SComponentModel)) as IComponentModel;\n+                IVsEditorAdaptersFactoryService editorAdapterService = componentModel.GetService<IVsEditorAdaptersFactoryService>();\n+\n+                ITextBuffer documentBuffer = editorAdapterService.GetDocumentBuffer(textBuffer);\n+\n+                if (documentBuffer != null)","path":"src/LibraryManager.Vsix/Commands/InstallLibraryCommand.cs","position":50,"original_position":50,"commit_id":"7017a846db60bc3c95808ed8ca46e2220996abc1","original_commit_id":"7017a846db60bc3c95808ed8ca46e2220996abc1","user":{"login":"ToddGrun","id":6785178,"node_id":"MDQ6VXNlcjY3ODUxNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/6785178?v=4","gravatar_id":"","url":"https://api.github.com/users/ToddGrun","html_url":"https://github.com/ToddGrun","followers_url":"https://api.github.com/users/ToddGrun/followers","following_url":"https://api.github.com/users/ToddGrun/following{/other_user}","gists_url":"https://api.github.com/users/ToddGrun/gists{/gist_id}","starred_url":"https://api.github.com/users/ToddGrun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToddGrun/subscriptions","organizations_url":"https://api.github.com/users/ToddGrun/orgs","repos_url":"https://api.github.com/users/ToddGrun/repos","events_url":"https://api.github.com/users/ToddGrun/events{/privacy}","received_events_url":"https://api.github.com/users/ToddGrun/received_events","type":"User","site_admin":false},"body":">if (documentBuffer != null) [](start = 16, length = 27)\r\n\r\nIs this expected to be possible? If yes, then maybe we should use the Manifest.FromFileAsync code above","created_at":"2018-07-17T19:59:32Z","updated_at":"2018-07-17T19:59:32Z","html_url":"https://github.com/aspnet/LibraryManager/pull/323#discussion_r203158515","pull_request_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/comments/203158515"},"html":{"href":"https://github.com/aspnet/LibraryManager/pull/323#discussion_r203158515"},"pull_request":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323","id":202051050,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMDUxMDUw","html_url":"https://github.com/aspnet/LibraryManager/pull/323","diff_url":"https://github.com/aspnet/LibraryManager/pull/323.diff","patch_url":"https://github.com/aspnet/LibraryManager/pull/323.patch","issue_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/323","number":323,"state":"open","locked":false,"title":"Get manifest contents from buffer if file is open","user":{"login":"bhsubra","id":30270536,"node_id":"MDQ6VXNlcjMwMjcwNTM2","avatar_url":"https://avatars1.githubusercontent.com/u/30270536?v=4","gravatar_id":"","url":"https://api.github.com/users/bhsubra","html_url":"https://github.com/bhsubra","followers_url":"https://api.github.com/users/bhsubra/followers","following_url":"https://api.github.com/users/bhsubra/following{/other_user}","gists_url":"https://api.github.com/users/bhsubra/gists{/gist_id}","starred_url":"https://api.github.com/users/bhsubra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhsubra/subscriptions","organizations_url":"https://api.github.com/users/bhsubra/orgs","repos_url":"https://api.github.com/users/bhsubra/repos","events_url":"https://api.github.com/users/bhsubra/events{/privacy}","received_events_url":"https://api.github.com/users/bhsubra/received_events","type":"User","site_admin":false},"body":"Get manifest contents from buffer if file is open","created_at":"2018-07-17T19:53:46Z","updated_at":"2018-07-17T19:59:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65bc8c30026aa1325325a0d285853c8a4f7d38a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323/commits","review_comments_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323/comments","review_comment_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/323/comments","statuses_url":"https://api.github.com/repos/aspnet/LibraryManager/statuses/7017a846db60bc3c95808ed8ca46e2220996abc1","head":{"label":"aspnet:dev/bhsubra/InstallLibraryCommandAddCheckForFileOpen","ref":"dev/bhsubra/InstallLibraryCommandAddCheckForFileOpen","sha":"7017a846db60bc3c95808ed8ca46e2220996abc1","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":86659919,"node_id":"MDEwOlJlcG9zaXRvcnk4NjY1OTkxOQ==","name":"LibraryManager","full_name":"aspnet/LibraryManager","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/LibraryManager","description":null,"fork":false,"url":"https://api.github.com/repos/aspnet/LibraryManager","forks_url":"https://api.github.com/repos/aspnet/LibraryManager/forks","keys_url":"https://api.github.com/repos/aspnet/LibraryManager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/LibraryManager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/LibraryManager/teams","hooks_url":"https://api.github.com/repos/aspnet/LibraryManager/hooks","issue_events_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/LibraryManager/events","assignees_url":"https://api.github.com/repos/aspnet/LibraryManager/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/LibraryManager/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/LibraryManager/tags","blobs_url":"https://api.github.com/repos/aspnet/LibraryManager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/LibraryManager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/LibraryManager/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/LibraryManager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/LibraryManager/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/LibraryManager/languages","stargazers_url":"https://api.github.com/repos/aspnet/LibraryManager/stargazers","contributors_url":"https://api.github.com/repos/aspnet/LibraryManager/contributors","subscribers_url":"https://api.github.com/repos/aspnet/LibraryManager/subscribers","subscription_url":"https://api.github.com/repos/aspnet/LibraryManager/subscription","commits_url":"https://api.github.com/repos/aspnet/LibraryManager/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/LibraryManager/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/LibraryManager/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/LibraryManager/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/LibraryManager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/LibraryManager/merges","archive_url":"https://api.github.com/repos/aspnet/LibraryManager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/LibraryManager/downloads","issues_url":"https://api.github.com/repos/aspnet/LibraryManager/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/LibraryManager/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/LibraryManager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/LibraryManager/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/LibraryManager/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/LibraryManager/deployments","created_at":"2017-03-30T04:46:16Z","updated_at":"2018-07-17T10:47:53Z","pushed_at":"2018-07-17T19:53:47Z","git_url":"git://github.com/aspnet/LibraryManager.git","ssh_url":"git@github.com:aspnet/LibraryManager.git","clone_url":"https://github.com/aspnet/LibraryManager.git","svn_url":"https://github.com/aspnet/LibraryManager","homepage":null,"size":2248,"stargazers_count":110,"watchers_count":110,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":99,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":99,"watchers":110,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"936f00293cb8f08c6b84632b18309f9539e53067","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":86659919,"node_id":"MDEwOlJlcG9zaXRvcnk4NjY1OTkxOQ==","name":"LibraryManager","full_name":"aspnet/LibraryManager","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/LibraryManager","description":null,"fork":false,"url":"https://api.github.com/repos/aspnet/LibraryManager","forks_url":"https://api.github.com/repos/aspnet/LibraryManager/forks","keys_url":"https://api.github.com/repos/aspnet/LibraryManager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/LibraryManager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/LibraryManager/teams","hooks_url":"https://api.github.com/repos/aspnet/LibraryManager/hooks","issue_events_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/LibraryManager/events","assignees_url":"https://api.github.com/repos/aspnet/LibraryManager/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/LibraryManager/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/LibraryManager/tags","blobs_url":"https://api.github.com/repos/aspnet/LibraryManager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/LibraryManager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/LibraryManager/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/LibraryManager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/LibraryManager/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/LibraryManager/languages","stargazers_url":"https://api.github.com/repos/aspnet/LibraryManager/stargazers","contributors_url":"https://api.github.com/repos/aspnet/LibraryManager/contributors","subscribers_url":"https://api.github.com/repos/aspnet/LibraryManager/subscribers","subscription_url":"https://api.github.com/repos/aspnet/LibraryManager/subscription","commits_url":"https://api.github.com/repos/aspnet/LibraryManager/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/LibraryManager/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/LibraryManager/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/LibraryManager/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/LibraryManager/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/LibraryManager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/LibraryManager/merges","archive_url":"https://api.github.com/repos/aspnet/LibraryManager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/LibraryManager/downloads","issues_url":"https://api.github.com/repos/aspnet/LibraryManager/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/LibraryManager/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/LibraryManager/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/LibraryManager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/LibraryManager/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/LibraryManager/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/LibraryManager/deployments","created_at":"2017-03-30T04:46:16Z","updated_at":"2018-07-17T10:47:53Z","pushed_at":"2018-07-17T19:53:47Z","git_url":"git://github.com/aspnet/LibraryManager.git","ssh_url":"git@github.com:aspnet/LibraryManager.git","clone_url":"https://github.com/aspnet/LibraryManager.git","svn_url":"https://github.com/aspnet/LibraryManager","homepage":null,"size":2248,"stargazers_count":110,"watchers_count":110,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":99,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":99,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323"},"html":{"href":"https://github.com/aspnet/LibraryManager/pull/323"},"issue":{"href":"https://api.github.com/repos/aspnet/LibraryManager/issues/323"},"comments":{"href":"https://api.github.com/repos/aspnet/LibraryManager/issues/323/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/LibraryManager/pulls/323/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/LibraryManager/statuses/7017a846db60bc3c95808ed8ca46e2220996abc1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ToddGrun"}}