aloneguid / config

⚙ Config.Net - the easiest configuration framework for .NET developers. No BS.
MIT License
641 stars 85 forks source link

Introduce IConfigSourceProviders #67

Closed maelgrove closed 1 year ago

maelgrove commented 5 years ago

Currently, the implementation checks whether it can write to a IConfigStore (via CanWrite) or can read from it (via CanRead). This sort of 'meta-information' could be provided by a new service type called IConfigStoreProvider, which would be registered within the ConfigurationBuilder instead of the actual source. This change would not only provide some additional separation of concerns, but also open new opportunities: For instance, there could be a method on the IConfigStoreProvider called GetConfigStore which would have the composed result boxes as a parameter, allowing e.g. file-sources to create the configuration file with the correct schema.

aloneguid commented 5 years ago

I'm not quite following this, can you elaborate please?