-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to register a custom IFeatureProvider #22
Comments
Additionally, the implementation of method UseCachedSqlFeatureProvider violates the DI principles, by instanciating the provider directly, and making it complicated to a have real modular architecture. I would have expected to register an additionaly provider via |
The
I was thinking that the extension methods would be used instead, but Is there a use case where the |
Honestly, I'd say it's more a matter of philosophy: if you adopt DI, it would be better to leverage it fully. Additionally, the provider pattern nicely suits DI, as you can even register multiple implementations and then pick one without changing your design. |
Added a |
@kendaleiv Thanks for this fix. IMHO, it would likely be easier not to require an For instance, in the current implementation, how can I pass a registered service in my custom provider instance? |
Looks like
FeatureFlagOptions.Provider
is read only outside of this libThe text was updated successfully, but these errors were encountered: