{"action":"created","comment":{"url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/comments/83663848","pull_request_review_id":4489328,"id":83663848,"diff_hunk":"@@ -116,22 +119,26 @@ internal static CallSettings Merge(CallSettings original, CallSettings overlaid)\n         internal static CallOptions ToCallOptions(CallSettings baseSettings, CallSettings callSettings, IClock clock)\n         {\n             CallSettings effectiveSettings = CallSettings.Merge(baseSettings, callSettings);\n-            return effectiveSettings == null\n-                ? default(CallOptions)\n-                : new CallOptions(\n-                    headers: effectiveSettings.Headers,\n-                    deadline: effectiveSettings.Timing.CalculateDeadline(clock),\n-                    cancellationToken: effectiveSettings.CancellationToken ?? default(CancellationToken),\n-                    writeOptions: effectiveSettings.WriteOptions,\n-                    propagationToken: effectiveSettings.PropagationToken,\n-                    credentials: effectiveSettings.Credentials);\n+            if (effectiveSettings == null)\n+            {\n+                return default(CallOptions);\n+            }\n+            var metadata = new Metadata();\n+            effectiveSettings.HeaderMutation?.Invoke(metadata);\n+            return new CallOptions(\n+                headers: metadata,\n+                deadline: effectiveSettings.Timing.CalculateDeadline(clock),\n+                cancellationToken: effectiveSettings.CancellationToken ?? default(CancellationToken),\n+                writeOptions: effectiveSettings.WriteOptions,\n+                propagationToken: effectiveSettings.PropagationToken,\n+                credentials: effectiveSettings.Credentials);\n         }\n \n         /// <summary>\n         /// Creates a <see cref=\"CallSettings\"/> for the specified user agent.\n         /// </summary>\n         internal static CallSettings ForUserAgent(string userAgent) =>\n-            new CallSettings(null, null, null, new Metadata { { UserAgentBuilder.HeaderName, userAgent } }, null, null);\n+            new CallSettings(null, null, null, metadata => metadata.Add(UserAgentBuilder.HeaderName, userAgent), null, null);","path":"src/Google.Api.Gax.Grpc/CallSettings.cs","position":null,"original_position":100,"commit_id":"ae398b0f956941a9f750f1d8c85799161fca72a0","original_commit_id":"ae398b0f956941a9f750f1d8c85799161fca72a0","user":{"login":"chrisdunelm","id":316748,"avatar_url":"https://avatars.githubusercontent.com/u/316748?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdunelm","html_url":"https://github.com/chrisdunelm","followers_url":"https://api.github.com/users/chrisdunelm/followers","following_url":"https://api.github.com/users/chrisdunelm/following{/other_user}","gists_url":"https://api.github.com/users/chrisdunelm/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdunelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdunelm/subscriptions","organizations_url":"https://api.github.com/users/chrisdunelm/orgs","repos_url":"https://api.github.com/users/chrisdunelm/repos","events_url":"https://api.github.com/users/chrisdunelm/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdunelm/received_events","type":"User","site_admin":false},"body":"Add a CallSettings.FromMetaDataMutator(...) ?\r\nThis would be consistent with all the other From...() methods.","created_at":"2016-10-17T15:06:00Z","updated_at":"2016-10-17T15:10:11Z","html_url":"https://github.com/googleapis/gax-dotnet/pull/95#discussion_r83663848","pull_request_url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/comments/83663848"},"html":{"href":"https://github.com/googleapis/gax-dotnet/pull/95#discussion_r83663848"},"pull_request":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95","id":89623162,"html_url":"https://github.com/googleapis/gax-dotnet/pull/95","diff_url":"https://github.com/googleapis/gax-dotnet/pull/95.diff","patch_url":"https://github.com/googleapis/gax-dotnet/pull/95.patch","issue_url":"https://api.github.com/repos/googleapis/gax-dotnet/issues/95","number":95,"state":"open","locked":false,"title":"Make all our settings (other than ServiceSettingsBase) immutable.","user":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"body":"Best to review one commit at a time.\r\n\r\nLet's chat about whether my removal of ApiCallExtensions made sense or not...","created_at":"2016-10-17T13:27:40Z","updated_at":"2016-10-17T15:10:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"131ee56aa12457155b7022d7e1b5714fc20c1990","assignee":{"login":"chrisdunelm","id":316748,"avatar_url":"https://avatars.githubusercontent.com/u/316748?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdunelm","html_url":"https://github.com/chrisdunelm","followers_url":"https://api.github.com/users/chrisdunelm/followers","following_url":"https://api.github.com/users/chrisdunelm/following{/other_user}","gists_url":"https://api.github.com/users/chrisdunelm/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdunelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdunelm/subscriptions","organizations_url":"https://api.github.com/users/chrisdunelm/orgs","repos_url":"https://api.github.com/users/chrisdunelm/repos","events_url":"https://api.github.com/users/chrisdunelm/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdunelm/received_events","type":"User","site_admin":false},"assignees":[{"login":"chrisdunelm","id":316748,"avatar_url":"https://avatars.githubusercontent.com/u/316748?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdunelm","html_url":"https://github.com/chrisdunelm","followers_url":"https://api.github.com/users/chrisdunelm/followers","following_url":"https://api.github.com/users/chrisdunelm/following{/other_user}","gists_url":"https://api.github.com/users/chrisdunelm/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdunelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdunelm/subscriptions","organizations_url":"https://api.github.com/users/chrisdunelm/orgs","repos_url":"https://api.github.com/users/chrisdunelm/repos","events_url":"https://api.github.com/users/chrisdunelm/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdunelm/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95/commits","review_comments_url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95/comments","review_comment_url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleapis/gax-dotnet/issues/95/comments","statuses_url":"https://api.github.com/repos/googleapis/gax-dotnet/statuses/ae398b0f956941a9f750f1d8c85799161fca72a0","head":{"label":"jskeet:immutable-call-settings","ref":"immutable-call-settings","sha":"ae398b0f956941a9f750f1d8c85799161fca72a0","user":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"repo":{"id":52385973,"name":"gax-dotnet","full_name":"jskeet/gax-dotnet","owner":{"login":"jskeet","id":17011,"avatar_url":"https://avatars.githubusercontent.com/u/17011?v=3","gravatar_id":"","url":"https://api.github.com/users/jskeet","html_url":"https://github.com/jskeet","followers_url":"https://api.github.com/users/jskeet/followers","following_url":"https://api.github.com/users/jskeet/following{/other_user}","gists_url":"https://api.github.com/users/jskeet/gists{/gist_id}","starred_url":"https://api.github.com/users/jskeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskeet/subscriptions","organizations_url":"https://api.github.com/users/jskeet/orgs","repos_url":"https://api.github.com/users/jskeet/repos","events_url":"https://api.github.com/users/jskeet/events{/privacy}","received_events_url":"https://api.github.com/users/jskeet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jskeet/gax-dotnet","description":null,"fork":true,"url":"https://api.github.com/repos/jskeet/gax-dotnet","forks_url":"https://api.github.com/repos/jskeet/gax-dotnet/forks","keys_url":"https://api.github.com/repos/jskeet/gax-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jskeet/gax-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jskeet/gax-dotnet/teams","hooks_url":"https://api.github.com/repos/jskeet/gax-dotnet/hooks","issue_events_url":"https://api.github.com/repos/jskeet/gax-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/jskeet/gax-dotnet/events","assignees_url":"https://api.github.com/repos/jskeet/gax-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/jskeet/gax-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/jskeet/gax-dotnet/tags","blobs_url":"https://api.github.com/repos/jskeet/gax-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jskeet/gax-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jskeet/gax-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/jskeet/gax-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jskeet/gax-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/jskeet/gax-dotnet/languages","stargazers_url":"https://api.github.com/repos/jskeet/gax-dotnet/stargazers","contributors_url":"https://api.github.com/repos/jskeet/gax-dotnet/contributors","subscribers_url":"https://api.github.com/repos/jskeet/gax-dotnet/subscribers","subscription_url":"https://api.github.com/repos/jskeet/gax-dotnet/subscription","commits_url":"https://api.github.com/repos/jskeet/gax-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/jskeet/gax-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/jskeet/gax-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/jskeet/gax-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/jskeet/gax-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/jskeet/gax-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jskeet/gax-dotnet/merges","archive_url":"https://api.github.com/repos/jskeet/gax-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jskeet/gax-dotnet/downloads","issues_url":"https://api.github.com/repos/jskeet/gax-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/jskeet/gax-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/jskeet/gax-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/jskeet/gax-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jskeet/gax-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/jskeet/gax-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/jskeet/gax-dotnet/deployments","created_at":"2016-02-23T19:33:42Z","updated_at":"2016-02-25T18:07:02Z","pushed_at":"2016-10-17T13:21:29Z","git_url":"git://github.com/jskeet/gax-dotnet.git","ssh_url":"git@github.com:jskeet/gax-dotnet.git","clone_url":"https://github.com/jskeet/gax-dotnet.git","svn_url":"https://github.com/jskeet/gax-dotnet","homepage":null,"size":442,"stargazers_count":3,"watchers_count":3,"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":3,"default_branch":"master"}},"base":{"label":"googleapis:master","ref":"master","sha":"07e22ee0049266bf64ba4355264e17181b4a318b","user":{"login":"googleapis","id":16785467,"avatar_url":"https://avatars.githubusercontent.com/u/16785467?v=3","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"repo":{"id":50878438,"name":"gax-dotnet","full_name":"googleapis/gax-dotnet","owner":{"login":"googleapis","id":16785467,"avatar_url":"https://avatars.githubusercontent.com/u/16785467?v=3","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/googleapis/gax-dotnet","description":"Google API Extensions for .NET ","fork":false,"url":"https://api.github.com/repos/googleapis/gax-dotnet","forks_url":"https://api.github.com/repos/googleapis/gax-dotnet/forks","keys_url":"https://api.github.com/repos/googleapis/gax-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleapis/gax-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleapis/gax-dotnet/teams","hooks_url":"https://api.github.com/repos/googleapis/gax-dotnet/hooks","issue_events_url":"https://api.github.com/repos/googleapis/gax-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/googleapis/gax-dotnet/events","assignees_url":"https://api.github.com/repos/googleapis/gax-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/googleapis/gax-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/googleapis/gax-dotnet/tags","blobs_url":"https://api.github.com/repos/googleapis/gax-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleapis/gax-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleapis/gax-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleapis/gax-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleapis/gax-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/googleapis/gax-dotnet/languages","stargazers_url":"https://api.github.com/repos/googleapis/gax-dotnet/stargazers","contributors_url":"https://api.github.com/repos/googleapis/gax-dotnet/contributors","subscribers_url":"https://api.github.com/repos/googleapis/gax-dotnet/subscribers","subscription_url":"https://api.github.com/repos/googleapis/gax-dotnet/subscription","commits_url":"https://api.github.com/repos/googleapis/gax-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleapis/gax-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleapis/gax-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleapis/gax-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleapis/gax-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/googleapis/gax-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleapis/gax-dotnet/merges","archive_url":"https://api.github.com/repos/googleapis/gax-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleapis/gax-dotnet/downloads","issues_url":"https://api.github.com/repos/googleapis/gax-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/googleapis/gax-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/googleapis/gax-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/googleapis/gax-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleapis/gax-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/googleapis/gax-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/googleapis/gax-dotnet/deployments","created_at":"2016-02-01T23:13:51Z","updated_at":"2016-08-09T15:18:49Z","pushed_at":"2016-10-17T13:27:40Z","git_url":"git://github.com/googleapis/gax-dotnet.git","ssh_url":"git@github.com:googleapis/gax-dotnet.git","clone_url":"https://github.com/googleapis/gax-dotnet.git","svn_url":"https://github.com/googleapis/gax-dotnet","homepage":"","size":463,"stargazers_count":14,"watchers_count":14,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":7,"forks":5,"open_issues":7,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95"},"html":{"href":"https://github.com/googleapis/gax-dotnet/pull/95"},"issue":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/issues/95"},"comments":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/googleapis/gax-dotnet/statuses/ae398b0f956941a9f750f1d8c85799161fca72a0"}}}}
{"actor":{"display_login":"chrisdunelm"}}