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

Class FeatureFlagDescriptor

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

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

Describes one feature flag visible to the active Cephalon runtime.

public sealed class FeatureFlagDescriptor

objectFeatureFlagDescriptor

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

FeatureFlagDescriptor(string, string, string, bool, FeatureFlagSourceKind, string?, FeatureFlagTargetingDescriptor?, IReadOnlyList<FeatureFlagProviderBindingDescriptor>?, IReadOnlyDictionary<string, string>?)

Section titled “ FeatureFlagDescriptor(string, string, string, bool, FeatureFlagSourceKind, string?, FeatureFlagTargetingDescriptor?, IReadOnlyList<FeatureFlagProviderBindingDescriptor>?, IReadOnlyDictionary<string, string>?)”

Creates a feature-flag descriptor.

public FeatureFlagDescriptor(string id, string displayName, string description, bool enabled = false, FeatureFlagSourceKind sourceKind = FeatureFlagSourceKind.Host, string? sourceModuleId = null, FeatureFlagTargetingDescriptor? targeting = null, IReadOnlyList<FeatureFlagProviderBindingDescriptor>? 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 description of the gated behavior.

enabled bool

Indicates whether the feature flag is enabled before any targeting constraints are applied.

sourceKind FeatureFlagSourceKind

Identifies whether the feature flag is host-owned or module-owned.

sourceModuleId string?

The module identifier that owns this feature flag when sourceKind is .

targeting FeatureFlagTargetingDescriptor?

The optional targeting constraints attached to the feature flag.

providerBindings IReadOnlyList<FeatureFlagProviderBindingDescriptor>?

Optional external provider bindings that can further gate the Cephalon-owned feature flag without replacing the local runtime descriptor as the source of truth.

metadata IReadOnlyDictionary<string, string>?

Optional operator-facing metadata.

Gets the human-readable description of the gated behavior.

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 operator-facing metadata for the feature flag.

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

IReadOnlyDictionary<string, string>

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

public IReadOnlyList<FeatureFlagProviderBindingDescriptor> ProviderBindings { get; }

IReadOnlyList<FeatureFlagProviderBindingDescriptor>

Gets the ownership kind for this feature flag.

public FeatureFlagSourceKind SourceKind { get; }

FeatureFlagSourceKind

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

public string? SourceModuleId { get; }

string?

Gets the optional targeting constraints attached to the feature flag.

public FeatureFlagTargetingDescriptor Targeting { get; }

FeatureFlagTargetingDescriptor