{"action":"opened","number":261,"pull_request":{"url":"https://api.github.com/repos/aspnet/Hosting/pulls/261","id":34999623,"html_url":"https://github.com/aspnet/Hosting/pull/261","diff_url":"https://github.com/aspnet/Hosting/pull/261.diff","patch_url":"https://github.com/aspnet/Hosting/pull/261.patch","issue_url":"https://api.github.com/repos/aspnet/Hosting/issues/261","number":261,"state":"open","locked":false,"title":"Add an ApplicationStarted event","user":{"login":"Tragetaschen","id":1947968,"avatar_url":"https://avatars.githubusercontent.com/u/1947968?v=3","gravatar_id":"","url":"https://api.github.com/users/Tragetaschen","html_url":"https://github.com/Tragetaschen","followers_url":"https://api.github.com/users/Tragetaschen/followers","following_url":"https://api.github.com/users/Tragetaschen/following{/other_user}","gists_url":"https://api.github.com/users/Tragetaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/Tragetaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tragetaschen/subscriptions","organizations_url":"https://api.github.com/users/Tragetaschen/orgs","repos_url":"https://api.github.com/users/Tragetaschen/repos","events_url":"https://api.github.com/users/Tragetaschen/events{/privacy}","received_events_url":"https://api.github.com/users/Tragetaschen/received_events","type":"User","site_admin":false},"body":"The discussion in #253 and my own experience show, that it would be great to have a notification once everything is up and running.\r\n\r\nThe canonical use case is the `Console.WriteLine(\"Started\")` for console users. My own requirement is a notification for systemd that the process has completely finished starting up and that it's safe to start the web browser on my embedded device using [libsystemd](http://www.freedesktop.org/software/systemd/man/sd_notify.html):\r\n\r\n```C#\r\npublic static class SystemdStartupNotifier\r\n{\r\n    public static void NotifySystemd(this IApplicationLifetime applicationLifetime)\r\n    {\r\n        applicationLifetime.ApplicationStarted += handler;\r\n    }\r\n\r\n    private static void handler(object sender, EventArgs e)\r\n    {\r\n        sd_notify(0, \"READY=1\");\r\n    }\r\n\r\n    [DllImport(\"libsystemd.so.0\")]\r\n    private static extern int sd_notify(int unset_environment, string state);\r\n}\r\n```","created_at":"2015-05-08T11:07:36Z","updated_at":"2015-05-08T11:07:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Hosting/pulls/261/commits","review_comments_url":"https://api.github.com/repos/aspnet/Hosting/pulls/261/comments","review_comment_url":"https://api.github.com/repos/aspnet/Hosting/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Hosting/issues/261/comments","statuses_url":"https://api.github.com/repos/aspnet/Hosting/statuses/39789e4c656f765f059fecbeed28f96a588d3495","head":{"label":"Tragetaschen:started-event","ref":"started-event","sha":"39789e4c656f765f059fecbeed28f96a588d3495","user":{"login":"Tragetaschen","id":1947968,"avatar_url":"https://avatars.githubusercontent.com/u/1947968?v=3","gravatar_id":"","url":"https://api.github.com/users/Tragetaschen","html_url":"https://github.com/Tragetaschen","followers_url":"https://api.github.com/users/Tragetaschen/followers","following_url":"https://api.github.com/users/Tragetaschen/following{/other_user}","gists_url":"https://api.github.com/users/Tragetaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/Tragetaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tragetaschen/subscriptions","organizations_url":"https://api.github.com/users/Tragetaschen/orgs","repos_url":"https://api.github.com/users/Tragetaschen/repos","events_url":"https://api.github.com/users/Tragetaschen/events{/privacy}","received_events_url":"https://api.github.com/users/Tragetaschen/received_events","type":"User","site_admin":false},"repo":{"id":27762750,"name":"Hosting","full_name":"Tragetaschen/Hosting","owner":{"login":"Tragetaschen","id":1947968,"avatar_url":"https://avatars.githubusercontent.com/u/1947968?v=3","gravatar_id":"","url":"https://api.github.com/users/Tragetaschen","html_url":"https://github.com/Tragetaschen","followers_url":"https://api.github.com/users/Tragetaschen/followers","following_url":"https://api.github.com/users/Tragetaschen/following{/other_user}","gists_url":"https://api.github.com/users/Tragetaschen/gists{/gist_id}","starred_url":"https://api.github.com/users/Tragetaschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tragetaschen/subscriptions","organizations_url":"https://api.github.com/users/Tragetaschen/orgs","repos_url":"https://api.github.com/users/Tragetaschen/repos","events_url":"https://api.github.com/users/Tragetaschen/events{/privacy}","received_events_url":"https://api.github.com/users/Tragetaschen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tragetaschen/Hosting","description":"Code for hosting and starting up an ASP.NET application.","fork":true,"url":"https://api.github.com/repos/Tragetaschen/Hosting","forks_url":"https://api.github.com/repos/Tragetaschen/Hosting/forks","keys_url":"https://api.github.com/repos/Tragetaschen/Hosting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tragetaschen/Hosting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tragetaschen/Hosting/teams","hooks_url":"https://api.github.com/repos/Tragetaschen/Hosting/hooks","issue_events_url":"https://api.github.com/repos/Tragetaschen/Hosting/issues/events{/number}","events_url":"https://api.github.com/repos/Tragetaschen/Hosting/events","assignees_url":"https://api.github.com/repos/Tragetaschen/Hosting/assignees{/user}","branches_url":"https://api.github.com/repos/Tragetaschen/Hosting/branches{/branch}","tags_url":"https://api.github.com/repos/Tragetaschen/Hosting/tags","blobs_url":"https://api.github.com/repos/Tragetaschen/Hosting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tragetaschen/Hosting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tragetaschen/Hosting/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tragetaschen/Hosting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tragetaschen/Hosting/statuses/{sha}","languages_url":"https://api.github.com/repos/Tragetaschen/Hosting/languages","stargazers_url":"https://api.github.com/repos/Tragetaschen/Hosting/stargazers","contributors_url":"https://api.github.com/repos/Tragetaschen/Hosting/contributors","subscribers_url":"https://api.github.com/repos/Tragetaschen/Hosting/subscribers","subscription_url":"https://api.github.com/repos/Tragetaschen/Hosting/subscription","commits_url":"https://api.github.com/repos/Tragetaschen/Hosting/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tragetaschen/Hosting/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tragetaschen/Hosting/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tragetaschen/Hosting/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tragetaschen/Hosting/contents/{+path}","compare_url":"https://api.github.com/repos/Tragetaschen/Hosting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tragetaschen/Hosting/merges","archive_url":"https://api.github.com/repos/Tragetaschen/Hosting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tragetaschen/Hosting/downloads","issues_url":"https://api.github.com/repos/Tragetaschen/Hosting/issues{/number}","pulls_url":"https://api.github.com/repos/Tragetaschen/Hosting/pulls{/number}","milestones_url":"https://api.github.com/repos/Tragetaschen/Hosting/milestones{/number}","notifications_url":"https://api.github.com/repos/Tragetaschen/Hosting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tragetaschen/Hosting/labels{/name}","releases_url":"https://api.github.com/repos/Tragetaschen/Hosting/releases{/id}","created_at":"2014-12-09T11:05:03Z","updated_at":"2015-05-01T15:23:55Z","pushed_at":"2015-05-08T10:54:46Z","git_url":"git://github.com/Tragetaschen/Hosting.git","ssh_url":"git@github.com:Tragetaschen/Hosting.git","clone_url":"https://github.com/Tragetaschen/Hosting.git","svn_url":"https://github.com/Tragetaschen/Hosting","homepage":"","size":811,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"ad93dd74b63316945bd55e4731c9e7ad6cc932c7","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":16630141,"name":"Hosting","full_name":"aspnet/Hosting","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Hosting","description":"Code for hosting and starting up an ASP.NET application.","fork":false,"url":"https://api.github.com/repos/aspnet/Hosting","forks_url":"https://api.github.com/repos/aspnet/Hosting/forks","keys_url":"https://api.github.com/repos/aspnet/Hosting/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Hosting/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Hosting/teams","hooks_url":"https://api.github.com/repos/aspnet/Hosting/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Hosting/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Hosting/events","assignees_url":"https://api.github.com/repos/aspnet/Hosting/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Hosting/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Hosting/tags","blobs_url":"https://api.github.com/repos/aspnet/Hosting/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Hosting/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Hosting/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Hosting/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Hosting/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Hosting/languages","stargazers_url":"https://api.github.com/repos/aspnet/Hosting/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Hosting/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Hosting/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Hosting/subscription","commits_url":"https://api.github.com/repos/aspnet/Hosting/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Hosting/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Hosting/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Hosting/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Hosting/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Hosting/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Hosting/merges","archive_url":"https://api.github.com/repos/aspnet/Hosting/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Hosting/downloads","issues_url":"https://api.github.com/repos/aspnet/Hosting/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Hosting/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Hosting/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Hosting/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Hosting/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Hosting/releases{/id}","created_at":"2014-02-07T22:58:12Z","updated_at":"2015-05-08T01:07:45Z","pushed_at":"2015-05-08T10:46:11Z","git_url":"git://github.com/aspnet/Hosting.git","ssh_url":"git@github.com:aspnet/Hosting.git","clone_url":"https://github.com/aspnet/Hosting.git","svn_url":"https://github.com/aspnet/Hosting","homepage":"","size":4716,"stargazers_count":109,"watchers_count":109,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":34,"forks":50,"open_issues":34,"watchers":109,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/261"},"html":{"href":"https://github.com/aspnet/Hosting/pull/261"},"issue":{"href":"https://api.github.com/repos/aspnet/Hosting/issues/261"},"comments":{"href":"https://api.github.com/repos/aspnet/Hosting/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Hosting/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Hosting/statuses/39789e4c656f765f059fecbeed28f96a588d3495"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":25,"deletions":2,"changed_files":3}}