Mr. Dink
Mr. Dink
CC#
Created by Mr. Dink on 9/25/2024 in #help
✅ Access a runtime Dictionary easier
My company is switching from ConfigurationManager with transforms over to a 3rd party secrets manager. The secrets manager returns a Dictionary<string, object> on start up. I'm needing to go through and replace all ConfigurationManager calls throughout the project and I was wondering if there's an easier way to access these values rather than magic strings. My first thought is a static class where I define all the property shortcuts and keys. Then verify all keys are present on project load when we get the secrets. Am I barking up the wrong tree and there's an established way?
42 replies