{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/comments/56936904","id":56936904,"diff_hunk":"@@ -1275,6 +1278,34 @@ internal static object CopyType(object obj)\n         }\n \n         #endregion Type\n+    \n+        #region CancellationTokenWrapper\n+        internal static void SerializeCancellationTokenWrapper(object obj, BinaryTokenStreamWriter stream, Type expected)\n+        {\n+            var ctw = (CancellationTokenWrapper)obj;\n+            var cancelled = ctw.CancellationToken.IsCancellationRequested;\n+            if (!cancelled)\n+            {\n+                CancellationTokenManager.RegisterTokenCallbacks(ctw);","path":"src/Orleans/Serialization/BuiltInTypes.cs","position":25,"original_position":25,"commit_id":"d49926b6c3793a24838d78787808b03f122457c6","original_commit_id":"d49926b6c3793a24838d78787808b03f122457c6","user":{"login":"gabikliot","id":10171207,"avatar_url":"https://avatars.githubusercontent.com/u/10171207?v=3","gravatar_id":"","url":"https://api.github.com/users/gabikliot","html_url":"https://github.com/gabikliot","followers_url":"https://api.github.com/users/gabikliot/followers","following_url":"https://api.github.com/users/gabikliot/following{/other_user}","gists_url":"https://api.github.com/users/gabikliot/gists{/gist_id}","starred_url":"https://api.github.com/users/gabikliot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabikliot/subscriptions","organizations_url":"https://api.github.com/users/gabikliot/orgs","repos_url":"https://api.github.com/users/gabikliot/repos","events_url":"https://api.github.com/users/gabikliot/events{/privacy}","received_events_url":"https://api.github.com/users/gabikliot/received_events","type":"User","site_admin":false},"body":"I just don't want serializer to call back into the runtime logic. Serializer may change, be replaced by another one, ... It should only serialize and have zero side effects.","created_at":"2016-03-22T04:43:19Z","updated_at":"2016-03-22T04:43:19Z","html_url":"https://github.com/dotnet/orleans/pull/1599#discussion_r56936904","pull_request_url":"https://api.github.com/repos/dotnet/orleans/pulls/1599","_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments/56936904"},"html":{"href":"https://github.com/dotnet/orleans/pull/1599#discussion_r56936904"},"pull_request":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/1599"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/1599","id":63665623,"html_url":"https://github.com/dotnet/orleans/pull/1599","diff_url":"https://github.com/dotnet/orleans/pull/1599.diff","patch_url":"https://github.com/dotnet/orleans/pull/1599.patch","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/1599","number":1599,"state":"open","locked":false,"title":"Support cancellation tokens in grain method signatures","user":{"login":"dVakulen","id":5787619,"avatar_url":"https://avatars.githubusercontent.com/u/5787619?v=3","gravatar_id":"","url":"https://api.github.com/users/dVakulen","html_url":"https://github.com/dVakulen","followers_url":"https://api.github.com/users/dVakulen/followers","following_url":"https://api.github.com/users/dVakulen/following{/other_user}","gists_url":"https://api.github.com/users/dVakulen/gists{/gist_id}","starred_url":"https://api.github.com/users/dVakulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dVakulen/subscriptions","organizations_url":"https://api.github.com/users/dVakulen/orgs","repos_url":"https://api.github.com/users/dVakulen/repos","events_url":"https://api.github.com/users/dVakulen/events{/privacy}","received_events_url":"https://api.github.com/users/dVakulen/received_events","type":"User","site_admin":false},"body":"Implemented using grain extensions accordingly to the https://github.com/dotnet/orleans/pull/1569#issuecomment-198843172","created_at":"2016-03-22T03:33:40Z","updated_at":"2016-03-22T04:43:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"626b9fcc99b7f81102d093faf73953fbdd30c8ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/orleans/pulls/1599/commits","review_comments_url":"https://api.github.com/repos/dotnet/orleans/pulls/1599/comments","review_comment_url":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/1599/comments","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/d49926b6c3793a24838d78787808b03f122457c6","head":{"label":"dVakulen:cancellation-tokens","ref":"cancellation-tokens","sha":"d49926b6c3793a24838d78787808b03f122457c6","user":{"login":"dVakulen","id":5787619,"avatar_url":"https://avatars.githubusercontent.com/u/5787619?v=3","gravatar_id":"","url":"https://api.github.com/users/dVakulen","html_url":"https://github.com/dVakulen","followers_url":"https://api.github.com/users/dVakulen/followers","following_url":"https://api.github.com/users/dVakulen/following{/other_user}","gists_url":"https://api.github.com/users/dVakulen/gists{/gist_id}","starred_url":"https://api.github.com/users/dVakulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dVakulen/subscriptions","organizations_url":"https://api.github.com/users/dVakulen/orgs","repos_url":"https://api.github.com/users/dVakulen/repos","events_url":"https://api.github.com/users/dVakulen/events{/privacy}","received_events_url":"https://api.github.com/users/dVakulen/received_events","type":"User","site_admin":false},"repo":{"id":37816139,"name":"orleans","full_name":"dVakulen/orleans","owner":{"login":"dVakulen","id":5787619,"avatar_url":"https://avatars.githubusercontent.com/u/5787619?v=3","gravatar_id":"","url":"https://api.github.com/users/dVakulen","html_url":"https://github.com/dVakulen","followers_url":"https://api.github.com/users/dVakulen/followers","following_url":"https://api.github.com/users/dVakulen/following{/other_user}","gists_url":"https://api.github.com/users/dVakulen/gists{/gist_id}","starred_url":"https://api.github.com/users/dVakulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dVakulen/subscriptions","organizations_url":"https://api.github.com/users/dVakulen/orgs","repos_url":"https://api.github.com/users/dVakulen/repos","events_url":"https://api.github.com/users/dVakulen/events{/privacy}","received_events_url":"https://api.github.com/users/dVakulen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dVakulen/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":true,"url":"https://api.github.com/repos/dVakulen/orleans","forks_url":"https://api.github.com/repos/dVakulen/orleans/forks","keys_url":"https://api.github.com/repos/dVakulen/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dVakulen/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dVakulen/orleans/teams","hooks_url":"https://api.github.com/repos/dVakulen/orleans/hooks","issue_events_url":"https://api.github.com/repos/dVakulen/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/dVakulen/orleans/events","assignees_url":"https://api.github.com/repos/dVakulen/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/dVakulen/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/dVakulen/orleans/tags","blobs_url":"https://api.github.com/repos/dVakulen/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dVakulen/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dVakulen/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/dVakulen/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dVakulen/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/dVakulen/orleans/languages","stargazers_url":"https://api.github.com/repos/dVakulen/orleans/stargazers","contributors_url":"https://api.github.com/repos/dVakulen/orleans/contributors","subscribers_url":"https://api.github.com/repos/dVakulen/orleans/subscribers","subscription_url":"https://api.github.com/repos/dVakulen/orleans/subscription","commits_url":"https://api.github.com/repos/dVakulen/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/dVakulen/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/dVakulen/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/dVakulen/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/dVakulen/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/dVakulen/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dVakulen/orleans/merges","archive_url":"https://api.github.com/repos/dVakulen/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dVakulen/orleans/downloads","issues_url":"https://api.github.com/repos/dVakulen/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/dVakulen/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/dVakulen/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/dVakulen/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dVakulen/orleans/labels{/name}","releases_url":"https://api.github.com/repos/dVakulen/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/dVakulen/orleans/deployments","created_at":"2015-06-21T16:29:25Z","updated_at":"2016-01-19T12:31:13Z","pushed_at":"2016-03-22T03:25:19Z","git_url":"git://github.com/dVakulen/orleans.git","ssh_url":"git@github.com:dVakulen/orleans.git","clone_url":"https://github.com/dVakulen/orleans.git","svn_url":"https://github.com/dVakulen/orleans","homepage":"http://dotnet.github.io/orleans","size":13425,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"42f74939f2b3889a35de8b01540c85e0bbd3a458","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":28232663,"name":"orleans","full_name":"dotnet/orleans","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/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":false,"url":"https://api.github.com/repos/dotnet/orleans","forks_url":"https://api.github.com/repos/dotnet/orleans/forks","keys_url":"https://api.github.com/repos/dotnet/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/orleans/teams","hooks_url":"https://api.github.com/repos/dotnet/orleans/hooks","issue_events_url":"https://api.github.com/repos/dotnet/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/orleans/events","assignees_url":"https://api.github.com/repos/dotnet/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/orleans/tags","blobs_url":"https://api.github.com/repos/dotnet/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/orleans/languages","stargazers_url":"https://api.github.com/repos/dotnet/orleans/stargazers","contributors_url":"https://api.github.com/repos/dotnet/orleans/contributors","subscribers_url":"https://api.github.com/repos/dotnet/orleans/subscribers","subscription_url":"https://api.github.com/repos/dotnet/orleans/subscription","commits_url":"https://api.github.com/repos/dotnet/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/orleans/merges","archive_url":"https://api.github.com/repos/dotnet/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/orleans/downloads","issues_url":"https://api.github.com/repos/dotnet/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/orleans/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/orleans/deployments","created_at":"2014-12-19T14:32:50Z","updated_at":"2016-03-21T14:10:57Z","pushed_at":"2016-03-22T03:33:40Z","git_url":"git://github.com/dotnet/orleans.git","ssh_url":"git@github.com:dotnet/orleans.git","clone_url":"https://github.com/dotnet/orleans.git","svn_url":"https://github.com/dotnet/orleans","homepage":"http://dotnet.github.io/orleans","size":42488,"stargazers_count":1635,"watchers_count":1635,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":412,"mirror_url":null,"open_issues_count":177,"forks":412,"open_issues":177,"watchers":1635,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/1599"},"html":{"href":"https://github.com/dotnet/orleans/pull/1599"},"issue":{"href":"https://api.github.com/repos/dotnet/orleans/issues/1599"},"comments":{"href":"https://api.github.com/repos/dotnet/orleans/issues/1599/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/1599/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/1599/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/orleans/statuses/d49926b6c3793a24838d78787808b03f122457c6"}}}}