github microsoft/FeatureManagement-Dotnet 2.0.0

latest releases: 2.6.0, 2.6.0-preview2, 2.6.0-preview...
4 years ago

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 error AmbiguousFeatureFilter, instead of InvalidOperationException, 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 to Task<bool?> ISessionManager.GetAsync(string featureName) to enable async implementations.

Don't miss a new FeatureManagement-Dotnet release

NewReleases is sending notifications on new releases.