Table of Contents

Class FeatureBase

Namespace
Dynamicweb.Core
Assembly
Dynamicweb.Core.dll

Serves as a convenience abstraction for implementing concrete feature flags.

public abstract class FeatureBase : Feature
Inheritance
FeatureBase
Derived
Inherited Members

Remarks

Derive from FeatureBase (instead of directly from Feature) to clearly indicate an extensible feature flag and to centralize common constructor forwarding logic. A concrete feature should normally expose a public parameterless constructor that calls one of these protected constructors with the appropriate metadata (name, category, default value, and optionally description and documentation link). Instances are discovered and managed by the feature management system (e.g. FeatureManager).

Constructors

FeatureBase(string, string, bool)

Initializes a new instance of a derived feature flag with its identifying metadata and default activation state inherited from Feature.

protected FeatureBase(string name, string category, bool defaultValue)

Parameters

name string

Unique name (identifier) of the feature flag shown in the UI.

category string

Logical grouping/category for the feature used in the UI.

defaultValue bool

Default activation state when no persisted override exists.

FeatureBase(string, string, bool, string, string)

Initializes a new instance of a derived feature flag including descriptive metadata.

protected FeatureBase(string name, string category, bool defaultValue, string description, string documentationLink)

Parameters

name string

Unique name (identifier) of the feature flag.

category string

Logical grouping/category for the feature.

defaultValue bool

Default activation state when no override is stored.

description string

Human-readable explanation of the feature's purpose.

documentationLink string

Optional external documentation URL for deeper details.

See Also

To top