{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/comments/76506751","id":76506751,"diff_hunk":"@@ -90,4 +96,13 @@ public IPEndPoint GetIPEndpoint(string endpointName)\n \n         public void UnsubscribeFromStoppingNotification(object handlerObject, EventHandler<object> handler) { }\n     }\n+\n+    public class Startup : IStartup\n+    {\n+        public IServiceProvider ConfigureServices(IServiceCollection svcCollection)\n+        {\n+            OrleansInternalServices.RegisterSystemTypes(svcCollection);\n+            return svcCollection.BuildServiceProvider();\n+        }\n+    }","path":"test/TesterInternal/Deployment/AzureSiloTests.cs","position":64,"original_position":64,"commit_id":"a68a6c2f4216aa96a8d693807ab25cbf51ed036b","original_commit_id":"a68a6c2f4216aa96a8d693807ab25cbf51ed036b","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":"This is a pattern borrowed from ASP.Net startUp class pattern : https://docs.asp.net/en/latest/fundamentals/startup.html\r\nTODO here to put configuration and initialization in this class, for example, init an AzureSilo. ","created_at":"2016-08-27T00:55:58Z","updated_at":"2016-08-27T00:55:58Z","html_url":"https://github.com/dotnet/orleans/pull/2099#discussion_r76506751","pull_request_url":"https://api.github.com/repos/dotnet/orleans/pulls/2099","_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments/76506751"},"html":{"href":"https://github.com/dotnet/orleans/pull/2099#discussion_r76506751"},"pull_request":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2099"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/2099","id":82970512,"html_url":"https://github.com/dotnet/orleans/pull/2099","diff_url":"https://github.com/dotnet/orleans/pull/2099.diff","patch_url":"https://github.com/dotnet/orleans/pull/2099.patch","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/2099","number":2099,"state":"open","locked":false,"title":"[WIP] Dependency Injection","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":"- Make orleans service provider available to application layer grain (#934)\r\n- Make GrainFactory injectable ()  #988 \r\n\r\nTODO:\r\n1. find real dependency of each class which requires DI, inject the real dependency instead of the whole ServiceProvider\r\n2. look at how ASP.NET handle third party DI container, maybe borrow some of their pattern over. Right now we are using the original method\r\n3.  update external providers to be use DI system, I briefly tried in PersistentStreamProvider this time. \r\n4. if we are going this way, we will change public class, such as Silo.cs, AzureSilo.cs, which introduce backwards compatibility problem. \r\n5. if we are going this direction, a lot of files will need to change, mostly tests and external provider classes and its related classes, especially those manager class which is in charge of instantiating the external provider classes . \r\n\r\nThis PR is not complete, post this to the community as a possible direction we want to go in fixing DI. \r\n","created_at":"2016-08-27T00:10:52Z","updated_at":"2016-08-27T00:55:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9aac42aa1daf3f99c7fd411541de377a707468af","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/orleans/pulls/2099/commits","review_comments_url":"https://api.github.com/repos/dotnet/orleans/pulls/2099/comments","review_comment_url":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/2099/comments","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/a68a6c2f4216aa96a8d693807ab25cbf51ed036b","head":{"label":"xiazen:clean-grain-factory","ref":"clean-grain-factory","sha":"a68a6c2f4216aa96a8d693807ab25cbf51ed036b","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-26T23:55:35Z","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"}},"base":{"label":"dotnet:master","ref":"master","sha":"e74767446693524b10b34c951833056661922bfc","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":28232663,"name":"orleans","full_name":"dotnet/orleans","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/orleans","description":"Orleans - Distributed Virtual Actor Model","fork":false,"url":"https://api.github.com/repos/dotnet/orleans","forks_url":"https://api.github.com/repos/dotnet/orleans/forks","keys_url":"https://api.github.com/repos/dotnet/orleans/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/orleans/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/orleans/teams","hooks_url":"https://api.github.com/repos/dotnet/orleans/hooks","issue_events_url":"https://api.github.com/repos/dotnet/orleans/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/orleans/events","assignees_url":"https://api.github.com/repos/dotnet/orleans/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/orleans/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/orleans/tags","blobs_url":"https://api.github.com/repos/dotnet/orleans/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/orleans/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/orleans/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/orleans/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/orleans/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/orleans/languages","stargazers_url":"https://api.github.com/repos/dotnet/orleans/stargazers","contributors_url":"https://api.github.com/repos/dotnet/orleans/contributors","subscribers_url":"https://api.github.com/repos/dotnet/orleans/subscribers","subscription_url":"https://api.github.com/repos/dotnet/orleans/subscription","commits_url":"https://api.github.com/repos/dotnet/orleans/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/orleans/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/orleans/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/orleans/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/orleans/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/orleans/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/orleans/merges","archive_url":"https://api.github.com/repos/dotnet/orleans/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/orleans/downloads","issues_url":"https://api.github.com/repos/dotnet/orleans/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/orleans/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/orleans/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/orleans/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/orleans/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/orleans/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/orleans/deployments","created_at":"2014-12-19T14:32:50Z","updated_at":"2016-08-26T23:42:45Z","pushed_at":"2016-08-27T00:40:32Z","git_url":"git://github.com/dotnet/orleans.git","ssh_url":"git@github.com:dotnet/orleans.git","clone_url":"https://github.com/dotnet/orleans.git","svn_url":"https://github.com/dotnet/orleans","homepage":"http://dotnet.github.io/orleans","size":48822,"stargazers_count":2188,"watchers_count":2188,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":531,"mirror_url":null,"open_issues_count":255,"forks":531,"open_issues":255,"watchers":2188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2099"},"html":{"href":"https://github.com/dotnet/orleans/pull/2099"},"issue":{"href":"https://api.github.com/repos/dotnet/orleans/issues/2099"},"comments":{"href":"https://api.github.com/repos/dotnet/orleans/issues/2099/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2099/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/orleans/pulls/2099/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/orleans/statuses/a68a6c2f4216aa96a8d693807ab25cbf51ed036b"}}}}
{"actor":{"display_login":"xiazen"}}