ข้ามไปยังเนื้อหา

Class FeatureFlagSettings

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll

Describes one configuration-driven feature flag.

public sealed class FeatureFlagSettings

objectFeatureFlagSettings

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

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)

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.

Gets the human-readable feature-flag description.

public string Description { get; }

string

Gets the operator-facing feature-flag name.

public string DisplayName { get; }

string

Gets a value indicating whether the feature flag is enabled before targeting is applied.

public bool Enabled { get; }

bool

Gets the stable feature-flag identifier.

public string Id { get; }

string

Gets optional operator-facing metadata.

public IReadOnlyDictionary<string, string> Metadata { get; }

IReadOnlyDictionary<string, string>

Gets the optional external provider bindings attached to the feature flag.

public IReadOnlyList<FeatureFlagProviderBindingSettings> ProviderBindings { get; }

IReadOnlyList<FeatureFlagProviderBindingSettings>

Gets the ownership kind for this feature flag.

public FeatureFlagSourceKind SourceKind { get; }

FeatureFlagSourceKind

Gets the source-module identifier when the feature flag is module-owned.

public string? SourceModuleId { get; }

string?

Gets the optional targeting settings attached to the feature flag.

public FeatureFlagTargetingSettings Targeting { get; }

FeatureFlagTargetingSettings

Reads one feature flag from configuration.

public static FeatureFlagSettings FromSection(IConfigurationSection section)

section IConfigurationSection

The configuration section that contains the feature flag.

FeatureFlagSettings

The parsed feature-flag settings.