Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

IConfigurationSource change causes Providers Load() to be called twice ... by design? #444

Closed
dtillman opened this issue May 25, 2016 · 3 comments
Assignees
Milestone

Comments

@dtillman
Copy link

It looks to me that providers Load() method is being called twice now (RC2 bits). Once when the Build() method is called on ConfigurationBuilder and then again when ConfigurationRoot is constructed. Is this intended?

@HaoK
Copy link
Member

HaoK commented May 25, 2016

Nope, we should pick one of these Load calls only. @divega have a preference which class owns calling Load?

@HaoK HaoK self-assigned this May 25, 2016
@HaoK HaoK added this to the 1.0.0 milestone May 25, 2016
@divega
Copy link

divega commented May 25, 2016

@dtillman good catch!

@HaoK it seems that ConfigurationRoot already has logic to load providers because of Reload(), and it seems cleaner to constrain the responsibility of the builder to just build the list of providers and pass it to the root, so I would vote for removing the call to Load() in the builder.

@HaoK
Copy link
Member

HaoK commented May 26, 2016

9a8825a

@HaoK HaoK closed this as completed May 26, 2016
@HaoK HaoK added 3 - Done and removed 2 - Working labels May 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants