aspnet / MicrosoftConfigurationBuilders

Microsoft.Configuration.Builders
MIT License
118 stars 61 forks source link

Add ExpandWrapper sample. #206

Closed StephenMolloy closed 1 year ago

StephenMolloy commented 1 year ago

When mulling over removing the old 'Expand' mode my thoughts were that it wouldn't be that hard to bring it back in your own custom config builder. It's just a simple string replace in the ProcessRawXml override.

There are still good reasons in non-simple scenarios to avoid doing things in both ProcessRawXml and ProcessConfigurationSection, so Expand mode is still out of favor. But I can see some niche cases where it would be nice to have it back. For those cases, give this just-a-concept-not-fully-supported-sample ExpandWrapper a try.