Class FeatureFlagConfigurationSetting | Azure SDK for .NET

Publish date: 2024-04-24

Represents a configuration setting that stores a feature flag value. Feature flags allow you to activate or deactivate functionality in your application. A simple feature flag is either on or off. The application always behaves the same way. For example, you could roll out a new feature behind a feature flag. When the feature flag is enabled, all users see the new feature. Disabling the feature flag hides the new feature.

In contrast, a conditional feature flag allows the feature flag to be enabled or disabled dynamically. The application may behave differently, depending on the feature flag criteria. Suppose you want to show your new feature to a small subset of users at first. A conditional feature flag allows you to enable the feature flag for some users while disabling it for others. Feature filters determine the state of the feature flag each time it's evaluated.

NOTE: The Azure.Data.AppConfiguration doesn't evaluate feature flags on retrieval. It's the responsibility of the library consumer to interpret feature flags and determine whether a feature is enabled.

Inheritance

System.Object

FeatureFlagConfigurationSetting

Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Data.AppConfiguration.dll
Syntax
public class FeatureFlagConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting

Constructors

FeatureFlagConfigurationSetting(String, Boolean, String)

Declaration
public FeatureFlagConfigurationSetting (string featureId, bool isEnabled, string label = null);
Parameters
System.String featureId

The identified of the feature flag.

System.Boolean isEnabled

The value indicating whether the feature flag is enabled.

System.String label

A label used to group this configuration setting with others.

Properties

ClientFilters

Filters that must run on the client and be evaluated as true for the feature to be considered enabled.

Declaration
public System.Collections.Generic.IList<Azure.Data.AppConfiguration.FeatureFlagFilter> ClientFilters { get; }
Property Value

Description

Gets or sets a description of the feature.

Declaration
public string Description { get; set; }
Property Value
System.String

DisplayName

Gets or sets a display name for the feature to use for display rather than the ID.

Declaration
public string DisplayName { get; set; }
Property Value
System.String

FeatureId

Gets or sets an ID used to uniquely identify and reference the feature

Declaration
public string FeatureId { get; set; }
Property Value
System.String

IsEnabled

Gets or sets a value indicating whether the features is enabled. A feature is OFF if enabled is false. If enabled is true, then the feature is ON if there are no conditions or if all conditions are satisfied.

Declaration
public bool IsEnabled { get; set; }
Property Value
System.Boolean

KeyPrefix

Declaration
public static string KeyPrefix { get; }
Property Value
System.String

ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnplonJ%2Bpu6bAjnqxrqqVY5GiwMBneKmoc6S7p7XGrqmarJmku3B9jWplaWWSmsGiepFomKmhX3bHtr7EZ3uarJFjjrG8oqiln6GXqr%2BiwMiopWh5qqq%2FpnqjmquaZnGlvYS7zZ%2BgoK2ilsGqu81nfZ6ZpKq%2FppLLmp58p56btqjB0ZqroqeeiLK1wMinnmegpKK5