{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/37591239","id":37591239,"diff_hunk":"@@ -5,6 +5,6 @@ namespace Microsoft.Framework.Configuration\n {\n     public static class Constants\n     {\n-        public static readonly string KeyDelimiter = \":\";\n+        public static readonly string[] KeyDelimiter = new[] { \":\" };","path":"src/Microsoft.Framework.Configuration/Constants.cs","position":5,"original_position":5,"commit_id":"9e342f34229f6dd68fde3dd4051cf6d4a359404c","original_commit_id":"9e342f34229f6dd68fde3dd4051cf6d4a359404c","user":{"login":"divega","id":1253414,"avatar_url":"https://avatars.githubusercontent.com/u/1253414?v=3","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"body":"@hishamco it is fine to cache the array but I think the code would look cleaner if you kept it separate, e.g. keep `string KeyDelimiter` as is on Constants and add `private static readonly string[] KeyDelimiterArray = new[] { KeyDelimiter }` on ConfigurationKeyCompare to use in that particular case. Seeing the KeyDelimiter[0] on all but that usages is puzzling. Also Constants is public API and you don't want it to look weird because of an optimization like this.","created_at":"2015-08-20T23:04:40Z","updated_at":"2015-08-20T23:04:40Z","html_url":"https://github.com/aspnet/Configuration/pull/225#discussion_r37591239","pull_request_url":"https://api.github.com/repos/aspnet/Configuration/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/37591239"},"html":{"href":"https://github.com/aspnet/Configuration/pull/225#discussion_r37591239"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/225","id":37615810,"html_url":"https://github.com/aspnet/Configuration/pull/225","diff_url":"https://github.com/aspnet/Configuration/pull/225.diff","patch_url":"https://github.com/aspnet/Configuration/pull/225.patch","issue_url":"https://api.github.com/repos/aspnet/Configuration/issues/225","number":225,"state":"open","locked":false,"title":"Using 'KeyDelimiter' instead of \":\"","user":{"login":"hishamco","id":3237266,"avatar_url":"https://avatars.githubusercontent.com/u/3237266?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamco","html_url":"https://github.com/hishamco","followers_url":"https://api.github.com/users/hishamco/followers","following_url":"https://api.github.com/users/hishamco/following{/other_user}","gists_url":"https://api.github.com/users/hishamco/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamco/subscriptions","organizations_url":"https://api.github.com/users/hishamco/orgs","repos_url":"https://api.github.com/users/hishamco/repos","events_url":"https://api.github.com/users/hishamco/events{/privacy}","received_events_url":"https://api.github.com/users/hishamco/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-13T00:46:45Z","updated_at":"2015-08-20T23:04:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dd6046cf8c86c07fc240735a22072e8b1870f32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Configuration/pulls/225/commits","review_comments_url":"https://api.github.com/repos/aspnet/Configuration/pulls/225/comments","review_comment_url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Configuration/issues/225/comments","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/9e342f34229f6dd68fde3dd4051cf6d4a359404c","head":{"label":"hishamco:dev","ref":"dev","sha":"9e342f34229f6dd68fde3dd4051cf6d4a359404c","user":{"login":"hishamco","id":3237266,"avatar_url":"https://avatars.githubusercontent.com/u/3237266?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamco","html_url":"https://github.com/hishamco","followers_url":"https://api.github.com/users/hishamco/followers","following_url":"https://api.github.com/users/hishamco/following{/other_user}","gists_url":"https://api.github.com/users/hishamco/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamco/subscriptions","organizations_url":"https://api.github.com/users/hishamco/orgs","repos_url":"https://api.github.com/users/hishamco/repos","events_url":"https://api.github.com/users/hishamco/events{/privacy}","received_events_url":"https://api.github.com/users/hishamco/received_events","type":"User","site_admin":false},"repo":{"id":35168875,"name":"Configuration","full_name":"hishamco/Configuration","owner":{"login":"hishamco","id":3237266,"avatar_url":"https://avatars.githubusercontent.com/u/3237266?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamco","html_url":"https://github.com/hishamco","followers_url":"https://api.github.com/users/hishamco/followers","following_url":"https://api.github.com/users/hishamco/following{/other_user}","gists_url":"https://api.github.com/users/hishamco/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamco/subscriptions","organizations_url":"https://api.github.com/users/hishamco/orgs","repos_url":"https://api.github.com/users/hishamco/repos","events_url":"https://api.github.com/users/hishamco/events{/privacy}","received_events_url":"https://api.github.com/users/hishamco/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hishamco/Configuration","description":"Interfaces and providers for accessing simple config files.","fork":true,"url":"https://api.github.com/repos/hishamco/Configuration","forks_url":"https://api.github.com/repos/hishamco/Configuration/forks","keys_url":"https://api.github.com/repos/hishamco/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hishamco/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hishamco/Configuration/teams","hooks_url":"https://api.github.com/repos/hishamco/Configuration/hooks","issue_events_url":"https://api.github.com/repos/hishamco/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/hishamco/Configuration/events","assignees_url":"https://api.github.com/repos/hishamco/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/hishamco/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/hishamco/Configuration/tags","blobs_url":"https://api.github.com/repos/hishamco/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hishamco/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hishamco/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/hishamco/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hishamco/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/hishamco/Configuration/languages","stargazers_url":"https://api.github.com/repos/hishamco/Configuration/stargazers","contributors_url":"https://api.github.com/repos/hishamco/Configuration/contributors","subscribers_url":"https://api.github.com/repos/hishamco/Configuration/subscribers","subscription_url":"https://api.github.com/repos/hishamco/Configuration/subscription","commits_url":"https://api.github.com/repos/hishamco/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/hishamco/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/hishamco/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/hishamco/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/hishamco/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/hishamco/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hishamco/Configuration/merges","archive_url":"https://api.github.com/repos/hishamco/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hishamco/Configuration/downloads","issues_url":"https://api.github.com/repos/hishamco/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/hishamco/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/hishamco/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/hishamco/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hishamco/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/hishamco/Configuration/releases{/id}","created_at":"2015-05-06T16:02:52Z","updated_at":"2015-05-06T16:06:44Z","pushed_at":"2015-08-15T22:23:24Z","git_url":"git://github.com/hishamco/Configuration.git","ssh_url":"git@github.com:hishamco/Configuration.git","clone_url":"https://github.com/hishamco/Configuration.git","svn_url":"https://github.com/hishamco/Configuration","homepage":"","size":720,"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":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"28b62f048953ff0b17661a3d15679b5ac763e393","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","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":16329342,"name":"Configuration","full_name":"aspnet/Configuration","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","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/Configuration","description":"Interfaces and providers for accessing simple config files.","fork":false,"url":"https://api.github.com/repos/aspnet/Configuration","forks_url":"https://api.github.com/repos/aspnet/Configuration/forks","keys_url":"https://api.github.com/repos/aspnet/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Configuration/teams","hooks_url":"https://api.github.com/repos/aspnet/Configuration/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Configuration/events","assignees_url":"https://api.github.com/repos/aspnet/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Configuration/tags","blobs_url":"https://api.github.com/repos/aspnet/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Configuration/languages","stargazers_url":"https://api.github.com/repos/aspnet/Configuration/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Configuration/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Configuration/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Configuration/subscription","commits_url":"https://api.github.com/repos/aspnet/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Configuration/merges","archive_url":"https://api.github.com/repos/aspnet/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Configuration/downloads","issues_url":"https://api.github.com/repos/aspnet/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Configuration/releases{/id}","created_at":"2014-01-28T23:11:33Z","updated_at":"2015-08-17T03:08:09Z","pushed_at":"2015-08-20T22:31:20Z","git_url":"git://github.com/aspnet/Configuration.git","ssh_url":"git@github.com:aspnet/Configuration.git","clone_url":"https://github.com/aspnet/Configuration.git","svn_url":"https://github.com/aspnet/Configuration","homepage":"","size":3072,"stargazers_count":89,"watchers_count":89,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":39,"forks":47,"open_issues":39,"watchers":89,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/225"},"html":{"href":"https://github.com/aspnet/Configuration/pull/225"},"issue":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/225"},"comments":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Configuration/statuses/9e342f34229f6dd68fde3dd4051cf6d4a359404c"}}}}