{"action":"created","comment":{"url":"https://api.github.com/repos/virtium/BuildEventer/pulls/comments/47761518","id":47761518,"diff_hunk":"@@ -0,0 +1,109 @@\n+﻿/*\n+<License>\n+Copyright 2015 Virtium Technology\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+    http ://www.apache.org/licenses/LICENSE-2.0\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+</License>\n+ */\n+\n+using System;\n+using System.IO;\n+\n+namespace PostBuild.Utilites\n+{\n+    static class Copy\n+    {\n+        #region Public Functions\n+        public static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs = true, bool overwrite = false)\n+        {\n+            // Get the subdirectories for the specified directory.\n+            DirectoryInfo dirSource = new DirectoryInfo(sourceDirName);\n+\n+            if (false == dirSource.Exists)\n+            {\n+                Console.WriteLine(String.Format(\"Source directory does not exist or could not be found: \" + sourceDirName));\n+            }\n+\n+            // If the destination directory doesn't exist, create it.\n+            if (false == Directory.Exists(destDirName))\n+            {\n+                Directory.CreateDirectory(destDirName);\n+            }\n+\n+            PrintCopyTo(sourceDirName, destDirName);\n+\n+            // Get the files in the directory and copy them to the new location.\n+            foreach (FileInfo file in dirSource.GetFiles())\n+            {\n+                FileCopy(file.FullName, destDirName, overwrite);\n+            }\n+\n+            // If copying subdirectories, copy them and their contents to new location.\n+            if (true == copySubDirs)\n+            {\n+                foreach (DirectoryInfo subDir in dirSource.GetDirectories())\n+                {\n+                    string tempPath = Path.Combine(destDirName, subDir.Name);\n+                    DirectoryCopy(subDir.FullName, tempPath, copySubDirs, overwrite);\n+                }\n+            }\n+        }\n+\n+        public static void FileCopy(string sourceFile, string targetPath, bool overwrite = false)\n+        {\n+            // Create a new target folder, if necessary.\n+            if (false == System.IO.Directory.Exists(targetPath))\n+            {\n+                System.IO.Directory.CreateDirectory(targetPath);\n+            }\n+\n+            FileInfo fileInfo = new FileInfo(sourceFile);\n+            string newTargetPath = System.IO.Path.Combine(targetPath, fileInfo.Name);\n+\n+            PrintCopyTo(sourceFile, newTargetPath);\n+\n+            if (true == File.Exists(newTargetPath))\n+            {\n+                if (true == overwrite)\n+                {\n+                    System.IO.File.Copy(sourceFile, newTargetPath, true);","path":"BuildEventer/PostBuild/Utilites/Copy.cs","position":76,"original_position":76,"commit_id":"8e8e9dc8f46759526af974a65de1b9fddeaa3fdf","original_commit_id":"8e8e9dc8f46759526af974a65de1b9fddeaa3fdf","user":{"login":"thanhtranTSD","id":14213379,"avatar_url":"https://avatars.githubusercontent.com/u/14213379?v=3","gravatar_id":"","url":"https://api.github.com/users/thanhtranTSD","html_url":"https://github.com/thanhtranTSD","followers_url":"https://api.github.com/users/thanhtranTSD/followers","following_url":"https://api.github.com/users/thanhtranTSD/following{/other_user}","gists_url":"https://api.github.com/users/thanhtranTSD/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhtranTSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhtranTSD/subscriptions","organizations_url":"https://api.github.com/users/thanhtranTSD/orgs","repos_url":"https://api.github.com/users/thanhtranTSD/repos","events_url":"https://api.github.com/users/thanhtranTSD/events{/privacy}","received_events_url":"https://api.github.com/users/thanhtranTSD/received_events","type":"User","site_admin":false},"body":"Deleted them.","created_at":"2015-12-16T10:51:11Z","updated_at":"2015-12-16T10:51:11Z","html_url":"https://github.com/virtium/BuildEventer/pull/17#discussion_r47761518","pull_request_url":"https://api.github.com/repos/virtium/BuildEventer/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/comments/47761518"},"html":{"href":"https://github.com/virtium/BuildEventer/pull/17#discussion_r47761518"},"pull_request":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/virtium/BuildEventer/pulls/17","id":53684004,"html_url":"https://github.com/virtium/BuildEventer/pull/17","diff_url":"https://github.com/virtium/BuildEventer/pull/17.diff","patch_url":"https://github.com/virtium/BuildEventer/pull/17.patch","issue_url":"https://api.github.com/repos/virtium/BuildEventer/issues/17","number":17,"state":"open","locked":false,"title":"Have a .NET executable to play the configuration file","user":{"login":"thanhtranTSD","id":14213379,"avatar_url":"https://avatars.githubusercontent.com/u/14213379?v=3","gravatar_id":"","url":"https://api.github.com/users/thanhtranTSD","html_url":"https://github.com/thanhtranTSD","followers_url":"https://api.github.com/users/thanhtranTSD/followers","following_url":"https://api.github.com/users/thanhtranTSD/following{/other_user}","gists_url":"https://api.github.com/users/thanhtranTSD/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhtranTSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhtranTSD/subscriptions","organizations_url":"https://api.github.com/users/thanhtranTSD/orgs","repos_url":"https://api.github.com/users/thanhtranTSD/repos","events_url":"https://api.github.com/users/thanhtranTSD/events{/privacy}","received_events_url":"https://api.github.com/users/thanhtranTSD/received_events","type":"User","site_admin":false},"body":"- Implemented PostBuild tool for execute xml configuration in CommandLine.","created_at":"2015-12-15T10:20:08Z","updated_at":"2015-12-16T10:51:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b2ab927492dd1f195f3a8f287ec88d06438aaa6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/virtium/BuildEventer/pulls/17/commits","review_comments_url":"https://api.github.com/repos/virtium/BuildEventer/pulls/17/comments","review_comment_url":"https://api.github.com/repos/virtium/BuildEventer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/virtium/BuildEventer/issues/17/comments","statuses_url":"https://api.github.com/repos/virtium/BuildEventer/statuses/8e8e9dc8f46759526af974a65de1b9fddeaa3fdf","head":{"label":"thanhtranTSD:ExecuteXMLConfigurationFile","ref":"ExecuteXMLConfigurationFile","sha":"8e8e9dc8f46759526af974a65de1b9fddeaa3fdf","user":{"login":"thanhtranTSD","id":14213379,"avatar_url":"https://avatars.githubusercontent.com/u/14213379?v=3","gravatar_id":"","url":"https://api.github.com/users/thanhtranTSD","html_url":"https://github.com/thanhtranTSD","followers_url":"https://api.github.com/users/thanhtranTSD/followers","following_url":"https://api.github.com/users/thanhtranTSD/following{/other_user}","gists_url":"https://api.github.com/users/thanhtranTSD/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhtranTSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhtranTSD/subscriptions","organizations_url":"https://api.github.com/users/thanhtranTSD/orgs","repos_url":"https://api.github.com/users/thanhtranTSD/repos","events_url":"https://api.github.com/users/thanhtranTSD/events{/privacy}","received_events_url":"https://api.github.com/users/thanhtranTSD/received_events","type":"User","site_admin":false},"repo":{"id":46095022,"name":"BuildEventer-1","full_name":"thanhtranTSD/BuildEventer-1","owner":{"login":"thanhtranTSD","id":14213379,"avatar_url":"https://avatars.githubusercontent.com/u/14213379?v=3","gravatar_id":"","url":"https://api.github.com/users/thanhtranTSD","html_url":"https://github.com/thanhtranTSD","followers_url":"https://api.github.com/users/thanhtranTSD/followers","following_url":"https://api.github.com/users/thanhtranTSD/following{/other_user}","gists_url":"https://api.github.com/users/thanhtranTSD/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhtranTSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhtranTSD/subscriptions","organizations_url":"https://api.github.com/users/thanhtranTSD/orgs","repos_url":"https://api.github.com/users/thanhtranTSD/repos","events_url":"https://api.github.com/users/thanhtranTSD/events{/privacy}","received_events_url":"https://api.github.com/users/thanhtranTSD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thanhtranTSD/BuildEventer-1","description":"","fork":true,"url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1","forks_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/forks","keys_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/teams","hooks_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/hooks","issue_events_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/issues/events{/number}","events_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/events","assignees_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/assignees{/user}","branches_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/branches{/branch}","tags_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/tags","blobs_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/statuses/{sha}","languages_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/languages","stargazers_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/stargazers","contributors_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/contributors","subscribers_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/subscribers","subscription_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/subscription","commits_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/contents/{+path}","compare_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/merges","archive_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/downloads","issues_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/issues{/number}","pulls_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/pulls{/number}","milestones_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/milestones{/number}","notifications_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/labels{/name}","releases_url":"https://api.github.com/repos/thanhtranTSD/BuildEventer-1/releases{/id}","created_at":"2015-11-13T02:35:21Z","updated_at":"2015-11-22T16:56:27Z","pushed_at":"2015-12-16T10:03:06Z","git_url":"git://github.com/thanhtranTSD/BuildEventer-1.git","ssh_url":"git@github.com:thanhtranTSD/BuildEventer-1.git","clone_url":"https://github.com/thanhtranTSD/BuildEventer-1.git","svn_url":"https://github.com/thanhtranTSD/BuildEventer-1","homepage":null,"size":517,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"virtium:master","ref":"master","sha":"8bbc89f0313a026571b268e29a9a1cea79ab9838","user":{"login":"virtium","id":11761410,"avatar_url":"https://avatars.githubusercontent.com/u/11761410?v=3","gravatar_id":"","url":"https://api.github.com/users/virtium","html_url":"https://github.com/virtium","followers_url":"https://api.github.com/users/virtium/followers","following_url":"https://api.github.com/users/virtium/following{/other_user}","gists_url":"https://api.github.com/users/virtium/gists{/gist_id}","starred_url":"https://api.github.com/users/virtium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtium/subscriptions","organizations_url":"https://api.github.com/users/virtium/orgs","repos_url":"https://api.github.com/users/virtium/repos","events_url":"https://api.github.com/users/virtium/events{/privacy}","received_events_url":"https://api.github.com/users/virtium/received_events","type":"Organization","site_admin":false},"repo":{"id":35200094,"name":"BuildEventer","full_name":"virtium/BuildEventer","owner":{"login":"virtium","id":11761410,"avatar_url":"https://avatars.githubusercontent.com/u/11761410?v=3","gravatar_id":"","url":"https://api.github.com/users/virtium","html_url":"https://github.com/virtium","followers_url":"https://api.github.com/users/virtium/followers","following_url":"https://api.github.com/users/virtium/following{/other_user}","gists_url":"https://api.github.com/users/virtium/gists{/gist_id}","starred_url":"https://api.github.com/users/virtium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtium/subscriptions","organizations_url":"https://api.github.com/users/virtium/orgs","repos_url":"https://api.github.com/users/virtium/repos","events_url":"https://api.github.com/users/virtium/events{/privacy}","received_events_url":"https://api.github.com/users/virtium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/virtium/BuildEventer","description":"","fork":false,"url":"https://api.github.com/repos/virtium/BuildEventer","forks_url":"https://api.github.com/repos/virtium/BuildEventer/forks","keys_url":"https://api.github.com/repos/virtium/BuildEventer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/virtium/BuildEventer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/virtium/BuildEventer/teams","hooks_url":"https://api.github.com/repos/virtium/BuildEventer/hooks","issue_events_url":"https://api.github.com/repos/virtium/BuildEventer/issues/events{/number}","events_url":"https://api.github.com/repos/virtium/BuildEventer/events","assignees_url":"https://api.github.com/repos/virtium/BuildEventer/assignees{/user}","branches_url":"https://api.github.com/repos/virtium/BuildEventer/branches{/branch}","tags_url":"https://api.github.com/repos/virtium/BuildEventer/tags","blobs_url":"https://api.github.com/repos/virtium/BuildEventer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/virtium/BuildEventer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/virtium/BuildEventer/git/refs{/sha}","trees_url":"https://api.github.com/repos/virtium/BuildEventer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/virtium/BuildEventer/statuses/{sha}","languages_url":"https://api.github.com/repos/virtium/BuildEventer/languages","stargazers_url":"https://api.github.com/repos/virtium/BuildEventer/stargazers","contributors_url":"https://api.github.com/repos/virtium/BuildEventer/contributors","subscribers_url":"https://api.github.com/repos/virtium/BuildEventer/subscribers","subscription_url":"https://api.github.com/repos/virtium/BuildEventer/subscription","commits_url":"https://api.github.com/repos/virtium/BuildEventer/commits{/sha}","git_commits_url":"https://api.github.com/repos/virtium/BuildEventer/git/commits{/sha}","comments_url":"https://api.github.com/repos/virtium/BuildEventer/comments{/number}","issue_comment_url":"https://api.github.com/repos/virtium/BuildEventer/issues/comments{/number}","contents_url":"https://api.github.com/repos/virtium/BuildEventer/contents/{+path}","compare_url":"https://api.github.com/repos/virtium/BuildEventer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/virtium/BuildEventer/merges","archive_url":"https://api.github.com/repos/virtium/BuildEventer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/virtium/BuildEventer/downloads","issues_url":"https://api.github.com/repos/virtium/BuildEventer/issues{/number}","pulls_url":"https://api.github.com/repos/virtium/BuildEventer/pulls{/number}","milestones_url":"https://api.github.com/repos/virtium/BuildEventer/milestones{/number}","notifications_url":"https://api.github.com/repos/virtium/BuildEventer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/virtium/BuildEventer/labels{/name}","releases_url":"https://api.github.com/repos/virtium/BuildEventer/releases{/id}","created_at":"2015-05-07T05:14:42Z","updated_at":"2015-11-13T14:32:40Z","pushed_at":"2015-12-16T10:03:06Z","git_url":"git://github.com/virtium/BuildEventer.git","ssh_url":"git@github.com:virtium/BuildEventer.git","clone_url":"https://github.com/virtium/BuildEventer.git","svn_url":"https://github.com/virtium/BuildEventer","homepage":null,"size":699,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/17"},"html":{"href":"https://github.com/virtium/BuildEventer/pull/17"},"issue":{"href":"https://api.github.com/repos/virtium/BuildEventer/issues/17"},"comments":{"href":"https://api.github.com/repos/virtium/BuildEventer/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/virtium/BuildEventer/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/virtium/BuildEventer/statuses/8e8e9dc8f46759526af974a65de1b9fddeaa3fdf"}}}}