Switcheroo.FeatureConfiguration.Add C# (CSharp) Method

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
        public void Add(IFeatureToggle toggle)
        {
            if (toggle == null)
            {
                throw new ArgumentNullException("toggle");
            }

            toggle.AssertConfigurationIsValid();
            toggle.Freeze();

            features.AddOrUpdate(toggle.Name, toggle, (key, value) => toggle);
        }