{"action":"created","comment":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/comments/54035126","id":54035126,"diff_hunk":"@@ -7,7 +7,7 @@ internal class ArgumentConstraintTrap\n         : IArgumentConstraintTrapper\r\n     {\r\n         [ThreadStatic]\r\n-        private static List<IArgumentConstraint> trappedConstraints;\r\n+        private static SynchronizedCollection<IArgumentConstraint> trappedConstraints;\r","path":"src/FakeItEasy/Core/ArgumentConstraintTrap.cs","position":5,"original_position":5,"commit_id":"6f860d4d1b615757c5d1360609ab6af23125e13c","original_commit_id":"6f860d4d1b615757c5d1360609ab6af23125e13c","user":{"login":"thomaslevesque","id":1864281,"avatar_url":"https://avatars.githubusercontent.com/u/1864281?v=3","gravatar_id":"","url":"https://api.github.com/users/thomaslevesque","html_url":"https://github.com/thomaslevesque","followers_url":"https://api.github.com/users/thomaslevesque/followers","following_url":"https://api.github.com/users/thomaslevesque/following{/other_user}","gists_url":"https://api.github.com/users/thomaslevesque/gists{/gist_id}","starred_url":"https://api.github.com/users/thomaslevesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomaslevesque/subscriptions","organizations_url":"https://api.github.com/users/thomaslevesque/orgs","repos_url":"https://api.github.com/users/thomaslevesque/repos","events_url":"https://api.github.com/users/thomaslevesque/events{/privacy}","received_events_url":"https://api.github.com/users/thomaslevesque/received_events","type":"User","site_admin":false},"body":"This collection will only ever be used from a single thread, since it's `ThreadStatic`","created_at":"2016-02-25T01:10:56Z","updated_at":"2016-02-25T01:10:56Z","html_url":"https://github.com/FakeItEasy/FakeItEasy/pull/613#discussion_r54035126","pull_request_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613","_links":{"self":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/comments/54035126"},"html":{"href":"https://github.com/FakeItEasy/FakeItEasy/pull/613#discussion_r54035126"},"pull_request":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613"}}},"pull_request":{"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613","id":60603091,"html_url":"https://github.com/FakeItEasy/FakeItEasy/pull/613","diff_url":"https://github.com/FakeItEasy/FakeItEasy/pull/613.diff","patch_url":"https://github.com/FakeItEasy/FakeItEasy/pull/613.patch","issue_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/613","number":613,"state":"open","locked":false,"title":"Fix for Issue #600 - Additional Thread Safety","user":{"login":"tillig","id":1156571,"avatar_url":"https://avatars.githubusercontent.com/u/1156571?v=3","gravatar_id":"","url":"https://api.github.com/users/tillig","html_url":"https://github.com/tillig","followers_url":"https://api.github.com/users/tillig/followers","following_url":"https://api.github.com/users/tillig/following{/other_user}","gists_url":"https://api.github.com/users/tillig/gists{/gist_id}","starred_url":"https://api.github.com/users/tillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tillig/subscriptions","organizations_url":"https://api.github.com/users/tillig/orgs","repos_url":"https://api.github.com/users/tillig/repos","events_url":"https://api.github.com/users/tillig/events{/privacy}","received_events_url":"https://api.github.com/users/tillig/received_events","type":"User","site_admin":false},"body":"This is a stab at fixing some of the challenges raised in issue #600. It probably isn't a 100% solution, but I think it's a good step forward.\r\n\r\nItems of note:\r\n- For lists that appeared to get modified by the API, I switched to use `System.Collections.Generic.SynchronizedCollection<T>` which is available from .NET 3.5 in the System.ServiceModel assembly. This adds a sort of odd reference, but it means no shim is needed for 3.5 compatibility.\r\n- `SynchronizedCollection<T>` isn't marked `[Serializable]` but `FakeManager` is (for whatever reason) so I had to implement a bit of custom serialization to work around the challenges there.\r\n- I had a problem building where NuGet package restore was trying to restore `NuGet.CommandLine` at the solution level... but was using a version of that already checked in. I was getting an error as it tried to restore the package over the top of itself (file locking) so I removed that from the `packages.config`. It's checked into the repo anyway, so I don't think it needs to be restored each time.\r\n\r\nOpen to questions / comments. Again, I can't guarantee it'll 100% solve the issue, but it should be a bit closer.","created_at":"2016-02-25T00:14:28Z","updated_at":"2016-02-25T01:10:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d9f3e838f6f9bbf1769e24a15931e43fafb60c42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613/commits","review_comments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613/comments","review_comment_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/613/comments","statuses_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/statuses/6f860d4d1b615757c5d1360609ab6af23125e13c","head":{"label":"tillig:issue-600","ref":"issue-600","sha":"6f860d4d1b615757c5d1360609ab6af23125e13c","user":{"login":"tillig","id":1156571,"avatar_url":"https://avatars.githubusercontent.com/u/1156571?v=3","gravatar_id":"","url":"https://api.github.com/users/tillig","html_url":"https://github.com/tillig","followers_url":"https://api.github.com/users/tillig/followers","following_url":"https://api.github.com/users/tillig/following{/other_user}","gists_url":"https://api.github.com/users/tillig/gists{/gist_id}","starred_url":"https://api.github.com/users/tillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tillig/subscriptions","organizations_url":"https://api.github.com/users/tillig/orgs","repos_url":"https://api.github.com/users/tillig/repos","events_url":"https://api.github.com/users/tillig/events{/privacy}","received_events_url":"https://api.github.com/users/tillig/received_events","type":"User","site_admin":false},"repo":{"id":52479282,"name":"FakeItEasy","full_name":"tillig/FakeItEasy","owner":{"login":"tillig","id":1156571,"avatar_url":"https://avatars.githubusercontent.com/u/1156571?v=3","gravatar_id":"","url":"https://api.github.com/users/tillig","html_url":"https://github.com/tillig","followers_url":"https://api.github.com/users/tillig/followers","following_url":"https://api.github.com/users/tillig/following{/other_user}","gists_url":"https://api.github.com/users/tillig/gists{/gist_id}","starred_url":"https://api.github.com/users/tillig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tillig/subscriptions","organizations_url":"https://api.github.com/users/tillig/orgs","repos_url":"https://api.github.com/users/tillig/repos","events_url":"https://api.github.com/users/tillig/events{/privacy}","received_events_url":"https://api.github.com/users/tillig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tillig/FakeItEasy","description":"The easy mocking library for .NET","fork":true,"url":"https://api.github.com/repos/tillig/FakeItEasy","forks_url":"https://api.github.com/repos/tillig/FakeItEasy/forks","keys_url":"https://api.github.com/repos/tillig/FakeItEasy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tillig/FakeItEasy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tillig/FakeItEasy/teams","hooks_url":"https://api.github.com/repos/tillig/FakeItEasy/hooks","issue_events_url":"https://api.github.com/repos/tillig/FakeItEasy/issues/events{/number}","events_url":"https://api.github.com/repos/tillig/FakeItEasy/events","assignees_url":"https://api.github.com/repos/tillig/FakeItEasy/assignees{/user}","branches_url":"https://api.github.com/repos/tillig/FakeItEasy/branches{/branch}","tags_url":"https://api.github.com/repos/tillig/FakeItEasy/tags","blobs_url":"https://api.github.com/repos/tillig/FakeItEasy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tillig/FakeItEasy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tillig/FakeItEasy/git/refs{/sha}","trees_url":"https://api.github.com/repos/tillig/FakeItEasy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tillig/FakeItEasy/statuses/{sha}","languages_url":"https://api.github.com/repos/tillig/FakeItEasy/languages","stargazers_url":"https://api.github.com/repos/tillig/FakeItEasy/stargazers","contributors_url":"https://api.github.com/repos/tillig/FakeItEasy/contributors","subscribers_url":"https://api.github.com/repos/tillig/FakeItEasy/subscribers","subscription_url":"https://api.github.com/repos/tillig/FakeItEasy/subscription","commits_url":"https://api.github.com/repos/tillig/FakeItEasy/commits{/sha}","git_commits_url":"https://api.github.com/repos/tillig/FakeItEasy/git/commits{/sha}","comments_url":"https://api.github.com/repos/tillig/FakeItEasy/comments{/number}","issue_comment_url":"https://api.github.com/repos/tillig/FakeItEasy/issues/comments{/number}","contents_url":"https://api.github.com/repos/tillig/FakeItEasy/contents/{+path}","compare_url":"https://api.github.com/repos/tillig/FakeItEasy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tillig/FakeItEasy/merges","archive_url":"https://api.github.com/repos/tillig/FakeItEasy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tillig/FakeItEasy/downloads","issues_url":"https://api.github.com/repos/tillig/FakeItEasy/issues{/number}","pulls_url":"https://api.github.com/repos/tillig/FakeItEasy/pulls{/number}","milestones_url":"https://api.github.com/repos/tillig/FakeItEasy/milestones{/number}","notifications_url":"https://api.github.com/repos/tillig/FakeItEasy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tillig/FakeItEasy/labels{/name}","releases_url":"https://api.github.com/repos/tillig/FakeItEasy/releases{/id}","deployments_url":"https://api.github.com/repos/tillig/FakeItEasy/deployments","created_at":"2016-02-24T22:33:02Z","updated_at":"2016-02-24T22:33:03Z","pushed_at":"2016-02-25T00:06:08Z","git_url":"git://github.com/tillig/FakeItEasy.git","ssh_url":"git@github.com:tillig/FakeItEasy.git","clone_url":"https://github.com/tillig/FakeItEasy.git","svn_url":"https://github.com/tillig/FakeItEasy","homepage":"fakeiteasy.github.io","size":17427,"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":"FakeItEasy:master","ref":"master","sha":"43d1b46a1de3e5f89bbbb530b2847bf11eec7402","user":{"login":"FakeItEasy","id":1713521,"avatar_url":"https://avatars.githubusercontent.com/u/1713521?v=3","gravatar_id":"","url":"https://api.github.com/users/FakeItEasy","html_url":"https://github.com/FakeItEasy","followers_url":"https://api.github.com/users/FakeItEasy/followers","following_url":"https://api.github.com/users/FakeItEasy/following{/other_user}","gists_url":"https://api.github.com/users/FakeItEasy/gists{/gist_id}","starred_url":"https://api.github.com/users/FakeItEasy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FakeItEasy/subscriptions","organizations_url":"https://api.github.com/users/FakeItEasy/orgs","repos_url":"https://api.github.com/users/FakeItEasy/repos","events_url":"https://api.github.com/users/FakeItEasy/events{/privacy}","received_events_url":"https://api.github.com/users/FakeItEasy/received_events","type":"Organization","site_admin":false},"repo":{"id":1920133,"name":"FakeItEasy","full_name":"FakeItEasy/FakeItEasy","owner":{"login":"FakeItEasy","id":1713521,"avatar_url":"https://avatars.githubusercontent.com/u/1713521?v=3","gravatar_id":"","url":"https://api.github.com/users/FakeItEasy","html_url":"https://github.com/FakeItEasy","followers_url":"https://api.github.com/users/FakeItEasy/followers","following_url":"https://api.github.com/users/FakeItEasy/following{/other_user}","gists_url":"https://api.github.com/users/FakeItEasy/gists{/gist_id}","starred_url":"https://api.github.com/users/FakeItEasy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FakeItEasy/subscriptions","organizations_url":"https://api.github.com/users/FakeItEasy/orgs","repos_url":"https://api.github.com/users/FakeItEasy/repos","events_url":"https://api.github.com/users/FakeItEasy/events{/privacy}","received_events_url":"https://api.github.com/users/FakeItEasy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FakeItEasy/FakeItEasy","description":"The easy mocking library for .NET","fork":false,"url":"https://api.github.com/repos/FakeItEasy/FakeItEasy","forks_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/forks","keys_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/teams","hooks_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/hooks","issue_events_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/events{/number}","events_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/events","assignees_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/assignees{/user}","branches_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/branches{/branch}","tags_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/tags","blobs_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/git/refs{/sha}","trees_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/statuses/{sha}","languages_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/languages","stargazers_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/stargazers","contributors_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/contributors","subscribers_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/subscribers","subscription_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/subscription","commits_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/commits{/sha}","git_commits_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/git/commits{/sha}","comments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/comments{/number}","issue_comment_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/comments{/number}","contents_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/contents/{+path}","compare_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/merges","archive_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/downloads","issues_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues{/number}","pulls_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls{/number}","milestones_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/milestones{/number}","notifications_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/labels{/name}","releases_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/releases{/id}","deployments_url":"https://api.github.com/repos/FakeItEasy/FakeItEasy/deployments","created_at":"2011-06-19T17:56:01Z","updated_at":"2016-02-22T20:09:40Z","pushed_at":"2016-02-25T00:38:28Z","git_url":"git://github.com/FakeItEasy/FakeItEasy.git","ssh_url":"git@github.com:FakeItEasy/FakeItEasy.git","clone_url":"https://github.com/FakeItEasy/FakeItEasy.git","svn_url":"https://github.com/FakeItEasy/FakeItEasy","homepage":"fakeiteasy.github.io","size":18225,"stargazers_count":484,"watchers_count":484,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":53,"forks":105,"open_issues":53,"watchers":484,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613"},"html":{"href":"https://github.com/FakeItEasy/FakeItEasy/pull/613"},"issue":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/613"},"comments":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/issues/613/comments"},"review_comments":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613/comments"},"review_comment":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/pulls/613/commits"},"statuses":{"href":"https://api.github.com/repos/FakeItEasy/FakeItEasy/statuses/6f860d4d1b615757c5d1360609ab6af23125e13c"}}}}