namespace Syntriax.Modules.State
{
public static class IStateEnableExtensions
{
///
/// Checks if the provided parameter is enabled, if the parameter is null returns the nullValue parameter
///
/// to be checked if enabled or not
/// The value that will be returned if is null. Default value: true
/// 's toggle value, or if null return nullValue parameter
public static bool IsEnabledNullChecked(this IStateEnable stateEnable, bool nullValue = true)
=> stateEnable == null ? nullValue : stateEnable.IsEnabled;
}
}