Microsoft.FeatureManagement provides standardized APIs for enabling feature flags within applications. Utilize this library to secure a consistent experience when developing applications that use patterns such as beta access, rollout, dark deployments, and more.
MIT License
1.02k
stars
111
forks
source link
Bug Fix - Avoid duplicated registration of TimeWindowFilter through AddFeatureFilter method #449
The call of AddFeatureFilter on the IFeatureManagementBuilder returned by the AddFeatureManagement call will no longer register TimeWindowFilter repeatedly.
This PR added a check in the AddFeatureFilter<T>() method of the FeatureManagementBuilder class, if the T is TimeWindowFilter, the method will do nothing.
All built-in feature filters are registered during the AddFeatureManagement call, the TimeWindowFilter is registered through the overload `AddFeatureFilter(Func implemenetationFactory)
The FeatureManagementBuilder is internal and only be created in the AddFeatureManagment call, this ensures that AddFeatureFilter()` will only be called after calling AddFeatureManagement() where the TimeWindowFilter should have been registered.
Why this PR?
Bug fix #447
Visible change
The call of
AddFeatureFilter
on theIFeatureManagementBuilder
returned by theAddFeatureManagement
call will no longer registerTimeWindowFilter
repeatedly.This PR added a check in the
AddFeatureFilter<T>()
method of theFeatureManagementBuilder
class, if theT
isTimeWindowFilter
, the method will do nothing.All built-in feature filters are registered during the(Func implemenetationFactory)
AddFeatureManagement
call, theTimeWindowFilter
is registered through the overload `AddFeatureFilterThe()` will only be called after calling AddFeatureManagement() where the TimeWindowFilter should have been registered.
FeatureManagementBuilder
is internal and only be created in theAddFeatureManagment
call, this ensures that AddFeatureFilter