Skip to content

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

@jmderuty

Description

@jmderuty

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<ConfigSection>
  2. register ConfigurationMonitor<ConfigSection> in the resolver as a single instance.
  3. resolve ConfigurationMonitor<ConfigSection> instead of IConfiguration in the classes which need access to the config section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions