{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/55918450","id":55918450,"diff_hunk":"@@ -0,0 +1,20 @@\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.Collections.Generic;\n+\n+namespace Microsoft.Extensions.Configuration\n+{\n+    /// <summary>\n+    /// Represents a source of configuration key/values for an application.","path":"src/Microsoft.Extensions.Configuration.Abstractions/IConfigurationSource.cs","position":9,"original_position":9,"commit_id":"d5a98a0b785f1330e7207aea9227c3325daaf756","original_commit_id":"d5a98a0b785f1330e7207aea9227c3325daaf756","user":{"login":"divega","id":1253414,"avatar_url":"https://avatars.githubusercontent.com/u/1253414?v=3","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"body":"Isn't this exactly the description we had on `IConfigurationProvider`? Let's try to come up with a descriptions that are clear and more distinguishable. E.g. this type only represents a source of configuration in the builder. ","created_at":"2016-03-12T08:16:19Z","updated_at":"2016-03-12T08:16:19Z","html_url":"https://github.com/aspnet/Configuration/pull/407#discussion_r55918450","pull_request_url":"https://api.github.com/repos/aspnet/Configuration/pulls/407","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments/55918450"},"html":{"href":"https://github.com/aspnet/Configuration/pull/407#discussion_r55918450"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/407"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Configuration/pulls/407","id":62485521,"html_url":"https://github.com/aspnet/Configuration/pull/407","diff_url":"https://github.com/aspnet/Configuration/pull/407.diff","patch_url":"https://github.com/aspnet/Configuration/pull/407.patch","issue_url":"https://api.github.com/repos/aspnet/Configuration/issues/407","number":407,"state":"open","locked":false,"title":"Initial ConfigurationBuilder API changes","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":"# Overview:\r\n\r\nCovers most of what we had discussed earlier this week.\r\n\r\nLou had an idea to split the configuration of the providers into sources, and build instances later.  This now eliminates the point in time behavior of the builders (FileProviders are only locked when the configurationBuilder is Build()).\r\n\r\nThere's now a base abstract FileConfigurationSource/Provider which makes the implementations of Json/Ini/Xml pretty lean as all the boilerplate has been lifted including the extension goop.  \r\n\r\nI added additional sugar for allowing specification of all the defaults if desired (storing a default instance of the source in the builder bag instead of only the file provider)\r\n\r\n## Usage patterns:\r\n\r\nSimple common usage is unaffected:\r\n```\r\n    new ConfigurationBuilder().AddJson(\"foo.json\").AddXml(\"bar.xml\").Build();\r\n```\r\n\r\nSetting only the base path:\r\n```\r\n    new ConfigurationBuilder()\r\n      .SetFileProvider(@\"C:\\SomeOtherDirectory\")\r\n      .AddJson(\"foo.json\").AddXml(\"bar.xml\").Build();\r\n```\r\n\r\nSetting optional or reload on change:\r\n```\r\n    new ConfigurationBuilder()\r\n      .AddJson(source => {\r\n          source.Path = \"foo.json\";\r\n          source.Optional = true;\r\n       }).AddXml(source => {\r\n          source.Path = \"bar.xml\";\r\n          source.ReloadOnChanged = false;\r\n       }).Build();\r\n```\r\n\r\nSetting a bunch of defaults at once:\r\n```\r\n    new ConfigurationBuilder()\r\n      .ConfigureFileSourceDefaults(defaults => {\r\n          defaults.FileProvider = new PhysicalFileProvider(@\"C:\\SomeOherDirectory\");\r\n          defaults.Optional = true;\r\n          defaults.ReloadOnChanged = true;\r\n       })\r\n      .AddJson(\"foo.json\").AddXml(\"bar.xml\").Build();\r\n```\r\n\r\nFull explosion of setting everything\r\n```\r\n    new ConfigurationBuilder()\r\n      .ConfigureFileSourceDefaults(defaults => {\r\n          defaults.FileProvider = new PhysicalFileProvider(@\"C:\\SomeOherDirectory\");\r\n          defaults.Optional = true;\r\n          defaults.ReloadOnChanged = true;\r\n       })\r\n      .AddJson(source => {\r\n          source.Path = \"foo.json\";\r\n          source.Optional = true;\r\n          source.ReloadOnChanged = false;\r\n       }).AddXml(source => {\r\n          source.Path = \"bar.xml\";\r\n          source.Optional = true;\r\n          source.ReloadOnChanged = false;\r\n       }).Build();\r\n```\r\n\r\nLou also suggested an overload that takes the Path as a string and a configure, I didn't add that one yet because there's potential for fubar if you specify path in both:\r\n```\r\n      .AddJson(\"foo.json\", source => {\r\n          source.Path = \"uhdiff.json\";\r\n          source.Optional = true;\r\n          source.ReloadOnChanged = false;\r\n```\r\n\r\n\r\nI haven't finished wiring up the reload token stuff, I wanted to get the initial PR out for feedback on surface area, existing tests are passing, but there isn't a lot of tests on the new surface area/behavior yet\r\n\r\n @divega @shirhatti @lodejard @davidfowl \r\n\r\n","created_at":"2016-03-11T01:34:43Z","updated_at":"2016-03-12T08:16:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee0ab13583dcb276f51ab047147fbdb90e2bfcdf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Configuration/pulls/407/commits","review_comments_url":"https://api.github.com/repos/aspnet/Configuration/pulls/407/comments","review_comment_url":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Configuration/issues/407/comments","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/d5a98a0b785f1330e7207aea9227c3325daaf756","head":{"label":"aspnet:haok/3-9if","ref":"haok/3-9if","sha":"d5a98a0b785f1330e7207aea9227c3325daaf756","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":16329342,"name":"Configuration","full_name":"aspnet/Configuration","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/Configuration","description":"Interfaces and providers for accessing configuration files.","fork":false,"url":"https://api.github.com/repos/aspnet/Configuration","forks_url":"https://api.github.com/repos/aspnet/Configuration/forks","keys_url":"https://api.github.com/repos/aspnet/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Configuration/teams","hooks_url":"https://api.github.com/repos/aspnet/Configuration/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Configuration/events","assignees_url":"https://api.github.com/repos/aspnet/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Configuration/tags","blobs_url":"https://api.github.com/repos/aspnet/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Configuration/languages","stargazers_url":"https://api.github.com/repos/aspnet/Configuration/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Configuration/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Configuration/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Configuration/subscription","commits_url":"https://api.github.com/repos/aspnet/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Configuration/merges","archive_url":"https://api.github.com/repos/aspnet/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Configuration/downloads","issues_url":"https://api.github.com/repos/aspnet/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Configuration/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Configuration/deployments","created_at":"2014-01-28T23:11:33Z","updated_at":"2016-03-11T17:44:24Z","pushed_at":"2016-03-11T20:54:40Z","git_url":"git://github.com/aspnet/Configuration.git","ssh_url":"git@github.com:aspnet/Configuration.git","clone_url":"https://github.com/aspnet/Configuration.git","svn_url":"https://github.com/aspnet/Configuration","homepage":"","size":1758,"stargazers_count":129,"watchers_count":129,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":49,"forks":70,"open_issues":49,"watchers":129,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"7e63c0b9a6eebe845004dd54524ae940950b9e5b","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":16329342,"name":"Configuration","full_name":"aspnet/Configuration","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/Configuration","description":"Interfaces and providers for accessing configuration files.","fork":false,"url":"https://api.github.com/repos/aspnet/Configuration","forks_url":"https://api.github.com/repos/aspnet/Configuration/forks","keys_url":"https://api.github.com/repos/aspnet/Configuration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Configuration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Configuration/teams","hooks_url":"https://api.github.com/repos/aspnet/Configuration/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Configuration/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Configuration/events","assignees_url":"https://api.github.com/repos/aspnet/Configuration/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Configuration/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Configuration/tags","blobs_url":"https://api.github.com/repos/aspnet/Configuration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Configuration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Configuration/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Configuration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Configuration/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Configuration/languages","stargazers_url":"https://api.github.com/repos/aspnet/Configuration/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Configuration/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Configuration/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Configuration/subscription","commits_url":"https://api.github.com/repos/aspnet/Configuration/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Configuration/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Configuration/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Configuration/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Configuration/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Configuration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Configuration/merges","archive_url":"https://api.github.com/repos/aspnet/Configuration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Configuration/downloads","issues_url":"https://api.github.com/repos/aspnet/Configuration/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Configuration/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Configuration/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Configuration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Configuration/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Configuration/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Configuration/deployments","created_at":"2014-01-28T23:11:33Z","updated_at":"2016-03-11T17:44:24Z","pushed_at":"2016-03-11T20:54:40Z","git_url":"git://github.com/aspnet/Configuration.git","ssh_url":"git@github.com:aspnet/Configuration.git","clone_url":"https://github.com/aspnet/Configuration.git","svn_url":"https://github.com/aspnet/Configuration","homepage":"","size":1758,"stargazers_count":129,"watchers_count":129,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":49,"forks":70,"open_issues":49,"watchers":129,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/407"},"html":{"href":"https://github.com/aspnet/Configuration/pull/407"},"issue":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/407"},"comments":{"href":"https://api.github.com/repos/aspnet/Configuration/issues/407/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/407/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Configuration/pulls/407/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Configuration/statuses/d5a98a0b785f1330e7207aea9227c3325daaf756"}}}}