{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/comments/53107052","id":53107052,"diff_hunk":"@@ -439,47 +439,50 @@ static internal bool IsNonAttributedTypeValidForSerialization(Type type)\n             }\n         }\n \n-        private static string[] s_knownSerializableTypeNames = new string[] {\n-                \"System.Collections.Queue\",\n-                \"System.Collections.Stack\",\n-                \"System.Globalization.CultureInfo\",\n-                \"System.Version\",\n-                \"System.Collections.Generic.KeyValuePair`2\",\n-                \"System.Collections.Generic.Queue`1\",\n-                \"System.Collections.Generic.Stack`1\",\n-                \"System.Collections.ObjectModel.ReadOnlyCollection`1\",\n-                \"System.Collections.ObjectModel.ReadOnlyDictionary`2\",\n-                \"System.Tuple`1\",\n-                \"System.Tuple`2\",\n-                \"System.Tuple`3\",\n-                \"System.Tuple`4\",\n-                \"System.Tuple`5\",\n-                \"System.Tuple`6\",\n-                \"System.Tuple`7\",\n-                \"System.Tuple`8\",\n+        private static readonly Dictionary<string, string[]> s_knownSerializableTypeInfos = new Dictionary<string, string[]> {\n+            { \"System.Collections.Generic.KeyValuePair`2\", Array.Empty<string>() },\n+            { \"System.Collections.Generic.Queue`1\", new [] { \"_syncRoot\" } },\n+            { \"System.Collections.Generic.Stack`1\", new [] {\"_syncRoot\" } },\n+            { \"System.Collections.ObjectModel.ReadOnlyCollection`1\", new [] {\"_syncRoot\" } },\n+            { \"System.Collections.ObjectModel.ReadOnlyDictionary`2\", new [] {\"_syncRoot\", \"_keys\",\"_values\" } },\n+            { \"System.Tuple`1\", Array.Empty<string>() },\n+            { \"System.Tuple`2\", Array.Empty<string>() },\n+            { \"System.Tuple`3\", Array.Empty<string>() },\n+            { \"System.Tuple`4\", Array.Empty<string>() },\n+            { \"System.Tuple`5\", Array.Empty<string>() },\n+            { \"System.Tuple`6\", Array.Empty<string>() },\n+            { \"System.Tuple`7\", Array.Empty<string>() },\n+            { \"System.Tuple`8\", Array.Empty<string>() },\n+            { \"System.Collections.Queue\", new [] {\"_syncRoot\" } },\n+            { \"System.Collections.Stack\", new [] {\"_syncRoot\" } },\n+            { \"System.Globalization.CultureInfo\", Array.Empty<string>() },\n+            { \"System.Version\", Array.Empty<string>() },\n         };\n \n+        private static string GetGeneralTypeName(Type type)\n+        {\n+            TypeInfo typeInfo = type.GetTypeInfo();\n+            return type.GetTypeInfo().IsGenericType && !typeInfo.IsGenericParameter","path":"src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs","position":45,"original_position":45,"commit_id":"1a2a913e64a27bf32a618c2dc60db142f59ea140","original_commit_id":"1a2a913e64a27bf32a618c2dc60db142f59ea140","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":"Sorry, I missed this previously: `type.GetTypeInfo().IsGenericType` -> `typeInfo.IsGenericType`","created_at":"2016-02-17T01:02:10Z","updated_at":"2016-02-17T01:02:10Z","html_url":"https://github.com/dotnet/corefx/pull/6141#discussion_r53107052","pull_request_url":"https://api.github.com/repos/dotnet/corefx/pulls/6141","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments/53107052"},"html":{"href":"https://github.com/dotnet/corefx/pull/6141#discussion_r53107052"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/6141"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefx/pulls/6141","id":59535824,"html_url":"https://github.com/dotnet/corefx/pull/6141","diff_url":"https://github.com/dotnet/corefx/pull/6141.diff","patch_url":"https://github.com/dotnet/corefx/pull/6141.patch","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/6141","number":6141,"state":"open","locked":false,"title":"1) Adding support for excluding [NonSerialized] members from serialization, this is prerequisite for #2; 2) Adding support for ReadOnlyDictionary.","user":{"login":"SGuyGe","id":10570378,"avatar_url":"https://avatars.githubusercontent.com/u/10570378?v=3","gravatar_id":"","url":"https://api.github.com/users/SGuyGe","html_url":"https://github.com/SGuyGe","followers_url":"https://api.github.com/users/SGuyGe/followers","following_url":"https://api.github.com/users/SGuyGe/following{/other_user}","gists_url":"https://api.github.com/users/SGuyGe/gists{/gist_id}","starred_url":"https://api.github.com/users/SGuyGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SGuyGe/subscriptions","organizations_url":"https://api.github.com/users/SGuyGe/orgs","repos_url":"https://api.github.com/users/SGuyGe/repos","events_url":"https://api.github.com/users/SGuyGe/events{/privacy}","received_events_url":"https://api.github.com/users/SGuyGe/received_events","type":"User","site_admin":false},"body":"@shmao @khdang @zhenlan ","created_at":"2016-02-16T18:51:30Z","updated_at":"2016-02-17T01:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0b4ede8f1d74a523ae9aca00786867e89370422","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefx/pulls/6141/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefx/pulls/6141/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/6141/comments","statuses_url":"https://api.github.com/repos/dotnet/corefx/statuses/1a2a913e64a27bf32a618c2dc60db142f59ea140","head":{"label":"SGuyGe:NonSerialized","ref":"NonSerialized","sha":"1a2a913e64a27bf32a618c2dc60db142f59ea140","user":{"login":"SGuyGe","id":10570378,"avatar_url":"https://avatars.githubusercontent.com/u/10570378?v=3","gravatar_id":"","url":"https://api.github.com/users/SGuyGe","html_url":"https://github.com/SGuyGe","followers_url":"https://api.github.com/users/SGuyGe/followers","following_url":"https://api.github.com/users/SGuyGe/following{/other_user}","gists_url":"https://api.github.com/users/SGuyGe/gists{/gist_id}","starred_url":"https://api.github.com/users/SGuyGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SGuyGe/subscriptions","organizations_url":"https://api.github.com/users/SGuyGe/orgs","repos_url":"https://api.github.com/users/SGuyGe/repos","events_url":"https://api.github.com/users/SGuyGe/events{/privacy}","received_events_url":"https://api.github.com/users/SGuyGe/received_events","type":"User","site_admin":false},"repo":{"id":49736750,"name":"corefx","full_name":"SGuyGe/corefx","owner":{"login":"SGuyGe","id":10570378,"avatar_url":"https://avatars.githubusercontent.com/u/10570378?v=3","gravatar_id":"","url":"https://api.github.com/users/SGuyGe","html_url":"https://github.com/SGuyGe","followers_url":"https://api.github.com/users/SGuyGe/followers","following_url":"https://api.github.com/users/SGuyGe/following{/other_user}","gists_url":"https://api.github.com/users/SGuyGe/gists{/gist_id}","starred_url":"https://api.github.com/users/SGuyGe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SGuyGe/subscriptions","organizations_url":"https://api.github.com/users/SGuyGe/orgs","repos_url":"https://api.github.com/users/SGuyGe/repos","events_url":"https://api.github.com/users/SGuyGe/events{/privacy}","received_events_url":"https://api.github.com/users/SGuyGe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SGuyGe/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.","fork":true,"url":"https://api.github.com/repos/SGuyGe/corefx","forks_url":"https://api.github.com/repos/SGuyGe/corefx/forks","keys_url":"https://api.github.com/repos/SGuyGe/corefx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SGuyGe/corefx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SGuyGe/corefx/teams","hooks_url":"https://api.github.com/repos/SGuyGe/corefx/hooks","issue_events_url":"https://api.github.com/repos/SGuyGe/corefx/issues/events{/number}","events_url":"https://api.github.com/repos/SGuyGe/corefx/events","assignees_url":"https://api.github.com/repos/SGuyGe/corefx/assignees{/user}","branches_url":"https://api.github.com/repos/SGuyGe/corefx/branches{/branch}","tags_url":"https://api.github.com/repos/SGuyGe/corefx/tags","blobs_url":"https://api.github.com/repos/SGuyGe/corefx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SGuyGe/corefx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SGuyGe/corefx/git/refs{/sha}","trees_url":"https://api.github.com/repos/SGuyGe/corefx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SGuyGe/corefx/statuses/{sha}","languages_url":"https://api.github.com/repos/SGuyGe/corefx/languages","stargazers_url":"https://api.github.com/repos/SGuyGe/corefx/stargazers","contributors_url":"https://api.github.com/repos/SGuyGe/corefx/contributors","subscribers_url":"https://api.github.com/repos/SGuyGe/corefx/subscribers","subscription_url":"https://api.github.com/repos/SGuyGe/corefx/subscription","commits_url":"https://api.github.com/repos/SGuyGe/corefx/commits{/sha}","git_commits_url":"https://api.github.com/repos/SGuyGe/corefx/git/commits{/sha}","comments_url":"https://api.github.com/repos/SGuyGe/corefx/comments{/number}","issue_comment_url":"https://api.github.com/repos/SGuyGe/corefx/issues/comments{/number}","contents_url":"https://api.github.com/repos/SGuyGe/corefx/contents/{+path}","compare_url":"https://api.github.com/repos/SGuyGe/corefx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SGuyGe/corefx/merges","archive_url":"https://api.github.com/repos/SGuyGe/corefx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SGuyGe/corefx/downloads","issues_url":"https://api.github.com/repos/SGuyGe/corefx/issues{/number}","pulls_url":"https://api.github.com/repos/SGuyGe/corefx/pulls{/number}","milestones_url":"https://api.github.com/repos/SGuyGe/corefx/milestones{/number}","notifications_url":"https://api.github.com/repos/SGuyGe/corefx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SGuyGe/corefx/labels{/name}","releases_url":"https://api.github.com/repos/SGuyGe/corefx/releases{/id}","deployments_url":"https://api.github.com/repos/SGuyGe/corefx/deployments","created_at":"2016-01-15T18:21:14Z","updated_at":"2016-01-15T18:21:37Z","pushed_at":"2016-02-17T00:37:26Z","git_url":"git://github.com/SGuyGe/corefx.git","ssh_url":"git@github.com:SGuyGe/corefx.git","clone_url":"https://github.com/SGuyGe/corefx.git","svn_url":"https://github.com/SGuyGe/corefx","homepage":"http://dotnet.github.io/","size":55362,"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":"5790919493d7436e6a27dab5a1d8390ac92a9a59","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":26295345,"name":"corefx","full_name":"dotnet/corefx","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/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.","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":"2016-02-17T00:09:26Z","pushed_at":"2016-02-17T01:01:53Z","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":"http://dotnet.github.io/","size":65929,"stargazers_count":9133,"watchers_count":9133,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2133,"mirror_url":null,"open_issues_count":823,"forks":2133,"open_issues":823,"watchers":9133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/6141"},"html":{"href":"https://github.com/dotnet/corefx/pull/6141"},"issue":{"href":"https://api.github.com/repos/dotnet/corefx/issues/6141"},"comments":{"href":"https://api.github.com/repos/dotnet/corefx/issues/6141/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/6141/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefx/pulls/6141/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefx/statuses/1a2a913e64a27bf32a618c2dc60db142f59ea140"}}}}