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

Move ConfigurationBinder to Configuration #205

Closed
wants to merge 3 commits into from
Closed

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented May 18, 2015

Per @divega discussions with core configuration/options moving to BCL, the ConfigurationBinder was going to move to asp.net specific configuration. While only the DI specific options helpers will remain in Options repo, which will still depend on Configuration for the configure services sugar that uses the binder: services.Configure<MyOptions>(config)

The binder could live in ConfigurationModel.Abstractions if we were willing to make depend on reflection and add the error resources...

cc @victorhurdugaci I renamed TOptions => TModel since this is really a generic POCO binder anyways, there's nothing specific to options about the binder anyways...

@victorhurdugaci
Copy link
Contributor

Looks good :shipit:

@HaoK
Copy link
Member Author

HaoK commented May 19, 2015

7d0ccde

@IRooc
Copy link

IRooc commented Jun 20, 2015

In a mvc application startup what path should we specify on the ConfigurationBuilder?
var configuration = new ConfigurationBuilder(env.WebRootPath)

the above is the wwwroot path which seems wrong for config files? Leaving it empty currently also does not work for files in the same folder as project.json. Any suggestion?

@davidfowl
Copy link
Member

It's wrong for config files, you want IApplicationEnvironment.ApplicationBasePath

@natemcmaster natemcmaster deleted the haok/5-17binder branch November 6, 2018 22:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants