namespace Syntriax.Modules.ToggleState
{
public static class IToggleStateExtensions
{
///
/// Checks if the provided parameter IToggleState is toggled, if the parameter is null returns the nullValue parameter
///
/// IToggleState to be checked if toggled or not
/// The value that will be returned if toggleState is null. Default value: true
/// IToggleState's toggle value, or if null return nullValue parameter
public static bool IsToggledNullChecked(this IToggleState toggleState, bool nullValue = true)
=> toggleState == null ? nullValue : toggleState.IsToggled;
}
}