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
namestringUnique name (identifier) of the feature flag shown in the UI.
categorystringLogical grouping/category for the feature used in the UI.
defaultValueboolDefault 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
namestringUnique name (identifier) of the feature flag.
categorystringLogical grouping/category for the feature.
defaultValueboolDefault activation state when no override is stored.
descriptionstringHuman-readable explanation of the feature's purpose.
documentationLinkstringOptional external documentation URL for deeper details.