{"action":"created","comment":{"url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/comments/76879505","id":76879505,"diff_hunk":"@@ -16,8 +16,27 @@ public class Program\n         static int Main(string[] args)\n         {\n             var config = ClientConfiguration.LocalhostSilo();\n-            const int initializeAttemptsBeforeFailing = 5;\n-            int attemp = 0;\n+            try\n+            {\n+                InitializeWithRetries(config, initializeAttemptsBeforeFailing: 5);\n+            }\n+            catch (Exception ex)\n+            {\n+                Console.WriteLine($\"Orleans client initialization failed failed due to {ex}\");\n+\n+                Console.ReadLine();\n+                return 1;\n+            }\n+\n+            DoClientWork().Wait();\n+            Console.WriteLine(\"Press Enter to terminate...\");\n+            Console.ReadLine();\n+            return 0;\n+        }\n+\n+        private static void InitializeWithRetries(ClientConfiguration config, int initializeAttemptsBeforeFailing)\n+        {\n+            int attempt = 0;\n             while (true)\n             {","path":"Samples/HelloWorld/OrleansClient/Program.cs","position":28,"original_position":28,"commit_id":"4e9e7af228efd56a6c6708ff94523e320dcfcbb1","original_commit_id":"00918bebce4e3ab92964954b06ad96c2fb74c097","user":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars.githubusercontent.com/u/20803801?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"body":"we are catching a general 'Exception' in main, what's wrong at catching a general 'Exception' here. That way we make the code more precise. \r\nthe exception handling in main can be moved here. and we should avoid wild loop while I understand this is something we inherit from the original sample. ","created_at":"2016-08-30T21:09:23Z","updated_at":"2016-08-30T21:09:23Z","html_url":"https://github.com/xiazen/orleans-xiazen/pull/1#discussion_r76879505","pull_request_url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/comments/76879505"},"html":{"href":"https://github.com/xiazen/orleans-xiazen/pull/1#discussion_r76879505"},"pull_request":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1","id":83192505,"html_url":"https://github.com/xiazen/orleans-xiazen/pull/1","diff_url":"https://github.com/xiazen/orleans-xiazen/pull/1.diff","patch_url":"https://github.com/xiazen/orleans-xiazen/pull/1.patch","issue_url":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/1","number":1,"state":"closed","locked":false,"title":"Clean up Hello World","user":{"login":"jdom","id":1361686,"avatar_url":"https://avatars.githubusercontent.com/u/1361686?v=3","gravatar_id":"","url":"https://api.github.com/users/jdom","html_url":"https://github.com/jdom","followers_url":"https://api.github.com/users/jdom/followers","following_url":"https://api.github.com/users/jdom/following{/other_user}","gists_url":"https://api.github.com/users/jdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdom/subscriptions","organizations_url":"https://api.github.com/users/jdom/orgs","repos_url":"https://api.github.com/users/jdom/repos","events_url":"https://api.github.com/users/jdom/events{/privacy}","received_events_url":"https://api.github.com/users/jdom/received_events","type":"User","site_admin":false},"body":"I took your changes, and instead of adding a bunch of clean up comments, I decided to make a PR against your branch, so you can evaluate it","created_at":"2016-08-30T00:55:55Z","updated_at":"2016-08-30T21:09:23Z","closed_at":"2016-08-30T21:04:18Z","merged_at":"2016-08-30T21:04:18Z","merge_commit_sha":"bd5b82277b6388da7fa716e01cde7aa01fec78fc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1/commits","review_comments_url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1/comments","review_comment_url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/1/comments","statuses_url":"https://api.github.com/repos/xiazen/orleans-xiazen/statuses/4e9e7af228efd56a6c6708ff94523e320dcfcbb1","head":{"label":"jdom:helloworld","ref":"helloworld","sha":"4e9e7af228efd56a6c6708ff94523e320dcfcbb1","user":{"login":"jdom","id":1361686,"avatar_url":"https://avatars.githubusercontent.com/u/1361686?v=3","gravatar_id":"","url":"https://api.github.com/users/jdom","html_url":"https://github.com/jdom","followers_url":"https://api.github.com/users/jdom/followers","following_url":"https://api.github.com/users/jdom/following{/other_user}","gists_url":"https://api.github.com/users/jdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdom/subscriptions","organizations_url":"https://api.github.com/users/jdom/orgs","repos_url":"https://api.github.com/users/jdom/repos","events_url":"https://api.github.com/users/jdom/events{/privacy}","received_events_url":"https://api.github.com/users/jdom/received_events","type":"User","site_admin":false},"repo":{"id":38893383,"name":"orleans","full_name":"jdom/orleans","owner":{"login":"jdom","id":1361686,"avatar_url":"https://avatars.githubusercontent.com/u/1361686?v=3","gravatar_id":"","url":"https://api.github.com/users/jdom","html_url":"https://github.com/jdom","followers_url":"https://api.github.com/users/jdom/followers","following_url":"https://api.github.com/users/jdom/following{/other_user}","gists_url":"https://api.github.com/users/jdom/gists{/gist_id}","starred_url":"https://api.github.com/users/jdom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdom/subscriptions","organizations_url":"https://api.github.com/users/jdom/orgs","repos_url":"https://api.github.com/users/jdom/repos","events_url":"https://api.github.com/users/jdom/events{/privacy}","received_events_url":"https://api.github.com/users/jdom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdom/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":true,"url":"https://api.github.com/repos/jdom/orleans","forks_url":"https://api.github.com/repos/jdom/orleans/forks","keys_url":"https://api.github.com/repos/jdom/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdom/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdom/orleans/teams","hooks_url":"https://api.github.com/repos/jdom/orleans/hooks","issue_events_url":"https://api.github.com/repos/jdom/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/jdom/orleans/events","assignees_url":"https://api.github.com/repos/jdom/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/jdom/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/jdom/orleans/tags","blobs_url":"https://api.github.com/repos/jdom/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdom/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdom/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdom/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdom/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/jdom/orleans/languages","stargazers_url":"https://api.github.com/repos/jdom/orleans/stargazers","contributors_url":"https://api.github.com/repos/jdom/orleans/contributors","subscribers_url":"https://api.github.com/repos/jdom/orleans/subscribers","subscription_url":"https://api.github.com/repos/jdom/orleans/subscription","commits_url":"https://api.github.com/repos/jdom/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdom/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdom/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdom/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdom/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/jdom/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdom/orleans/merges","archive_url":"https://api.github.com/repos/jdom/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdom/orleans/downloads","issues_url":"https://api.github.com/repos/jdom/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/jdom/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/jdom/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/jdom/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdom/orleans/labels{/name}","releases_url":"https://api.github.com/repos/jdom/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/jdom/orleans/deployments","created_at":"2015-07-10T17:33:29Z","updated_at":"2016-03-16T16:08:01Z","pushed_at":"2016-08-30T20:52:41Z","git_url":"git://github.com/jdom/orleans.git","ssh_url":"git@github.com:jdom/orleans.git","clone_url":"https://github.com/jdom/orleans.git","svn_url":"https://github.com/jdom/orleans","homepage":"http://dotnet.github.io/orleans","size":15560,"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":"xiazen:helloworld","ref":"helloworld","sha":"16ea3e596c427b06782bd78944d77a300a7b498b","user":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars.githubusercontent.com/u/20803801?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"repo":{"id":66402876,"name":"orleans-xiazen","full_name":"xiazen/orleans-xiazen","owner":{"login":"xiazen","id":20803801,"avatar_url":"https://avatars.githubusercontent.com/u/20803801?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazen","html_url":"https://github.com/xiazen","followers_url":"https://api.github.com/users/xiazen/followers","following_url":"https://api.github.com/users/xiazen/following{/other_user}","gists_url":"https://api.github.com/users/xiazen/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazen/subscriptions","organizations_url":"https://api.github.com/users/xiazen/orgs","repos_url":"https://api.github.com/users/xiazen/repos","events_url":"https://api.github.com/users/xiazen/events{/privacy}","received_events_url":"https://api.github.com/users/xiazen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiazen/orleans-xiazen","description":"Orleans - Distributed Virtual Actor Model","fork":true,"url":"https://api.github.com/repos/xiazen/orleans-xiazen","forks_url":"https://api.github.com/repos/xiazen/orleans-xiazen/forks","keys_url":"https://api.github.com/repos/xiazen/orleans-xiazen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiazen/orleans-xiazen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiazen/orleans-xiazen/teams","hooks_url":"https://api.github.com/repos/xiazen/orleans-xiazen/hooks","issue_events_url":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/events{/number}","events_url":"https://api.github.com/repos/xiazen/orleans-xiazen/events","assignees_url":"https://api.github.com/repos/xiazen/orleans-xiazen/assignees{/user}","branches_url":"https://api.github.com/repos/xiazen/orleans-xiazen/branches{/branch}","tags_url":"https://api.github.com/repos/xiazen/orleans-xiazen/tags","blobs_url":"https://api.github.com/repos/xiazen/orleans-xiazen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiazen/orleans-xiazen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiazen/orleans-xiazen/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiazen/orleans-xiazen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiazen/orleans-xiazen/statuses/{sha}","languages_url":"https://api.github.com/repos/xiazen/orleans-xiazen/languages","stargazers_url":"https://api.github.com/repos/xiazen/orleans-xiazen/stargazers","contributors_url":"https://api.github.com/repos/xiazen/orleans-xiazen/contributors","subscribers_url":"https://api.github.com/repos/xiazen/orleans-xiazen/subscribers","subscription_url":"https://api.github.com/repos/xiazen/orleans-xiazen/subscription","commits_url":"https://api.github.com/repos/xiazen/orleans-xiazen/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiazen/orleans-xiazen/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiazen/orleans-xiazen/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiazen/orleans-xiazen/contents/{+path}","compare_url":"https://api.github.com/repos/xiazen/orleans-xiazen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiazen/orleans-xiazen/merges","archive_url":"https://api.github.com/repos/xiazen/orleans-xiazen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiazen/orleans-xiazen/downloads","issues_url":"https://api.github.com/repos/xiazen/orleans-xiazen/issues{/number}","pulls_url":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls{/number}","milestones_url":"https://api.github.com/repos/xiazen/orleans-xiazen/milestones{/number}","notifications_url":"https://api.github.com/repos/xiazen/orleans-xiazen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiazen/orleans-xiazen/labels{/name}","releases_url":"https://api.github.com/repos/xiazen/orleans-xiazen/releases{/id}","deployments_url":"https://api.github.com/repos/xiazen/orleans-xiazen/deployments","created_at":"2016-08-23T20:59:50Z","updated_at":"2016-08-23T21:20:56Z","pushed_at":"2016-08-30T21:04:19Z","git_url":"git://github.com/xiazen/orleans-xiazen.git","ssh_url":"git@github.com:xiazen/orleans-xiazen.git","clone_url":"https://github.com/xiazen/orleans-xiazen.git","svn_url":"https://github.com/xiazen/orleans-xiazen","homepage":"http://dotnet.github.io/orleans","size":27414,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1"},"html":{"href":"https://github.com/xiazen/orleans-xiazen/pull/1"},"issue":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/1"},"comments":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/xiazen/orleans-xiazen/statuses/4e9e7af228efd56a6c6708ff94523e320dcfcbb1"}}}}
{"actor":{"display_login":"xiazen"}}