C# Class Switcheroo.Toggles.DependencyToggle

A toggle that has other feature toggles as dependencies.
Inheritance: FeatureToggleBase, IDependencyFeatureToggle
Mostra file Open project: rhanekom/Switcheroo Class Usage Examples

Public Methods

Method Description
AddDependency ( IFeatureToggle toggle ) : void

Adds the specified feature toggle as a dependency to this one.

AssertConfigurationIsValid ( ) : void

Asserts that the configuration of this feautre toggle is valid.

DependencyToggle ( IFeatureToggle innerToggle ) : System.Collections.Concurrent

Initializes a new instance of the DependencyToggle class.

Freeze ( ) : void

Freezes this instance so that no more changes can be made to it.

IsEnabled ( ) : bool

Evaluates the dynamic rules for this instance to determine whether it is enabled.

Private Methods

Method Description
HasCycle ( PersistentList visitedToggles = null ) : bool

Method Details

AddDependency() public method

Adds the specified feature toggle as a dependency to this one.
public AddDependency ( IFeatureToggle toggle ) : void
toggle IFeatureToggle The toggle to add as a dependency.
return void

AssertConfigurationIsValid() public method

Asserts that the configuration of this feautre toggle is valid.
public AssertConfigurationIsValid ( ) : void
return void

DependencyToggle() public method

Initializes a new instance of the DependencyToggle class.
public DependencyToggle ( IFeatureToggle innerToggle ) : System.Collections.Concurrent
innerToggle IFeatureToggle The inner toggle for evaluation of this toggle.
return System.Collections.Concurrent

Freeze() public method

Freezes this instance so that no more changes can be made to it.
public Freeze ( ) : void
return void

IsEnabled() public method

Evaluates the dynamic rules for this instance to determine whether it is enabled.
public IsEnabled ( ) : bool
return bool