private static bool ValidateCasing(object value) { Debug.Assert(value is CharacterCasing); try { ArgumentHelper.AssertEnumMember((CharacterCasing)value, "value"); } catch (ArgumentException) { return(false); } return(true); }
private static bool ValidateDateTimeConversionMode(object value) { Debug.Assert(value is DateTimeConversionMode); try { ArgumentHelper.AssertEnumMember((DateTimeConversionMode)value, "value"); } catch (ArgumentException) { return(false); } return(true); }
//[CLSCompliant(false)] public static void AssertEnumMember <TEnum>(this TEnum enumValue, string argName, params TEnum[] validValues) where TEnum : struct, IConvertible { ArgumentHelper.AssertEnumMember <TEnum>(enumValue, argName, validValues); }