-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ability to load configurations from IConfigurationSection/IConfigurationRoot #397
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Microsoft.Extensions.Configuration.IConfigurationSection
- added validators for some fields - used default value from constant instead of literal - fixed type of collection
- added contants with default values - fixed typo in default constant
for json and for xml formats
- This allow extensions to be configured not only after domain is built but, if needed, during Upgrade process. Localization extension needs it. - This source is alternative to XxxConfiguration.Load() call which is outdated. - It also allow users to instanciate configurations and actually use them instead of forcefully configure them in config files. This gives a way to not rely on our Load methods or any other new "fancy" configuration APIs Microsoft "invents" (which sometimes broken for certain types of configuration sources :-)). Instance of configuration can be put to well-known collection instead of finding a work-around by looking at source code to figure out how to get configuration and where to put the instance of it to make extension work. - For user convenience a set of extensions for DomainConfiguration provided to configure extensions from different resources, including configuration instance
+ updated version value in Prerequisites
- summaries for files, types, type members - small code improvements
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds Load overloads to configuration classes of main project and some extensions.
Introduces a collection of configurations of extensions -
DomainConfiguration.ExtensionConfigurations
. Before that, extensions relied on defaultLoad()
methods which is not relevant today because App/Web.config files are outdated yet presented, now reading such configs is not easy and sometimes require a workaround. Also, there was no way to just create a configuration instance for some extension and use it to set up the settings. We allow it for main configuration but not for extensions. Being able to use configuration instances and "attach" them to domain configuration is a future-proof solution which can overcome further changes of .NET Configuration Files APIs.Extensions' configurations are based on
ConfigurationBase
abstract type and can be locked. If any extension is developed outside ours and has some configuration then it can be based on oursConfigurationBase
and be placed to this unified collection and be expected there when it is needed.Additionally, extension methods for
DomainConfiguration
added - ConfigureXxxExtension(), many variants available. They Load configuration from different APIs or just receive instance and put it to the collection of additional configurations, sometimes even register types of the extension to domain if it needed.