Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IConfiguration API changes and added interfaces #55

Open
kirthik opened this issue Aug 16, 2015 · 1 comment
Open

IConfiguration API changes and added interfaces #55

kirthik opened this issue Aug 16, 2015 · 1 comment

Comments

@kirthik
Copy link

@kirthik kirthik commented Aug 16, 2015

The APIs in IConfiguration have changed.

public interface IConfiguration 
{
    string this[string key] { get; set; }
    IConfigurationSection GetSection(string key);
    IEnumerable<IConfigurationSection> GetChildren();
}

There are two specializations of this interface now - IConfigurationRoot and IConfigurationSection.

IConfigurationRoot is used only for the root node and is returned by the ConfigurationBuilder. It has the ability to trigger the reload of the configuration from the configuration sources:

public interface IConfigurationRoot: IConfiguration 
{
    void Reload();
}

Note that the GetSection() and GetChildren() methods now return a new IConfigurationSection interface that represent child configuration "sections". This is the definition of the interface:

public interface IConfigurationSection: IConfiguration 
{
    string Key { get; }
    string Value { get; set; }
}

See aspnet/Configuration#277 for discussion

@kirthik kirthik added this to the 1.0.0-beta7 milestone Aug 16, 2015
@aspnet aspnet locked and limited conversation to collaborators Aug 16, 2015
@kirthik

This comment has been minimized.

Copy link
Author

@kirthik kirthik commented Aug 16, 2015

This post is only for announcing the breaking change. Please post any feedback to corresponding discussion issue aspnet/Configuration#277

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant
You can’t perform that action at this time.