Skip to content

Interface IFeatureToggle

Namespace: Cephalon.Abstractions.Features
Assembly: Cephalon.Abstractions.dll

Evaluates runtime feature flags against an optional evaluation context.

public interface IFeatureToggle

Evaluate(string, FeatureFlagEvaluationContext?)

Section titled “ Evaluate(string, FeatureFlagEvaluationContext?)”

Evaluates the requested feature flag and returns a richer operator-facing result.

FeatureFlagEvaluationResult Evaluate(string featureFlagId, FeatureFlagEvaluationContext? context = null)

featureFlagId string

The stable feature-flag identifier to evaluate.

context FeatureFlagEvaluationContext?

The optional runtime context used for targeting evaluation.

FeatureFlagEvaluationResult

The full evaluation result.

IsEnabled(string, FeatureFlagEvaluationContext?)

Section titled “ IsEnabled(string, FeatureFlagEvaluationContext?)”

Evaluates whether the requested feature flag is enabled for the supplied context.

bool IsEnabled(string featureFlagId, FeatureFlagEvaluationContext? context = null)

featureFlagId string

The stable feature-flag identifier to evaluate.

context FeatureFlagEvaluationContext?

The optional runtime context used for targeting evaluation.

bool

true when the feature flag resolves to enabled; otherwise false.