2.0.0
Microsoft.FeatureManagement Updates
The packages associated with this release are
Stable Release
This release is the first stable release of the Microsoft.FeatureManagement libraries.
Features
Enumerating Feature Names
The IFeatureManager
interface now exposes a way to enumerate all feature names that are registered in the system. This enables work flows where the states of all known features need to be evaluated.
IFeatureManager fm;
await foreach (string featureName in fm.GetFeatureNamesAsync())
{
await IsEnabledAsync(featureName);
}
Important: Using the await foreach
syntax requires using version 8.0 or above of C#.
Missing Feature Filters
When the feature manager tries to evaluate the state of a feature that depends on a missing feature filter it will now throw a FeatureManagementException
with the error MissingFeatureFilter
.
The new fail-fast behavior can be disabled via feature management options if the old behavior to ignore missing feature filters is desired.
services.Configure<FeatureManagementOptions>(options =>
{
options.IgnoreMissingFeatureFilters = true;
});
Breaking Changes
- FeatureManager now throws a
FeatureManagementException
with errorAmbiguousFeatureFilter
, instead ofInvalidOperationException
, if a feature makes an ambiguous reference to two or more feature filters. Task<bool> ISessionManager.TryGetAsync(string featureName, out bool enabled)
has been changed toTask<bool?> ISessionManager.GetAsync(string featureName)
to enable async implementations.