{"action":"created","comment":{"url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/comments/196046824","pull_request_review_id":129524818,"id":196046824,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA0NjgyNA==","diff_hunk":"@@ -13,11 +12,14 @@ public static void Initialize()\n         {\n             CommandsAsString = ReadCommandsAsString();\n             CheckEmptyEntries(CommandsAsString);\n+            commands = CommandsAsString\n+                .Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)\n+                .ToImmutableArray();\n         }\n \n         public static string CommandsAsString { get; private set; }\n \n-        private static ImmutableArray<string> commands;\n+        private static ImmutableArray<string> commands = new ImmutableArray<string>();","path":"src/Helpers/VsCommands.cs","position":18,"original_position":18,"commit_id":"b17273717575c5b4c2d4e73789f44f33397023e8","original_commit_id":"b17273717575c5b4c2d4e73789f44f33397023e8","user":{"login":"bjorndaniel","id":802037,"node_id":"MDQ6VXNlcjgwMjAzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/802037?v=4","gravatar_id":"","url":"https://api.github.com/users/bjorndaniel","html_url":"https://github.com/bjorndaniel","followers_url":"https://api.github.com/users/bjorndaniel/followers","following_url":"https://api.github.com/users/bjorndaniel/following{/other_user}","gists_url":"https://api.github.com/users/bjorndaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorndaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorndaniel/subscriptions","organizations_url":"https://api.github.com/users/bjorndaniel/orgs","repos_url":"https://api.github.com/users/bjorndaniel/repos","events_url":"https://api.github.com/users/bjorndaniel/events{/privacy}","received_events_url":"https://api.github.com/users/bjorndaniel/received_events","type":"User","site_admin":false},"body":"Without the initialization it crashes on search here:\r\n\r\n```\r\nvar results = Commands.Where(c => c.IndexOf(searchText, StringComparison.InvariantCultureIgnoreCase) > -1);\r\n\r\n```\r\n\r\nSo it is not null as you point out but still != ImmutableArray<string>.Empty and will therefore not be initialized..\r\nAdding \r\n```\r\n private ImmutableArray<string> commands = ImmutableArray<string>.Empty;\r\n```\r\nwould also work.\r\nI don't wanna get into a big argument about this, I just want the control to work and not crash, since the CustomControls are what I use most for this extension.\r\n","created_at":"2018-06-18T11:41:05Z","updated_at":"2018-06-18T11:41:05Z","html_url":"https://github.com/madskristensen/DialToolsForVS/pull/24#discussion_r196046824","pull_request_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/comments/196046824"},"html":{"href":"https://github.com/madskristensen/DialToolsForVS/pull/24#discussion_r196046824"},"pull_request":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24"}},"in_reply_to_id":195691270},"pull_request":{"url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24","id":195098673,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDk4Njcz","html_url":"https://github.com/madskristensen/DialToolsForVS/pull/24","diff_url":"https://github.com/madskristensen/DialToolsForVS/pull/24.diff","patch_url":"https://github.com/madskristensen/DialToolsForVS/pull/24.patch","issue_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/24","number":24,"state":"open","locked":false,"title":"Fix for crash on custom controls","user":{"login":"bjorndaniel","id":802037,"node_id":"MDQ6VXNlcjgwMjAzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/802037?v=4","gravatar_id":"","url":"https://api.github.com/users/bjorndaniel","html_url":"https://github.com/bjorndaniel","followers_url":"https://api.github.com/users/bjorndaniel/followers","following_url":"https://api.github.com/users/bjorndaniel/following{/other_user}","gists_url":"https://api.github.com/users/bjorndaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorndaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorndaniel/subscriptions","organizations_url":"https://api.github.com/users/bjorndaniel/orgs","repos_url":"https://api.github.com/users/bjorndaniel/repos","events_url":"https://api.github.com/users/bjorndaniel/events{/privacy}","received_events_url":"https://api.github.com/users/bjorndaniel/received_events","type":"User","site_admin":false},"body":"This PR fixes issue #23 by re-adding initialization of the commands available in the Custom Controls dialog. The function that initializes them had somehow gotten lost in a previous pr causing VS to crash when searching for commands.","created_at":"2018-06-15T07:39:21Z","updated_at":"2018-06-18T11:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64a7a4624278155f6040b86f8aaf635c1b42f614","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24/commits","review_comments_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24/comments","review_comment_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/24/comments","statuses_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/statuses/b17273717575c5b4c2d4e73789f44f33397023e8","head":{"label":"bjorndaniel:master","ref":"master","sha":"b17273717575c5b4c2d4e73789f44f33397023e8","user":{"login":"bjorndaniel","id":802037,"node_id":"MDQ6VXNlcjgwMjAzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/802037?v=4","gravatar_id":"","url":"https://api.github.com/users/bjorndaniel","html_url":"https://github.com/bjorndaniel","followers_url":"https://api.github.com/users/bjorndaniel/followers","following_url":"https://api.github.com/users/bjorndaniel/following{/other_user}","gists_url":"https://api.github.com/users/bjorndaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorndaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorndaniel/subscriptions","organizations_url":"https://api.github.com/users/bjorndaniel/orgs","repos_url":"https://api.github.com/users/bjorndaniel/repos","events_url":"https://api.github.com/users/bjorndaniel/events{/privacy}","received_events_url":"https://api.github.com/users/bjorndaniel/received_events","type":"User","site_admin":false},"repo":{"id":93091038,"node_id":"MDEwOlJlcG9zaXRvcnk5MzA5MTAzOA==","name":"DialToolsForVS","full_name":"bjorndaniel/DialToolsForVS","owner":{"login":"bjorndaniel","id":802037,"node_id":"MDQ6VXNlcjgwMjAzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/802037?v=4","gravatar_id":"","url":"https://api.github.com/users/bjorndaniel","html_url":"https://github.com/bjorndaniel","followers_url":"https://api.github.com/users/bjorndaniel/followers","following_url":"https://api.github.com/users/bjorndaniel/following{/other_user}","gists_url":"https://api.github.com/users/bjorndaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorndaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorndaniel/subscriptions","organizations_url":"https://api.github.com/users/bjorndaniel/orgs","repos_url":"https://api.github.com/users/bjorndaniel/repos","events_url":"https://api.github.com/users/bjorndaniel/events{/privacy}","received_events_url":"https://api.github.com/users/bjorndaniel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bjorndaniel/DialToolsForVS","description":"A Visual Studio extension","fork":true,"url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS","forks_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/forks","keys_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/teams","hooks_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/hooks","issue_events_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/issues/events{/number}","events_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/events","assignees_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/assignees{/user}","branches_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/branches{/branch}","tags_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/tags","blobs_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/statuses/{sha}","languages_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/languages","stargazers_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/stargazers","contributors_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/contributors","subscribers_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/subscribers","subscription_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/subscription","commits_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/contents/{+path}","compare_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/merges","archive_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/downloads","issues_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/issues{/number}","pulls_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/pulls{/number}","milestones_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/milestones{/number}","notifications_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/labels{/name}","releases_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/releases{/id}","deployments_url":"https://api.github.com/repos/bjorndaniel/DialToolsForVS/deployments","created_at":"2017-06-01T19:12:46Z","updated_at":"2018-06-15T07:39:15Z","pushed_at":"2018-06-15T07:39:14Z","git_url":"git://github.com/bjorndaniel/DialToolsForVS.git","ssh_url":"git@github.com:bjorndaniel/DialToolsForVS.git","clone_url":"https://github.com/bjorndaniel/DialToolsForVS.git","svn_url":"https://github.com/bjorndaniel/DialToolsForVS","homepage":null,"size":226,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"madskristensen:master","ref":"master","sha":"d2ab1526c57b05c08b8c9d499526f44a609dc85b","user":{"login":"madskristensen","id":1258877,"node_id":"MDQ6VXNlcjEyNTg4Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1258877?v=4","gravatar_id":"","url":"https://api.github.com/users/madskristensen","html_url":"https://github.com/madskristensen","followers_url":"https://api.github.com/users/madskristensen/followers","following_url":"https://api.github.com/users/madskristensen/following{/other_user}","gists_url":"https://api.github.com/users/madskristensen/gists{/gist_id}","starred_url":"https://api.github.com/users/madskristensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madskristensen/subscriptions","organizations_url":"https://api.github.com/users/madskristensen/orgs","repos_url":"https://api.github.com/users/madskristensen/repos","events_url":"https://api.github.com/users/madskristensen/events{/privacy}","received_events_url":"https://api.github.com/users/madskristensen/received_events","type":"User","site_admin":false},"repo":{"id":82880481,"node_id":"MDEwOlJlcG9zaXRvcnk4Mjg4MDQ4MQ==","name":"DialToolsForVS","full_name":"madskristensen/DialToolsForVS","owner":{"login":"madskristensen","id":1258877,"node_id":"MDQ6VXNlcjEyNTg4Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1258877?v=4","gravatar_id":"","url":"https://api.github.com/users/madskristensen","html_url":"https://github.com/madskristensen","followers_url":"https://api.github.com/users/madskristensen/followers","following_url":"https://api.github.com/users/madskristensen/following{/other_user}","gists_url":"https://api.github.com/users/madskristensen/gists{/gist_id}","starred_url":"https://api.github.com/users/madskristensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madskristensen/subscriptions","organizations_url":"https://api.github.com/users/madskristensen/orgs","repos_url":"https://api.github.com/users/madskristensen/repos","events_url":"https://api.github.com/users/madskristensen/events{/privacy}","received_events_url":"https://api.github.com/users/madskristensen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/madskristensen/DialToolsForVS","description":"A Visual Studio extension","fork":false,"url":"https://api.github.com/repos/madskristensen/DialToolsForVS","forks_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/forks","keys_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/teams","hooks_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/hooks","issue_events_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/events{/number}","events_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/events","assignees_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/assignees{/user}","branches_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/branches{/branch}","tags_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/tags","blobs_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/statuses/{sha}","languages_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/languages","stargazers_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/stargazers","contributors_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/contributors","subscribers_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/subscribers","subscription_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/subscription","commits_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/contents/{+path}","compare_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/merges","archive_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/downloads","issues_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues{/number}","pulls_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls{/number}","milestones_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/milestones{/number}","notifications_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/labels{/name}","releases_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/releases{/id}","deployments_url":"https://api.github.com/repos/madskristensen/DialToolsForVS/deployments","created_at":"2017-02-23T03:33:13Z","updated_at":"2018-06-12T17:20:15Z","pushed_at":"2018-06-15T12:21:01Z","git_url":"git://github.com/madskristensen/DialToolsForVS.git","ssh_url":"git@github.com:madskristensen/DialToolsForVS.git","clone_url":"https://github.com/madskristensen/DialToolsForVS.git","svn_url":"https://github.com/madskristensen/DialToolsForVS","homepage":null,"size":230,"stargazers_count":21,"watchers_count":21,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":10,"open_issues":17,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24"},"html":{"href":"https://github.com/madskristensen/DialToolsForVS/pull/24"},"issue":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/24"},"comments":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/madskristensen/DialToolsForVS/statuses/b17273717575c5b4c2d4e73789f44f33397023e8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bjorndaniel"}}