C# Class Switcheroo.FeatureConfiguration

A concrete implementation of a IFeatureConfiguration. This configuration stores and manages feature toggles by name.
Inheritance: IFeatureConfiguration
Show file Open project: rhanekom/Switcheroo Class Usage Examples

Public Methods

Method Description
Add ( IFeatureToggle toggle ) : void

Adds the specified feature toggle.

Clear ( ) : void

Clears this instance, removing all feature toggles from it.

Get ( string toggleName ) : IFeatureToggle

Gets the feature toggle with the specified name.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through the collection.

Initialize ( Action configuration ) : void

Initializes the this configuration using the specified configuration action.

IsEnabled ( string featureName ) : bool

Determines whether the feature toggle with the specified name is enabled.

WhatDoIHave ( ) : string

Diagnostics on what's currently contained in this configuration instance.

Private Methods

Method Description
System ( ) : System.Collections.IEnumerator

Returns an enumerator that iterates through a collection.

Method Details

Add() public method

Adds the specified feature toggle.
If is null.
public Add ( IFeatureToggle toggle ) : void
toggle IFeatureToggle The toggle to add to this configuration.
return void

Clear() public method

Clears this instance, removing all feature toggles from it.
public Clear ( ) : void
return void

Get() public method

Gets the feature toggle with the specified name.
If is null.
public Get ( string toggleName ) : IFeatureToggle
toggleName string Name of the feature toggle.
return IFeatureToggle

GetEnumerator() public method

Returns an enumerator that iterates through the collection.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

Initialize() public method

Initializes the this configuration using the specified configuration action.
public Initialize ( Action configuration ) : void
configuration Action The source of configuration.
return void

IsEnabled() public method

Determines whether the feature toggle with the specified name is enabled.
If is null.
public IsEnabled ( string featureName ) : bool
featureName string Name of the feature toggle.
return bool

WhatDoIHave() public method

Diagnostics on what's currently contained in this configuration instance.
public WhatDoIHave ( ) : string
return string