private static TEnum GetValuesMaskCore() { var result = default(TEnum); var values = GetValuesCore(); foreach (var value in values) { result = OpHolder <TEnum> .SetFlagCallback(result, value); } return(result); }
public static TEnum ClearFlag <TEnum>(this TEnum value, TEnum flag) where TEnum : struct, Enum => OpHolder <TEnum> .ClearFlagCallback(value, flag);
public static bool IsFlagUnset <TEnum>(this TEnum value, TEnum flags) where TEnum : struct, Enum => !OpHolder <TEnum> .IsAnyFlagSetCallback(value, flags);
public static bool AreFlagsDefined <TEnum>(TEnum flags) where TEnum : struct, Enum => IsDefined(flags) || MetaHolder <TEnum> .IsFlagsEnum && OpHolder <TEnum> .IsFlagSetCallback(MetaHolder <TEnum> .ValuesMask, flags);