Table of Contents

Class SysFeatureDetector

Namespace
ToSic.Sys.Capabilities.SysFeatures
Assembly
ToSic.Sys.Features.dll

Abstract base class for trivial system feature detectors which determine if a feature is enabled or not. It allows for quickly creating feature detectors which already have all the specs necessary (to reduce code).

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public abstract class SysFeatureDetector : ISysFeatureDetector
Inheritance
object
SysFeatureDetector
Implements
Derived

Constructors

SysFeatureDetector(SysFeature, bool)

Abstract base class for trivial system feature detectors which determine if a feature is enabled or not. It allows for quickly creating feature detectors which already have all the specs necessary (to reduce code).

protected SysFeatureDetector(SysFeature definition, bool isEnabled = false)

Parameters

definition SysFeature

The feature definition.

isEnabled bool

Indicates whether the feature is enabled.

Properties

IsEnabled

Flag if enabled. INTERNAL for unit testing.

public bool IsEnabled { get; }

Property Value

bool

Methods

GetState()

Returns the current state of the feature as a FeatureState object.

public FeatureState GetState()

Returns

FeatureState