Skip to content

Custom FeatureDefinitionProvider still depends on IConfiguration #93

@pardahlman

Description

@pardahlman

I've been look at the latest pre-release of this package (2.2.0-preview) - it is a great improvement in terms of migration from other feature management system 👍

However, when implementing a custom IFeatureDefinitionProvider I noticed that FeatureFilterConfiguration still expects its data to be modeled as IConfiguration. There are a few reasons why I think this is problematic:

  • Non-transparent API. It is not transparent what settings are mandatory or even expected, IConfiguration is very broad.
  • Cumbersome API. In my case, I have loaded feature toggle data that I want to map to percentage filter, groups etc. The best way I have found is to look at the source code for the filter classes and mimic the expected configuration in an in-memory configuration collection.
  • Surprising API. Configuration is a concept that is tied to application startup. Whenever code is reliant on configuration, the first step is usually to map it the configuration to a strongly typed class and let downstream classes rely on it.

It would be great if the API for implementing a custom data source/adapter for the feature management system would be strongly typed and not reliant on IConfiguration.

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