{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Common/pulls/comments/42311613","id":42311613,"diff_hunk":"@@ -253,6 +254,256 @@ public static StringValues Concat(StringValues values1, StringValues values2)\n             return new StringValues(combined);\n         }\n \n+        public static bool Equals(StringValues objA, StringValues objB)\n+        {\n+            if (IsNullOrEmpty(objA))\n+            {\n+                return IsNullOrEmpty(objB);\n+            }\n+\n+            if (objA._values == null)\n+            {\n+                if (objB._values == null)\n+                {\n+                    return objA._value == objB._value;\n+                }\n+\n+                switch (objB._values.Length)\n+                {\n+                    case 0:\n+                        return objA._values == null;\n+                    case 1:\n+                        return objA._value == objB._values[0];\n+                    default:\n+                        return false;\n+                }\n+            }\n+\n+            switch (objA._values.Length)\n+            {\n+                case 0:\n+                    return IsNullOrEmpty(objB);\n+\n+                case 1:\n+                    if (objB._values == null)\n+                    {\n+                        return objA._values[0] == objB._value;\n+                    }\n+                    if (objB._values.Length != 1)\n+                    {\n+                        return false;\n+                    }\n+                    return objB._values[0] == objA._values[0];\n+\n+                default:\n+                    if (objB._values == null)\n+                    {\n+                        return false;\n+                    }\n+                    if (objA._values.Length != objB._values.Length)\n+                    {\n+                        return false;\n+                    }\n+                    for (var i = 0; i < objA._values.Length; i++)\n+                    {\n+                        if (objA._values[i] != objB._values[i])\n+                        {\n+                            return false;\n+                        }\n+                    }\n+                    return true;\n+            }\n+        }\n+\n+        public bool Equals(StringValues other)\n+        {\n+            return Equals(this, other);\n+        }\n+\n+        public static bool Equals(string objB, StringValues objA)\n+        {\n+            return Equals(objA, objB);\n+        }\n+\n+        public static bool Equals(StringValues objA, string objB)","path":"src/Microsoft.Extensions.Primitives/StringValues.cs","position":91,"original_position":91,"commit_id":"46ceef03c084c574c9e855467179538f580641f3","original_commit_id":"46ceef03c084c574c9e855467179538f580641f3","user":{"login":"justinvp","id":710598,"avatar_url":"https://avatars.githubusercontent.com/u/710598?v=3","gravatar_id":"","url":"https://api.github.com/users/justinvp","html_url":"https://github.com/justinvp","followers_url":"https://api.github.com/users/justinvp/followers","following_url":"https://api.github.com/users/justinvp/following{/other_user}","gists_url":"https://api.github.com/users/justinvp/gists{/gist_id}","starred_url":"https://api.github.com/users/justinvp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinvp/subscriptions","organizations_url":"https://api.github.com/users/justinvp/orgs","repos_url":"https://api.github.com/users/justinvp/repos","events_url":"https://api.github.com/users/justinvp/events{/privacy}","received_events_url":"https://api.github.com/users/justinvp/received_events","type":"User","site_admin":false},"body":"The parameters should be named `left` and `right` per the framework design guidelines.","created_at":"2015-10-17T17:25:04Z","updated_at":"2015-10-17T17:25:04Z","html_url":"https://github.com/aspnet/Common/pull/55#discussion_r42311613","pull_request_url":"https://api.github.com/repos/aspnet/Common/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments/42311613"},"html":{"href":"https://github.com/aspnet/Common/pull/55#discussion_r42311613"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Common/pulls/55","id":47984595,"html_url":"https://github.com/aspnet/Common/pull/55","diff_url":"https://github.com/aspnet/Common/pull/55.diff","patch_url":"https://github.com/aspnet/Common/pull/55.patch","issue_url":"https://api.github.com/repos/aspnet/Common/issues/55","number":55,"state":"open","locked":false,"title":"Allow non-boxing equality for StringValues","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"Currently testing for equality with StringValues will box; this allows a non boxing path.\r\n\r\nWhat is equal may be up for debate? \r\n\r\nAlso see https://github.com/aspnet/HttpAbstractions/issues/384","created_at":"2015-10-17T11:07:35Z","updated_at":"2015-10-17T17:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"901ea57d5e149471d7d3b0a86eb560eb7d16369f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Common/pulls/55/commits","review_comments_url":"https://api.github.com/repos/aspnet/Common/pulls/55/comments","review_comment_url":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Common/issues/55/comments","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/46ceef03c084c574c9e855467179538f580641f3","head":{"label":"benaadams:non-boxing-equality","ref":"non-boxing-equality","sha":"46ceef03c084c574c9e855467179538f580641f3","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"repo":{"id":44432538,"name":"Common","full_name":"benaadams/Common","owner":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benaadams/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":true,"url":"https://api.github.com/repos/benaadams/Common","forks_url":"https://api.github.com/repos/benaadams/Common/forks","keys_url":"https://api.github.com/repos/benaadams/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benaadams/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benaadams/Common/teams","hooks_url":"https://api.github.com/repos/benaadams/Common/hooks","issue_events_url":"https://api.github.com/repos/benaadams/Common/issues/events{/number}","events_url":"https://api.github.com/repos/benaadams/Common/events","assignees_url":"https://api.github.com/repos/benaadams/Common/assignees{/user}","branches_url":"https://api.github.com/repos/benaadams/Common/branches{/branch}","tags_url":"https://api.github.com/repos/benaadams/Common/tags","blobs_url":"https://api.github.com/repos/benaadams/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benaadams/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benaadams/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/benaadams/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benaadams/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/benaadams/Common/languages","stargazers_url":"https://api.github.com/repos/benaadams/Common/stargazers","contributors_url":"https://api.github.com/repos/benaadams/Common/contributors","subscribers_url":"https://api.github.com/repos/benaadams/Common/subscribers","subscription_url":"https://api.github.com/repos/benaadams/Common/subscription","commits_url":"https://api.github.com/repos/benaadams/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/benaadams/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/benaadams/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/benaadams/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/benaadams/Common/contents/{+path}","compare_url":"https://api.github.com/repos/benaadams/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benaadams/Common/merges","archive_url":"https://api.github.com/repos/benaadams/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benaadams/Common/downloads","issues_url":"https://api.github.com/repos/benaadams/Common/issues{/number}","pulls_url":"https://api.github.com/repos/benaadams/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/benaadams/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/benaadams/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benaadams/Common/labels{/name}","releases_url":"https://api.github.com/repos/benaadams/Common/releases{/id}","created_at":"2015-10-17T10:16:08Z","updated_at":"2015-10-17T10:16:09Z","pushed_at":"2015-10-17T14:36:23Z","git_url":"git://github.com/benaadams/Common.git","ssh_url":"git@github.com:benaadams/Common.git","clone_url":"https://github.com/benaadams/Common.git","svn_url":"https://github.com/benaadams/Common","homepage":null,"size":977,"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":"bd428d9aa81bc6d536d0d74539c301a0e9efe4ae","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":30932325,"name":"Common","full_name":"aspnet/Common","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/Common","description":"A repository for shared files to be consumed across the ASPNET repos","fork":false,"url":"https://api.github.com/repos/aspnet/Common","forks_url":"https://api.github.com/repos/aspnet/Common/forks","keys_url":"https://api.github.com/repos/aspnet/Common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Common/teams","hooks_url":"https://api.github.com/repos/aspnet/Common/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Common/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Common/events","assignees_url":"https://api.github.com/repos/aspnet/Common/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Common/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Common/tags","blobs_url":"https://api.github.com/repos/aspnet/Common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Common/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Common/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Common/languages","stargazers_url":"https://api.github.com/repos/aspnet/Common/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Common/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Common/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Common/subscription","commits_url":"https://api.github.com/repos/aspnet/Common/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Common/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Common/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Common/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Common/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Common/merges","archive_url":"https://api.github.com/repos/aspnet/Common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Common/downloads","issues_url":"https://api.github.com/repos/aspnet/Common/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Common/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Common/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Common/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Common/releases{/id}","created_at":"2015-02-17T19:02:08Z","updated_at":"2015-10-08T04:04:25Z","pushed_at":"2015-10-17T14:36:23Z","git_url":"git://github.com/aspnet/Common.git","ssh_url":"git@github.com:aspnet/Common.git","clone_url":"https://github.com/aspnet/Common.git","svn_url":"https://github.com/aspnet/Common","homepage":null,"size":977,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":10,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55"},"html":{"href":"https://github.com/aspnet/Common/pull/55"},"issue":{"href":"https://api.github.com/repos/aspnet/Common/issues/55"},"comments":{"href":"https://api.github.com/repos/aspnet/Common/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Common/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Common/statuses/46ceef03c084c574c9e855467179538f580641f3"}}}}