{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Options/pulls/comments/44611385","id":44611385,"diff_hunk":"@@ -0,0 +1,13 @@\n+// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+\n+namespace Microsoft.Extensions.OptionsModel\n+{\n+    public interface IOptionsWatcher<out TOptions>","path":"src/Microsoft.Extensions.OptionsModel/IOptionsWatcher.cs","position":8,"original_position":8,"commit_id":"fac858af6ad8ef3cee0d3bf1d0751960035ea5fc","original_commit_id":"fac858af6ad8ef3cee0d3bf1d0751960035ea5fc","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"body":"3 name votes left, Ryan abstains :)","created_at":"2015-11-12T01:23:29Z","updated_at":"2015-11-12T01:23:29Z","html_url":"https://github.com/aspnet/Options/pull/99#discussion_r44611385","pull_request_url":"https://api.github.com/repos/aspnet/Options/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Options/pulls/comments/44611385"},"html":{"href":"https://github.com/aspnet/Options/pull/99#discussion_r44611385"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Options/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Options/pulls/99","id":50332817,"html_url":"https://github.com/aspnet/Options/pull/99","diff_url":"https://github.com/aspnet/Options/pull/99.diff","patch_url":"https://github.com/aspnet/Options/pull/99.patch","issue_url":"https://api.github.com/repos/aspnet/Options/issues/99","number":99,"state":"open","locked":false,"title":"[Prototype] Add support for reloadable options","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"body":"First iteration of reloadable options aka IOptionsWatcher see: \r\nhttps://github.com/aspnet/specs/blob/master/notes/reloadable_options.md\r\n\r\n- Split Configuration specific functionality into new assembly: Options.ConfigurationExtensions\r\n- IOptionsWatcher is the service that lets you `Watch(Action<TOptions> callback)`\r\n- IOptionsChangeTracker is the service fires the watcher (i.e. the ConfigChangeTracker): \r\n\r\nUsage example:\r\n```\r\n        public class Controller : IDisposable\r\n        {\r\n            IDisposable _watcher;\r\n            FakeOptions _options;\r\n\r\n            public Controller(IOptionsWatcher<FakeOptions> watcher)\r\n            {\r\n                _watcher = watcher.Watch(o => _options = o);\r\n            }\r\n\r\n            public void Dispose()\r\n            {\r\n                _watcher?.Dispose();\r\n            }\r\n\r\n            public string Message => _options?.Message;\r\n        }\r\n\r\n            // Startup glue to listen to configuration changes to trigger reload\r\n            services.AddOptions().TrackChanges<FakeOptions>(config);\r\n\r\n```\r\n\r\ncc @divega @rynowak @lodejard ","created_at":"2015-11-11T00:32:43Z","updated_at":"2015-11-12T01:23:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6b170aa5c82649e234e4b83180284972ca63edb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Options/pulls/99/commits","review_comments_url":"https://api.github.com/repos/aspnet/Options/pulls/99/comments","review_comment_url":"https://api.github.com/repos/aspnet/Options/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Options/issues/99/comments","statuses_url":"https://api.github.com/repos/aspnet/Options/statuses/fac858af6ad8ef3cee0d3bf1d0751960035ea5fc","head":{"label":"aspnet:haok/11-10change","ref":"haok/11-10change","sha":"fac858af6ad8ef3cee0d3bf1d0751960035ea5fc","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":20275431,"name":"Options","full_name":"aspnet/Options","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/Options","description":"A framework for accessing and configuring POCO settings.","fork":false,"url":"https://api.github.com/repos/aspnet/Options","forks_url":"https://api.github.com/repos/aspnet/Options/forks","keys_url":"https://api.github.com/repos/aspnet/Options/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Options/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Options/teams","hooks_url":"https://api.github.com/repos/aspnet/Options/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Options/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Options/events","assignees_url":"https://api.github.com/repos/aspnet/Options/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Options/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Options/tags","blobs_url":"https://api.github.com/repos/aspnet/Options/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Options/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Options/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Options/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Options/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Options/languages","stargazers_url":"https://api.github.com/repos/aspnet/Options/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Options/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Options/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Options/subscription","commits_url":"https://api.github.com/repos/aspnet/Options/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Options/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Options/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Options/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Options/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Options/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Options/merges","archive_url":"https://api.github.com/repos/aspnet/Options/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Options/downloads","issues_url":"https://api.github.com/repos/aspnet/Options/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Options/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Options/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Options/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Options/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Options/releases{/id}","created_at":"2014-05-28T23:13:36Z","updated_at":"2015-09-26T16:12:23Z","pushed_at":"2015-11-11T00:36:46Z","git_url":"git://github.com/aspnet/Options.git","ssh_url":"git@github.com:aspnet/Options.git","clone_url":"https://github.com/aspnet/Options.git","svn_url":"https://github.com/aspnet/Options","homepage":"","size":1361,"stargazers_count":46,"watchers_count":46,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":10,"forks":16,"open_issues":10,"watchers":46,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"fe303472d135a2e1c0d4d38e0f463291e904dd32","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":20275431,"name":"Options","full_name":"aspnet/Options","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/Options","description":"A framework for accessing and configuring POCO settings.","fork":false,"url":"https://api.github.com/repos/aspnet/Options","forks_url":"https://api.github.com/repos/aspnet/Options/forks","keys_url":"https://api.github.com/repos/aspnet/Options/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Options/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Options/teams","hooks_url":"https://api.github.com/repos/aspnet/Options/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Options/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Options/events","assignees_url":"https://api.github.com/repos/aspnet/Options/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Options/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Options/tags","blobs_url":"https://api.github.com/repos/aspnet/Options/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Options/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Options/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Options/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Options/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Options/languages","stargazers_url":"https://api.github.com/repos/aspnet/Options/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Options/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Options/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Options/subscription","commits_url":"https://api.github.com/repos/aspnet/Options/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Options/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Options/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Options/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Options/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Options/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Options/merges","archive_url":"https://api.github.com/repos/aspnet/Options/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Options/downloads","issues_url":"https://api.github.com/repos/aspnet/Options/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Options/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Options/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Options/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Options/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Options/releases{/id}","created_at":"2014-05-28T23:13:36Z","updated_at":"2015-09-26T16:12:23Z","pushed_at":"2015-11-11T00:36:46Z","git_url":"git://github.com/aspnet/Options.git","ssh_url":"git@github.com:aspnet/Options.git","clone_url":"https://github.com/aspnet/Options.git","svn_url":"https://github.com/aspnet/Options","homepage":"","size":1361,"stargazers_count":46,"watchers_count":46,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":10,"forks":16,"open_issues":10,"watchers":46,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Options/pulls/99"},"html":{"href":"https://github.com/aspnet/Options/pull/99"},"issue":{"href":"https://api.github.com/repos/aspnet/Options/issues/99"},"comments":{"href":"https://api.github.com/repos/aspnet/Options/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Options/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Options/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Options/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Options/statuses/fac858af6ad8ef3cee0d3bf1d0751960035ea5fc"}}}}