Skip to content
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

Refactoring: Use ConfigurationMonitor<TSection> singletons to access all configuration sections. #20

Open
jmderuty opened this issue Sep 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jmderuty
Copy link
Member

Always using ConfigurationMonitor<TSection> to track config sections enables:

  • Discovery of configuration classes and section keys.
  • Improved performance of configuration retrieval and updating

to use the new pattern:

  1. make the configuration section class inherit from IConfigurationSection<T> (for instance class ConfigSection : IConfigurationSection
  2. register ConfigurationMonitor in the resolver as a single instance.
  3. resolve ConfigSection instead of IConfiguration in the classes which need access to the config section.
@jmderuty jmderuty added the enhancement New feature or request label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant