FeatureToggle is an open source feature toggling / feature switching library for .NET.
Version 3.4 Introduces an new additional way to get the value of whether a toggle is enabled or not.
In versions to v3.3 and earlier, to get the value of a toggle, an instance of the toggle class needed to be created manually:
With v3.4 a new additional fluent way is introduced to improve readability and offer a convenience when evaluating a toggle.
First reference the FeatureToggle.Core.Fluent namespace, then the Is<T> class can be used as follows:
To make the fluent style a little more readable, the name of the concrete toggle class can be shorted, so rather than PrintFeatureToggle for example, it could be named Print, the code would then read: