Class FeatureFlagSettings
Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll
Describes one configuration-driven feature flag.
public sealed class FeatureFlagSettingsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”FeatureFlagSettings(string, string, string, bool, FeatureFlagSourceKind, string?, FeatureFlagTargetingSettings?, IReadOnlyList<FeatureFlagProviderBindingSettings>?, IReadOnlyDictionary<string, string>?)
Section titled “ FeatureFlagSettings(string, string, string, bool, FeatureFlagSourceKind, string?, FeatureFlagTargetingSettings?, IReadOnlyList<FeatureFlagProviderBindingSettings>?, IReadOnlyDictionary<string, string>?)”Creates feature-flag settings.
public FeatureFlagSettings(string id, string displayName, string description, bool enabled = false, FeatureFlagSourceKind sourceKind = FeatureFlagSourceKind.Host, string? sourceModuleId = null, FeatureFlagTargetingSettings? targeting = null, IReadOnlyList<FeatureFlagProviderBindingSettings>? providerBindings = null, IReadOnlyDictionary<string, string>? metadata = null)Parameters
Section titled “Parameters”id string
The stable feature-flag identifier.
displayName string
The operator-facing feature-flag name.
description string
The human-readable feature-flag description.
enabled bool
Indicates whether the feature flag is enabled before targeting is applied.
sourceKind FeatureFlagSourceKind
Identifies whether the feature flag is host-owned or module-owned.
sourceModuleId string?
The source-module identifier when the feature flag is module-owned.
targeting FeatureFlagTargetingSettings?
The optional targeting settings attached to the feature flag.
providerBindings IReadOnlyList<FeatureFlagProviderBindingSettings>?
Optional external provider bindings attached to the feature flag.
metadata IReadOnlyDictionary<string, string>?
Optional operator-facing metadata.
Properties
Section titled “Properties”Description
Section titled “ Description”Gets the human-readable feature-flag description.
public string Description { get; }Property Value
Section titled “Property Value”DisplayName
Section titled “ DisplayName”Gets the operator-facing feature-flag name.
public string DisplayName { get; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”Gets a value indicating whether the feature flag is enabled before targeting is applied.
public bool Enabled { get; }Property Value
Section titled “Property Value”Gets the stable feature-flag identifier.
public string Id { get; }Property Value
Section titled “Property Value”Metadata
Section titled “ Metadata”Gets optional operator-facing metadata.
public IReadOnlyDictionary<string, string> Metadata { get; }Property Value
Section titled “Property Value”IReadOnlyDictionary<string, string>
ProviderBindings
Section titled “ ProviderBindings”Gets the optional external provider bindings attached to the feature flag.
public IReadOnlyList<FeatureFlagProviderBindingSettings> ProviderBindings { get; }Property Value
Section titled “Property Value”IReadOnlyList<FeatureFlagProviderBindingSettings>
SourceKind
Section titled “ SourceKind”Gets the ownership kind for this feature flag.
public FeatureFlagSourceKind SourceKind { get; }Property Value
Section titled “Property Value”FeatureFlagSourceKind
SourceModuleId
Section titled “ SourceModuleId”Gets the source-module identifier when the feature flag is module-owned.
public string? SourceModuleId { get; }Property Value
Section titled “Property Value”Targeting
Section titled “ Targeting”Gets the optional targeting settings attached to the feature flag.
public FeatureFlagTargetingSettings Targeting { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromSection(IConfigurationSection)
Section titled “ FromSection(IConfigurationSection)”Reads one feature flag from configuration.
public static FeatureFlagSettings FromSection(IConfigurationSection section)Parameters
Section titled “Parameters”section IConfigurationSection
The configuration section that contains the feature flag.
Returns
Section titled “Returns”The parsed feature-flag settings.