-
Notifications
You must be signed in to change notification settings - Fork 120
Adds Requirement Type All and Any to FeatureFlags #221
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
Conversation
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
23b7098
to
13ec4ea
Compare
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
… evaluate a true filter, more comments
I addressed the comments, but I also re-wrote my changes to the FeatureManager to have less edge-cases. Both Any and And now have the same default: false I also combined some of the inner logic so the Contextual and non-Contextual filters have less duplicated code. |
…, pulled the RequirementType.All and IgnoreMissingFeatureFilters restriction further up so it happens anytime the feature is evaluated.
392bfbe
to
2511c26
Compare
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
…me checks to be more readable
f407d54
to
850b1eb
Compare
src/Microsoft.FeatureManagement/ConfigurationFeatureDefinitionProvider.cs
Outdated
Show resolved
Hide resolved
7fb0abd
to
51377dc
Compare
In response to issue #28.
And as a rewrite of PR #192.
Add Requirement Type All and Any to FeatureFlags
Filters on Feature Flags have always used "Any" logic. Our execution goes through each filter and when a single one returns "true", we end execution and return true. This PR adds "All" logic. For "All", the execution instead goes through each filter and when a single one returns "false", we end execution, returning false. Otherwise we return true.
In short- this PR:
Example
Evaluation