{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/33091816","id":33091816,"diff_hunk":"@@ -0,0 +1,345 @@\n+// Copyright (c) Microsoft. All rights reserved.\n+// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n+\n+using System;\n+using System.Collections;\n+using System.Diagnostics;\n+\n+internal class Program\n+{\n+    private static void Main(string[] args)\n+    {\n+        string osDetect = DetectOS();\n+\n+        if (args.Length >= 1)\n+        {\n+            osDetect = args[0];\n+        }\n+\n+        if (osDetect == \"linux\")\n+        {\n+            DrawLinux();\n+        }\n+        else if (osDetect == \"freebsd\")\n+        {\n+            DrawFreeBSD();\n+        }\n+        else if (osDetect == \"mac\")\n+        {\n+            DrawMac();\n+        }\n+        else if (osDetect == \"windows\")\n+        {\n+            DrawWindows();\n+        }\n+        else\n+        {\n+            DrawWindows();\n+        }\n+\n+        Console.WriteLine();\n+        Console.WriteLine(\"Press ENTER to continue . . . \");\n+        Console.ReadLine();\n+    }\n+\n+    private static void DrawWindows()\n+    {\n+        Console.WriteLine(\"Hello, Windows...\");\n+\n+        const int squareSize = 20;\n+\n+        var colors = new[] { ConsoleColor.Red, ConsoleColor.Green, ConsoleColor.Blue, ConsoleColor.Yellow };\n+        for (int row = 0; row < 2; row++)\n+        {\n+            for (int i = 0; i < squareSize / 2; i++)\n+            {\n+                Console.WriteLine();\n+                Console.Write(\"  \");\n+                for (int col = 0; col < 2; col++)\n+                {\n+                    Console.BackgroundColor = colors[row * 2 + col];\n+                    Console.ForegroundColor = colors[row * 2 + col];\n+                    for (int j = 0; j < squareSize; j++) Console.Write('@');\n+                    Console.ResetColor();\n+                }\n+            }\n+        }\n+        Console.WriteLine();\n+    }\n+","path":"HelloWorld.cs","position":69,"original_position":69,"commit_id":"c0116edaa6f52e78c150bcc52dfe2dc14c8914ae","original_commit_id":"c0116edaa6f52e78c150bcc52dfe2dc14c8914ae","user":{"login":"KrzysztofCwalina","id":9724236,"avatar_url":"https://avatars.githubusercontent.com/u/9724236?v=3","gravatar_id":"","url":"https://api.github.com/users/KrzysztofCwalina","html_url":"https://github.com/KrzysztofCwalina","followers_url":"https://api.github.com/users/KrzysztofCwalina/followers","following_url":"https://api.github.com/users/KrzysztofCwalina/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofCwalina/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofCwalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofCwalina/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofCwalina/orgs","repos_url":"https://api.github.com/users/KrzysztofCwalina/repos","events_url":"https://api.github.com/users/KrzysztofCwalina/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofCwalina/received_events","type":"User","site_admin":false},"body":"Why all these show as new? Did you change anything in the Draw* methods?","created_at":"2015-06-23T21:00:59Z","updated_at":"2015-06-23T21:00:59Z","html_url":"https://github.com/dotnet/corefxlab/pull/107#discussion_r33091816","pull_request_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/33091816"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/107#discussion_r33091816"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/107","id":38379543,"html_url":"https://github.com/dotnet/corefxlab/pull/107","diff_url":"https://github.com/dotnet/corefxlab/pull/107.diff","patch_url":"https://github.com/dotnet/corefxlab/pull/107.patch","issue_url":"https://api.github.com/repos/dotnet/corefxlab/issues/107","number":107,"state":"open","locked":false,"title":"Update to HelloWorld.cs","user":{"login":"ryaneliseislalom","id":4030432,"avatar_url":"https://avatars.githubusercontent.com/u/4030432?v=3","gravatar_id":"","url":"https://api.github.com/users/ryaneliseislalom","html_url":"https://github.com/ryaneliseislalom","followers_url":"https://api.github.com/users/ryaneliseislalom/followers","following_url":"https://api.github.com/users/ryaneliseislalom/following{/other_user}","gists_url":"https://api.github.com/users/ryaneliseislalom/gists{/gist_id}","starred_url":"https://api.github.com/users/ryaneliseislalom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryaneliseislalom/subscriptions","organizations_url":"https://api.github.com/users/ryaneliseislalom/orgs","repos_url":"https://api.github.com/users/ryaneliseislalom/repos","events_url":"https://api.github.com/users/ryaneliseislalom/events{/privacy}","received_events_url":"https://api.github.com/users/ryaneliseislalom/received_events","type":"User","site_admin":false},"body":"Updated corefxlab/demos/CoreClrConsoleApplications/HelloWorld/HelloWorld.cs to include a function for OS detection while still allowing args[0] to be used for overriding and showing various OS logos. No break to existing behavior.\r\n\r\nAlso note, that proper OS detection would use Diagnostics.Environment, which is not yet implemented in CoreFX. This has been noted in the detection method comments.","created_at":"2015-06-23T20:32:05Z","updated_at":"2015-06-23T21:00:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3f27637dd18486d2c8fc1ab2de0c26e3a879cf3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/107/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/107/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/issues/107/comments","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/c0116edaa6f52e78c150bcc52dfe2dc14c8914ae","head":{"label":"ryaneliseislalom:patch-1","ref":"patch-1","sha":"c0116edaa6f52e78c150bcc52dfe2dc14c8914ae","user":{"login":"ryaneliseislalom","id":4030432,"avatar_url":"https://avatars.githubusercontent.com/u/4030432?v=3","gravatar_id":"","url":"https://api.github.com/users/ryaneliseislalom","html_url":"https://github.com/ryaneliseislalom","followers_url":"https://api.github.com/users/ryaneliseislalom/followers","following_url":"https://api.github.com/users/ryaneliseislalom/following{/other_user}","gists_url":"https://api.github.com/users/ryaneliseislalom/gists{/gist_id}","starred_url":"https://api.github.com/users/ryaneliseislalom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryaneliseislalom/subscriptions","organizations_url":"https://api.github.com/users/ryaneliseislalom/orgs","repos_url":"https://api.github.com/users/ryaneliseislalom/repos","events_url":"https://api.github.com/users/ryaneliseislalom/events{/privacy}","received_events_url":"https://api.github.com/users/ryaneliseislalom/received_events","type":"User","site_admin":false},"repo":{"id":37943009,"name":"corefxlab","full_name":"ryaneliseislalom/corefxlab","owner":{"login":"ryaneliseislalom","id":4030432,"avatar_url":"https://avatars.githubusercontent.com/u/4030432?v=3","gravatar_id":"","url":"https://api.github.com/users/ryaneliseislalom","html_url":"https://github.com/ryaneliseislalom","followers_url":"https://api.github.com/users/ryaneliseislalom/followers","following_url":"https://api.github.com/users/ryaneliseislalom/following{/other_user}","gists_url":"https://api.github.com/users/ryaneliseislalom/gists{/gist_id}","starred_url":"https://api.github.com/users/ryaneliseislalom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryaneliseislalom/subscriptions","organizations_url":"https://api.github.com/users/ryaneliseislalom/orgs","repos_url":"https://api.github.com/users/ryaneliseislalom/repos","events_url":"https://api.github.com/users/ryaneliseislalom/events{/privacy}","received_events_url":"https://api.github.com/users/ryaneliseislalom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryaneliseislalom/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":true,"url":"https://api.github.com/repos/ryaneliseislalom/corefxlab","forks_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/forks","keys_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/teams","hooks_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/events","assignees_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/tags","blobs_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/languages","stargazers_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/subscription","commits_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/merges","archive_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/downloads","issues_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/ryaneliseislalom/corefxlab/releases{/id}","created_at":"2015-06-23T20:25:24Z","updated_at":"2015-06-23T20:25:25Z","pushed_at":"2015-06-23T20:31:28Z","git_url":"git://github.com/ryaneliseislalom/corefxlab.git","ssh_url":"git@github.com:ryaneliseislalom/corefxlab.git","clone_url":"https://github.com/ryaneliseislalom/corefxlab.git","svn_url":"https://github.com/ryaneliseislalom/corefxlab","homepage":"","size":8726,"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":"dotnet:master","ref":"master","sha":"2b5777feaf4620c380df2d8bd9a7f5807cb160d3","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":29504192,"name":"corefxlab","full_name":"dotnet/corefxlab","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/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":false,"url":"https://api.github.com/repos/dotnet/corefxlab","forks_url":"https://api.github.com/repos/dotnet/corefxlab/forks","keys_url":"https://api.github.com/repos/dotnet/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefxlab/teams","hooks_url":"https://api.github.com/repos/dotnet/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefxlab/events","assignees_url":"https://api.github.com/repos/dotnet/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefxlab/tags","blobs_url":"https://api.github.com/repos/dotnet/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefxlab/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefxlab/subscription","commits_url":"https://api.github.com/repos/dotnet/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefxlab/merges","archive_url":"https://api.github.com/repos/dotnet/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefxlab/downloads","issues_url":"https://api.github.com/repos/dotnet/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefxlab/releases{/id}","created_at":"2015-01-20T00:44:35Z","updated_at":"2015-06-17T05:48:08Z","pushed_at":"2015-06-23T20:32:06Z","git_url":"git://github.com/dotnet/corefxlab.git","ssh_url":"git@github.com:dotnet/corefxlab.git","clone_url":"https://github.com/dotnet/corefxlab.git","svn_url":"https://github.com/dotnet/corefxlab","homepage":"","size":8726,"stargazers_count":85,"watchers_count":85,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":31,"forks":45,"open_issues":31,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/107"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/107"},"issue":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/107"},"comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefxlab/statuses/c0116edaa6f52e78c150bcc52dfe2dc14c8914ae"}}}}