I made a custom configuration provider for my ASP.NET Web App, where I inherit from Microsoft.Extensions.Configuration.ConfigurationProvider, and override the Load() method and init the prop IDictionary<string, string> Data with a new Dictionary<string, string>().
So I have a appsettings.json config file, containing
{
"Token" : "Token 1"
}
And in my custom provider, I override Token with "Token 2"
I had a bug in my code, where I called configuration["token"] (lowercase), and I noticed the value from the appsettings was loaded, but not the one from my custom provider.
So it seems that the appsettings configuration is case-insensitive, but my custom provider
isn't.
So is it supposed to be ? I just created a new Dictionary, I'm not sure if it's possible to make it case-insensitive without writing a lot more code.