{"action":"created","comment":{"url":"https://api.github.com/repos/cake-build/cake/pulls/comments/42432737","id":42432737,"diff_hunk":"@@ -0,0 +1,60 @@\n+﻿using System.Globalization;\n+\n+namespace Cake.Core.IO.Arguments\n+{\n+    /// <summary>\n+    /// Represents a argument preceded by a switch.\n+    /// </summary>\n+    public class SwitchArgument : IProcessArgument\n+    {\n+        private readonly string _switch;\n+        private readonly IProcessArgument _argument;\n+        private readonly string _seperator;\n+\n+        /// <summary>\n+        /// Initializes a new instance of the <see cref=\"SwitchArgument\"/> class.\n+        /// </summary>\n+        /// <param name=\"switch\">The switch.</param>\n+        /// <param name=\"argument\">The argument.</param>\n+        /// <param name=\"seperator\">The separator between the <paramref name=\"switch\"/> and the <paramref name=\"argument\"/>.</param>\n+        public SwitchArgument(string @switch, IProcessArgument argument, string seperator = \" \")\n+        {\n+            _switch = @switch;\n+            _argument = argument;\n+            _seperator = seperator;\n+        }\n+\n+        /// <summary>\n+        /// Render the arguments as a <see cref=\"System.String\" />.\n+        /// Sensitive information will be included.\n+        /// </summary>\n+        /// <returns>\n+        /// A string representation of the argument.\n+        /// </returns>\n+        public string Render()\n+        {\n+            return string.Format(CultureInfo.InvariantCulture, \"{0}{1}{2}\", _switch, _seperator, _argument.Render());","path":"src/Cake.Core/IO/Arguments/SwitchArgument.cs","position":36,"original_position":36,"commit_id":"6e777ff7d869768dd2cb3566977802ac165975c3","original_commit_id":"6e777ff7d869768dd2cb3566977802ac165975c3","user":{"login":"patriksvensson","id":357872,"avatar_url":"https://avatars.githubusercontent.com/u/357872?v=3","gravatar_id":"","url":"https://api.github.com/users/patriksvensson","html_url":"https://github.com/patriksvensson","followers_url":"https://api.github.com/users/patriksvensson/followers","following_url":"https://api.github.com/users/patriksvensson/following{/other_user}","gists_url":"https://api.github.com/users/patriksvensson/gists{/gist_id}","starred_url":"https://api.github.com/users/patriksvensson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriksvensson/subscriptions","organizations_url":"https://api.github.com/users/patriksvensson/orgs","repos_url":"https://api.github.com/users/patriksvensson/repos","events_url":"https://api.github.com/users/patriksvensson/events{/privacy}","received_events_url":"https://api.github.com/users/patriksvensson/received_events","type":"User","site_admin":false},"body":"Is `Format` needed? Wouldn't it be better with `Concat` here?","created_at":"2015-10-19T22:10:46Z","updated_at":"2015-10-19T22:10:46Z","html_url":"https://github.com/cake-build/cake/pull/454#discussion_r42432737","pull_request_url":"https://api.github.com/repos/cake-build/cake/pulls/454","_links":{"self":{"href":"https://api.github.com/repos/cake-build/cake/pulls/comments/42432737"},"html":{"href":"https://github.com/cake-build/cake/pull/454#discussion_r42432737"},"pull_request":{"href":"https://api.github.com/repos/cake-build/cake/pulls/454"}}},"pull_request":{"url":"https://api.github.com/repos/cake-build/cake/pulls/454","id":48009504,"html_url":"https://github.com/cake-build/cake/pull/454","diff_url":"https://github.com/cake-build/cake/pull/454.diff","patch_url":"https://github.com/cake-build/cake/pull/454.patch","issue_url":"https://api.github.com/repos/cake-build/cake/issues/454","number":454,"state":"open","locked":false,"title":"Add extension for ProcessArgumentBuilder","user":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"body":"So, instead of doing this:\r\n\r\n```\r\nbuilder.Append(\"-c\");\r\nbuilder.AppendQuoted(settings.CacheLocation);\r\n```\r\n\r\nYou would be able to use:\r\n\r\n```\r\nbuilder.AppendSwitchQuoted(\"--version\", settings.Version);\r\n```","created_at":"2015-10-18T14:30:01Z","updated_at":"2015-10-19T22:10:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1dfbaf3f54aded9de9ba649c9dac3e89294d8ff7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cake-build/cake/pulls/454/commits","review_comments_url":"https://api.github.com/repos/cake-build/cake/pulls/454/comments","review_comment_url":"https://api.github.com/repos/cake-build/cake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cake-build/cake/issues/454/comments","statuses_url":"https://api.github.com/repos/cake-build/cake/statuses/6e777ff7d869768dd2cb3566977802ac165975c3","head":{"label":"gep13:SwitchArguments","ref":"SwitchArguments","sha":"6e777ff7d869768dd2cb3566977802ac165975c3","user":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"repo":{"id":43681496,"name":"cake","full_name":"gep13/cake","owner":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gep13/cake","description":"Cake (C# Make) is a cross platform build automation system.","fork":true,"url":"https://api.github.com/repos/gep13/cake","forks_url":"https://api.github.com/repos/gep13/cake/forks","keys_url":"https://api.github.com/repos/gep13/cake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gep13/cake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gep13/cake/teams","hooks_url":"https://api.github.com/repos/gep13/cake/hooks","issue_events_url":"https://api.github.com/repos/gep13/cake/issues/events{/number}","events_url":"https://api.github.com/repos/gep13/cake/events","assignees_url":"https://api.github.com/repos/gep13/cake/assignees{/user}","branches_url":"https://api.github.com/repos/gep13/cake/branches{/branch}","tags_url":"https://api.github.com/repos/gep13/cake/tags","blobs_url":"https://api.github.com/repos/gep13/cake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gep13/cake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gep13/cake/git/refs{/sha}","trees_url":"https://api.github.com/repos/gep13/cake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gep13/cake/statuses/{sha}","languages_url":"https://api.github.com/repos/gep13/cake/languages","stargazers_url":"https://api.github.com/repos/gep13/cake/stargazers","contributors_url":"https://api.github.com/repos/gep13/cake/contributors","subscribers_url":"https://api.github.com/repos/gep13/cake/subscribers","subscription_url":"https://api.github.com/repos/gep13/cake/subscription","commits_url":"https://api.github.com/repos/gep13/cake/commits{/sha}","git_commits_url":"https://api.github.com/repos/gep13/cake/git/commits{/sha}","comments_url":"https://api.github.com/repos/gep13/cake/comments{/number}","issue_comment_url":"https://api.github.com/repos/gep13/cake/issues/comments{/number}","contents_url":"https://api.github.com/repos/gep13/cake/contents/{+path}","compare_url":"https://api.github.com/repos/gep13/cake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gep13/cake/merges","archive_url":"https://api.github.com/repos/gep13/cake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gep13/cake/downloads","issues_url":"https://api.github.com/repos/gep13/cake/issues{/number}","pulls_url":"https://api.github.com/repos/gep13/cake/pulls{/number}","milestones_url":"https://api.github.com/repos/gep13/cake/milestones{/number}","notifications_url":"https://api.github.com/repos/gep13/cake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gep13/cake/labels{/name}","releases_url":"https://api.github.com/repos/gep13/cake/releases{/id}","created_at":"2015-10-05T11:56:38Z","updated_at":"2015-10-05T11:56:40Z","pushed_at":"2015-10-19T20:27:57Z","git_url":"git://github.com/gep13/cake.git","ssh_url":"git@github.com:gep13/cake.git","clone_url":"https://github.com/gep13/cake.git","svn_url":"https://github.com/gep13/cake","homepage":"http://cakebuild.net/","size":3357,"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":"develop"}},"base":{"label":"cake-build:develop","ref":"develop","sha":"1a927680494d8a6b2dfe49c96e798b6d093fbdba","user":{"login":"cake-build","id":7738262,"avatar_url":"https://avatars.githubusercontent.com/u/7738262?v=3","gravatar_id":"","url":"https://api.github.com/users/cake-build","html_url":"https://github.com/cake-build","followers_url":"https://api.github.com/users/cake-build/followers","following_url":"https://api.github.com/users/cake-build/following{/other_user}","gists_url":"https://api.github.com/users/cake-build/gists{/gist_id}","starred_url":"https://api.github.com/users/cake-build/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cake-build/subscriptions","organizations_url":"https://api.github.com/users/cake-build/orgs","repos_url":"https://api.github.com/users/cake-build/repos","events_url":"https://api.github.com/users/cake-build/events{/privacy}","received_events_url":"https://api.github.com/users/cake-build/received_events","type":"Organization","site_admin":false},"repo":{"id":20094029,"name":"cake","full_name":"cake-build/cake","owner":{"login":"cake-build","id":7738262,"avatar_url":"https://avatars.githubusercontent.com/u/7738262?v=3","gravatar_id":"","url":"https://api.github.com/users/cake-build","html_url":"https://github.com/cake-build","followers_url":"https://api.github.com/users/cake-build/followers","following_url":"https://api.github.com/users/cake-build/following{/other_user}","gists_url":"https://api.github.com/users/cake-build/gists{/gist_id}","starred_url":"https://api.github.com/users/cake-build/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cake-build/subscriptions","organizations_url":"https://api.github.com/users/cake-build/orgs","repos_url":"https://api.github.com/users/cake-build/repos","events_url":"https://api.github.com/users/cake-build/events{/privacy}","received_events_url":"https://api.github.com/users/cake-build/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cake-build/cake","description":"Cake (C# Make) is a cross platform build automation system.","fork":false,"url":"https://api.github.com/repos/cake-build/cake","forks_url":"https://api.github.com/repos/cake-build/cake/forks","keys_url":"https://api.github.com/repos/cake-build/cake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cake-build/cake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cake-build/cake/teams","hooks_url":"https://api.github.com/repos/cake-build/cake/hooks","issue_events_url":"https://api.github.com/repos/cake-build/cake/issues/events{/number}","events_url":"https://api.github.com/repos/cake-build/cake/events","assignees_url":"https://api.github.com/repos/cake-build/cake/assignees{/user}","branches_url":"https://api.github.com/repos/cake-build/cake/branches{/branch}","tags_url":"https://api.github.com/repos/cake-build/cake/tags","blobs_url":"https://api.github.com/repos/cake-build/cake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cake-build/cake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cake-build/cake/git/refs{/sha}","trees_url":"https://api.github.com/repos/cake-build/cake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cake-build/cake/statuses/{sha}","languages_url":"https://api.github.com/repos/cake-build/cake/languages","stargazers_url":"https://api.github.com/repos/cake-build/cake/stargazers","contributors_url":"https://api.github.com/repos/cake-build/cake/contributors","subscribers_url":"https://api.github.com/repos/cake-build/cake/subscribers","subscription_url":"https://api.github.com/repos/cake-build/cake/subscription","commits_url":"https://api.github.com/repos/cake-build/cake/commits{/sha}","git_commits_url":"https://api.github.com/repos/cake-build/cake/git/commits{/sha}","comments_url":"https://api.github.com/repos/cake-build/cake/comments{/number}","issue_comment_url":"https://api.github.com/repos/cake-build/cake/issues/comments{/number}","contents_url":"https://api.github.com/repos/cake-build/cake/contents/{+path}","compare_url":"https://api.github.com/repos/cake-build/cake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cake-build/cake/merges","archive_url":"https://api.github.com/repos/cake-build/cake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cake-build/cake/downloads","issues_url":"https://api.github.com/repos/cake-build/cake/issues{/number}","pulls_url":"https://api.github.com/repos/cake-build/cake/pulls{/number}","milestones_url":"https://api.github.com/repos/cake-build/cake/milestones{/number}","notifications_url":"https://api.github.com/repos/cake-build/cake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cake-build/cake/labels{/name}","releases_url":"https://api.github.com/repos/cake-build/cake/releases{/id}","created_at":"2014-05-23T09:26:54Z","updated_at":"2015-10-15T10:23:01Z","pushed_at":"2015-10-19T20:28:53Z","git_url":"git://github.com/cake-build/cake.git","ssh_url":"git@github.com:cake-build/cake.git","clone_url":"https://github.com/cake-build/cake.git","svn_url":"https://github.com/cake-build/cake","homepage":"http://cakebuild.net/","size":7149,"stargazers_count":294,"watchers_count":294,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":78,"forks":64,"open_issues":78,"watchers":294,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cake-build/cake/pulls/454"},"html":{"href":"https://github.com/cake-build/cake/pull/454"},"issue":{"href":"https://api.github.com/repos/cake-build/cake/issues/454"},"comments":{"href":"https://api.github.com/repos/cake-build/cake/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/cake-build/cake/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/cake-build/cake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cake-build/cake/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/cake-build/cake/statuses/6e777ff7d869768dd2cb3566977802ac165975c3"}}}}