{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/39094808","id":39094808,"diff_hunk":"@@ -0,0 +1,25 @@\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.Threading;\n+using Microsoft.CodeAnalysis.CSharp.Extensions;\n+using Microsoft.CodeAnalysis.CSharp.Extensions.ContextQuery;\n+\n+namespace Microsoft.CodeAnalysis.CSharp.Completion.KeywordRecommenders\n+{\n+    internal class LoadKeywordRecommender : AbstractSyntacticSingleKeywordRecommender\n+    {\n+        public LoadKeywordRecommender()\n+            : base(SyntaxKind.LoadKeyword, isValidInPreprocessorContext: true)\n+        {\n+        }\n+\n+        protected override bool IsValidContext(int position, CSharpSyntaxContext context, CancellationToken cancellationToken)\n+        {\n+            var syntaxTree = context.SyntaxTree;\n+            return\n+                syntaxTree.IsInteractiveOrScript() &&\n+                syntaxTree.IsBeforeFirstToken(position, cancellationToken) &&\n+                context.IsPreProcessorKeywordContext;","path":"src/Features/CSharp/Portable/Completion/KeywordRecommenders/LoadKeywordRecommender.cs","position":null,"original_position":22,"commit_id":"022e994370bcbdb35bc741c611d6f1d46e617de4","original_commit_id":"bd69fb6ec65bd698fdfafff3111825dd0d19c2fb","user":{"login":"KevinH-MS","id":6464209,"avatar_url":"https://avatars.githubusercontent.com/u/6464209?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinH-MS","html_url":"https://github.com/KevinH-MS","followers_url":"https://api.github.com/users/KevinH-MS/followers","following_url":"https://api.github.com/users/KevinH-MS/following{/other_user}","gists_url":"https://api.github.com/users/KevinH-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinH-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinH-MS/subscriptions","organizations_url":"https://api.github.com/users/KevinH-MS/orgs","repos_url":"https://api.github.com/users/KevinH-MS/repos","events_url":"https://api.github.com/users/KevinH-MS/events{/privacy}","received_events_url":"https://api.github.com/users/KevinH-MS/received_events","type":"User","site_admin":false},"body":"I've gone ahead and moved the ```context.IsPreProcessorKeywordContext``` check to the start of ```IsValidContext``` in all the recommenders where it would be more optimal to do so.","created_at":"2015-09-09T20:53:28Z","updated_at":"2015-09-09T20:53:28Z","html_url":"https://github.com/dotnet/roslyn/pull/5105#discussion_r39094808","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5105","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/39094808"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5105#discussion_r39094808"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5105"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/5105","id":44587513,"html_url":"https://github.com/dotnet/roslyn/pull/5105","diff_url":"https://github.com/dotnet/roslyn/pull/5105.diff","patch_url":"https://github.com/dotnet/roslyn/pull/5105.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/5105","number":5105,"state":"open","locked":false,"title":"Fix completion for #load...","user":{"login":"KevinH-MS","id":6464209,"avatar_url":"https://avatars.githubusercontent.com/u/6464209?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinH-MS","html_url":"https://github.com/KevinH-MS","followers_url":"https://api.github.com/users/KevinH-MS/followers","following_url":"https://api.github.com/users/KevinH-MS/following{/other_user}","gists_url":"https://api.github.com/users/KevinH-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinH-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinH-MS/subscriptions","organizations_url":"https://api.github.com/users/KevinH-MS/orgs","repos_url":"https://api.github.com/users/KevinH-MS/repos","events_url":"https://api.github.com/users/KevinH-MS/events{/privacy}","received_events_url":"https://api.github.com/users/KevinH-MS/received_events","type":"User","site_admin":false},"body":"- Add a keyword recommender for \"load\"\r\n- Move \"```LoadCommandCompletionProvider```\" to the right layer and rename to \"```LoadDirectiveCompletionProvider```\".","created_at":"2015-09-09T19:03:02Z","updated_at":"2015-09-09T20:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"205bc328fa22601f984c0edfcfba73d42bbd4531","assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/12","html_url":"https://github.com/dotnet/roslyn/milestones/1.1(preview)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/12/labels","id":1230243,"number":12,"title":"1.1(preview)","description":"","creator":{"login":"ManishJayaswal","id":9527491,"avatar_url":"https://avatars.githubusercontent.com/u/9527491?v=3","gravatar_id":"","url":"https://api.github.com/users/ManishJayaswal","html_url":"https://github.com/ManishJayaswal","followers_url":"https://api.github.com/users/ManishJayaswal/followers","following_url":"https://api.github.com/users/ManishJayaswal/following{/other_user}","gists_url":"https://api.github.com/users/ManishJayaswal/gists{/gist_id}","starred_url":"https://api.github.com/users/ManishJayaswal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManishJayaswal/subscriptions","organizations_url":"https://api.github.com/users/ManishJayaswal/orgs","repos_url":"https://api.github.com/users/ManishJayaswal/repos","events_url":"https://api.github.com/users/ManishJayaswal/events{/privacy}","received_events_url":"https://api.github.com/users/ManishJayaswal/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":37,"state":"open","created_at":"2015-07-28T20:37:13Z","updated_at":"2015-09-09T19:03:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5105/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5105/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/5105/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/022e994370bcbdb35bc741c611d6f1d46e617de4","head":{"label":"KevinH-MS:LoadDirectiveCompletion","ref":"LoadDirectiveCompletion","sha":"022e994370bcbdb35bc741c611d6f1d46e617de4","user":{"login":"KevinH-MS","id":6464209,"avatar_url":"https://avatars.githubusercontent.com/u/6464209?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinH-MS","html_url":"https://github.com/KevinH-MS","followers_url":"https://api.github.com/users/KevinH-MS/followers","following_url":"https://api.github.com/users/KevinH-MS/following{/other_user}","gists_url":"https://api.github.com/users/KevinH-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinH-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinH-MS/subscriptions","organizations_url":"https://api.github.com/users/KevinH-MS/orgs","repos_url":"https://api.github.com/users/KevinH-MS/repos","events_url":"https://api.github.com/users/KevinH-MS/events{/privacy}","received_events_url":"https://api.github.com/users/KevinH-MS/received_events","type":"User","site_admin":false},"repo":{"id":30554696,"name":"roslyn","full_name":"KevinH-MS/roslyn","owner":{"login":"KevinH-MS","id":6464209,"avatar_url":"https://avatars.githubusercontent.com/u/6464209?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinH-MS","html_url":"https://github.com/KevinH-MS","followers_url":"https://api.github.com/users/KevinH-MS/followers","following_url":"https://api.github.com/users/KevinH-MS/following{/other_user}","gists_url":"https://api.github.com/users/KevinH-MS/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinH-MS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinH-MS/subscriptions","organizations_url":"https://api.github.com/users/KevinH-MS/orgs","repos_url":"https://api.github.com/users/KevinH-MS/repos","events_url":"https://api.github.com/users/KevinH-MS/events{/privacy}","received_events_url":"https://api.github.com/users/KevinH-MS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KevinH-MS/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/KevinH-MS/roslyn","forks_url":"https://api.github.com/repos/KevinH-MS/roslyn/forks","keys_url":"https://api.github.com/repos/KevinH-MS/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KevinH-MS/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KevinH-MS/roslyn/teams","hooks_url":"https://api.github.com/repos/KevinH-MS/roslyn/hooks","issue_events_url":"https://api.github.com/repos/KevinH-MS/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/KevinH-MS/roslyn/events","assignees_url":"https://api.github.com/repos/KevinH-MS/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/KevinH-MS/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/KevinH-MS/roslyn/tags","blobs_url":"https://api.github.com/repos/KevinH-MS/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KevinH-MS/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KevinH-MS/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/KevinH-MS/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KevinH-MS/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/KevinH-MS/roslyn/languages","stargazers_url":"https://api.github.com/repos/KevinH-MS/roslyn/stargazers","contributors_url":"https://api.github.com/repos/KevinH-MS/roslyn/contributors","subscribers_url":"https://api.github.com/repos/KevinH-MS/roslyn/subscribers","subscription_url":"https://api.github.com/repos/KevinH-MS/roslyn/subscription","commits_url":"https://api.github.com/repos/KevinH-MS/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/KevinH-MS/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/KevinH-MS/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/KevinH-MS/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/KevinH-MS/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/KevinH-MS/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KevinH-MS/roslyn/merges","archive_url":"https://api.github.com/repos/KevinH-MS/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KevinH-MS/roslyn/downloads","issues_url":"https://api.github.com/repos/KevinH-MS/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/KevinH-MS/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/KevinH-MS/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/KevinH-MS/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KevinH-MS/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/KevinH-MS/roslyn/releases{/id}","created_at":"2015-02-09T19:43:41Z","updated_at":"2015-05-04T16:17:24Z","pushed_at":"2015-09-09T20:49:55Z","git_url":"git://github.com/KevinH-MS/roslyn.git","ssh_url":"git@github.com:KevinH-MS/roslyn.git","clone_url":"https://github.com/KevinH-MS/roslyn.git","svn_url":"https://github.com/KevinH-MS/roslyn","homepage":"","size":94431,"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":"a18f641c80a1060a113ee32ff670f05884ed6b10","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}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-09-09T19:36:06Z","pushed_at":"2015-09-09T20:49: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":185219,"stargazers_count":3225,"watchers_count":3225,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":745,"mirror_url":null,"open_issues_count":1445,"forks":745,"open_issues":1445,"watchers":3225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5105"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5105"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5105"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5105/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5105/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5105/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/022e994370bcbdb35bc741c611d6f1d46e617de4"}}}}