{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/134094280","pull_request_review_id":57352574,"id":134094280,"diff_hunk":"@@ -1117,6 +1117,60 @@ public AssemblyReference GetAssemblyReference(AssemblyReferenceHandle handle)\n             return new AssemblyReference(this, handle.Value);\n         }\n \n+        internal AssemblyName GetAssemblyName()\n+        {\n+            StringHandle nameHandle = AssemblyTable.GetName();\n+\n+            string name = (!nameHandle.IsNil) ? GetString(nameHandle) : null;\n+\n+            Version version = AssemblyTable.GetVersion();\n+\n+            StringHandle cultureHandle = AssemblyTable.GetCulture();\n+            string cultureName = (!cultureHandle.IsNil) ? GetString(cultureHandle) : null;\n+\n+            BlobHandle publicKeyHandle = AssemblyTable.GetPublicKey();\n+            byte[] publicKeyOrToken = !publicKeyHandle.IsNil ? GetBlobBytes(publicKeyHandle) : null;\n+\n+            AssemblyHashAlgorithm assemblyHashAlgorithm = AssemblyTable.GetHashAlgorithm();\n+\n+            AssemblyFlags flags = AssemblyTable.GetFlags();\n+\n+            var assemblyName = new AssemblyName(name)\n+            {\n+                Version = version,\n+                CultureName = cultureName,\n+                HashAlgorithm = (Configuration.Assemblies.AssemblyHashAlgorithm)assemblyHashAlgorithm\n+            };\n+            assemblyName.SetPublicKey(publicKeyOrToken);\n+            SetFlags(assemblyName, flags);\n+\n+            return assemblyName;\n+        }\n+\n+        private void SetFlags(AssemblyName assemblyName, AssemblyFlags flags)\n+        {\n+            if ((flags & AssemblyFlags.PublicKey) != 0)\n+                assemblyName.Flags |= AssemblyNameFlags.PublicKey;\n+            else\n+                assemblyName.Flags &= AssemblyNameFlags.PublicKey;\n+\n+            if ((flags & AssemblyFlags.Retargetable) != 0)\n+                assemblyName.Flags |= AssemblyNameFlags.Retargetable;\n+            else\n+                assemblyName.Flags &= AssemblyNameFlags.Retargetable;","path":"src/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataReader.cs","position":44,"original_position":44,"commit_id":"e74f938da6acddaea237af21678c80daffc70582","original_commit_id":"e74f938da6acddaea237af21678c80daffc70582","user":{"login":"maryamariyan","id":5897654,"avatar_url":"https://avatars2.githubusercontent.com/u/5897654?v=4","gravatar_id":"","url":"https://api.github.com/users/maryamariyan","html_url":"https://github.com/maryamariyan","followers_url":"https://api.github.com/users/maryamariyan/followers","following_url":"https://api.github.com/users/maryamariyan/following{/other_user}","gists_url":"https://api.github.com/users/maryamariyan/gists{/gist_id}","starred_url":"https://api.github.com/users/maryamariyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maryamariyan/subscriptions","organizations_url":"https://api.github.com/users/maryamariyan/orgs","repos_url":"https://api.github.com/users/maryamariyan/repos","events_url":"https://api.github.com/users/maryamariyan/events{/privacy}","received_events_url":"https://api.github.com/users/maryamariyan/received_events","type":"User","site_admin":false},"body":"oh no. You're right. will fix this in next changeset","created_at":"2017-08-19T15:28:54Z","updated_at":"2017-08-19T15:28:54Z","html_url":"https://github.com/dotnet/corefx/pull/23396#discussion_r134094280","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/23396","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/134094280"},"html":{"href":"https://github.com/dotnet/corefx/pull/23396#discussion_r134094280"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23396"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/23396","id":136538298,"html_url":"https://github.com/dotnet/corefx/pull/23396","diff_url":"https://github.com/dotnet/corefx/pull/23396.diff","patch_url":"https://github.com/dotnet/corefx/pull/23396.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/23396","number":23396,"state":"open","locked":false,"title":"Added GetAssemblyName API on MetadataReader","user":{"login":"maryamariyan","id":5897654,"avatar_url":"https://avatars2.githubusercontent.com/u/5897654?v=4","gravatar_id":"","url":"https://api.github.com/users/maryamariyan","html_url":"https://github.com/maryamariyan","followers_url":"https://api.github.com/users/maryamariyan/followers","following_url":"https://api.github.com/users/maryamariyan/following{/other_user}","gists_url":"https://api.github.com/users/maryamariyan/gists{/gist_id}","starred_url":"https://api.github.com/users/maryamariyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maryamariyan/subscriptions","organizations_url":"https://api.github.com/users/maryamariyan/orgs","repos_url":"https://api.github.com/users/maryamariyan/repos","events_url":"https://api.github.com/users/maryamariyan/events{/privacy}","received_events_url":"https://api.github.com/users/maryamariyan/received_events","type":"User","site_admin":false},"body":"Also added AssemblyName getter APIs on AssemblyReference and\r\nAssemblyDefinition\r\n\r\nThis is my initial pull request. \r\nI am looking to get feedback.\r\n\r\nfixes #13295 \r\n\r\ncc: @safern @danmosemsft @tmat @nguerrera ","created_at":"2017-08-18T18:27:58Z","updated_at":"2017-08-19T15:28:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78724c506718510e5b3c866baa986a3ef0ea65b6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/23396/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/23396/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/23396/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/e74f938da6acddaea237af21678c80daffc70582","head":{"label":"maryamariyan:fixes-13295","ref":"fixes-13295","sha":"e74f938da6acddaea237af21678c80daffc70582","user":{"login":"maryamariyan","id":5897654,"avatar_url":"https://avatars2.githubusercontent.com/u/5897654?v=4","gravatar_id":"","url":"https://api.github.com/users/maryamariyan","html_url":"https://github.com/maryamariyan","followers_url":"https://api.github.com/users/maryamariyan/followers","following_url":"https://api.github.com/users/maryamariyan/following{/other_user}","gists_url":"https://api.github.com/users/maryamariyan/gists{/gist_id}","starred_url":"https://api.github.com/users/maryamariyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maryamariyan/subscriptions","organizations_url":"https://api.github.com/users/maryamariyan/orgs","repos_url":"https://api.github.com/users/maryamariyan/repos","events_url":"https://api.github.com/users/maryamariyan/events{/privacy}","received_events_url":"https://api.github.com/users/maryamariyan/received_events","type":"User","site_admin":false},"repo":{"id":100399623,"name":"corefx","full_name":"maryamariyan/corefx","owner":{"login":"maryamariyan","id":5897654,"avatar_url":"https://avatars2.githubusercontent.com/u/5897654?v=4","gravatar_id":"","url":"https://api.github.com/users/maryamariyan","html_url":"https://github.com/maryamariyan","followers_url":"https://api.github.com/users/maryamariyan/followers","following_url":"https://api.github.com/users/maryamariyan/following{/other_user}","gists_url":"https://api.github.com/users/maryamariyan/gists{/gist_id}","starred_url":"https://api.github.com/users/maryamariyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maryamariyan/subscriptions","organizations_url":"https://api.github.com/users/maryamariyan/orgs","repos_url":"https://api.github.com/users/maryamariyan/repos","events_url":"https://api.github.com/users/maryamariyan/events{/privacy}","received_events_url":"https://api.github.com/users/maryamariyan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maryamariyan/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others. We welcome contributions.","fork":true,"url":"https://api.github.com/repos/maryamariyan/corefx","forks_url":"https://api.github.com/repos/maryamariyan/corefx/forks","keys_url":"https://api.github.com/repos/maryamariyan/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maryamariyan/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maryamariyan/corefx/teams","hooks_url":"https://api.github.com/repos/maryamariyan/corefx/hooks","issue_events_url":"https://api.github.com/repos/maryamariyan/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/maryamariyan/corefx/events","assignees_url":"https://api.github.com/repos/maryamariyan/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/maryamariyan/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/maryamariyan/corefx/tags","blobs_url":"https://api.github.com/repos/maryamariyan/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maryamariyan/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maryamariyan/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/maryamariyan/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maryamariyan/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/maryamariyan/corefx/languages","stargazers_url":"https://api.github.com/repos/maryamariyan/corefx/stargazers","contributors_url":"https://api.github.com/repos/maryamariyan/corefx/contributors","subscribers_url":"https://api.github.com/repos/maryamariyan/corefx/subscribers","subscription_url":"https://api.github.com/repos/maryamariyan/corefx/subscription","commits_url":"https://api.github.com/repos/maryamariyan/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/maryamariyan/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/maryamariyan/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/maryamariyan/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/maryamariyan/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/maryamariyan/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maryamariyan/corefx/merges","archive_url":"https://api.github.com/repos/maryamariyan/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maryamariyan/corefx/downloads","issues_url":"https://api.github.com/repos/maryamariyan/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/maryamariyan/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/maryamariyan/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/maryamariyan/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maryamariyan/corefx/labels{/name}","releases_url":"https://api.github.com/repos/maryamariyan/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/maryamariyan/corefx/deployments","created_at":"2017-08-15T16:58:26Z","updated_at":"2017-08-15T16:59:07Z","pushed_at":"2017-08-19T01:57:56Z","git_url":"git://github.com/maryamariyan/corefx.git","ssh_url":"git@github.com:maryamariyan/corefx.git","clone_url":"https://github.com/maryamariyan/corefx.git","svn_url":"https://github.com/maryamariyan/corefx","homepage":"https://github.com/dotnet/core","size":154305,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"456bc80b0b29421829f41d970f6cfc556b6b8535","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","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":26295345,"name":"corefx","full_name":"dotnet/corefx","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","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/corefx","description":"This repo contains the .NET Core foundational libraries, called CoreFX. It includes classes for collections, file systems, console, XML, async and many others. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/corefx","forks_url":"https://api.github.com/repos/dotnet/corefx/forks","keys_url":"https://api.github.com/repos/dotnet/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefx/teams","hooks_url":"https://api.github.com/repos/dotnet/corefx/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefx/events","assignees_url":"https://api.github.com/repos/dotnet/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefx/tags","blobs_url":"https://api.github.com/repos/dotnet/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefx/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefx/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefx/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefx/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefx/subscription","commits_url":"https://api.github.com/repos/dotnet/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefx/merges","archive_url":"https://api.github.com/repos/dotnet/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefx/downloads","issues_url":"https://api.github.com/repos/dotnet/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefx/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefx/deployments","created_at":"2014-11-06T23:42:48Z","updated_at":"2017-08-19T09:27:28Z","pushed_at":"2017-08-19T14:23:16Z","git_url":"git://github.com/dotnet/corefx.git","ssh_url":"git@github.com:dotnet/corefx.git","clone_url":"https://github.com/dotnet/corefx.git","svn_url":"https://github.com/dotnet/corefx","homepage":"https://github.com/dotnet/core","size":154681,"stargazers_count":12343,"watchers_count":12343,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3397,"mirror_url":null,"open_issues_count":1875,"forks":3397,"open_issues":1875,"watchers":12343,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23396"},"html":{"href":"https://github.com/dotnet/corefx/pull/23396"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/23396"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/23396/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23396/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/23396/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/e74f938da6acddaea237af21678c80daffc70582"}}}}
{"actor":{"display_login":"maryamariyan"}}