Switcheroo.Toggles.LocateByNameStrategy.Locate C# (CSharp) Method

Locate() public method

Locates a feature toggle with the strategy as indicated by this type.
public Locate ( ) : IFeatureToggle
return IFeatureToggle
        public IFeatureToggle Locate()
        {
            return featureConfiguration.Get(toggleName);
        }

Usage Example

        public void Locate_Returns_Null_For_Toggles_Not_Found()
        {
            var featureConfiguration = new FeatureConfiguration();

            var locator = new LocateByNameStrategy(featureConfiguration, "idontexist");
            Assert.IsNull(locator.Locate());
        }
All Usage Examples Of Switcheroo.Toggles.LocateByNameStrategy::Locate
LocateByNameStrategy