public static bool CanConvert(this Type from, Type to) { if (from == null) { throw new ArgumentNullException(nameof(from)); } if (to == null) { throw new ArgumentNullException(nameof(to)); } return((from == to) || (to == typeof(object)) || (to == typeof(string)) || from.IsCastableTo(to) || (GenericNumberUtility.IsNumber(from) && GenericNumberUtility.IsNumber(to)) || (ConvertUtility.GetCastDelegate(from, to) != null)); }
public override bool CanValidateMember(MemberInfo member, Type memberValueType) { return(GenericNumberUtility.IsNumber(memberValueType)); }
public override bool CanDrawTypeFilter(Type type) { return(GenericNumberUtility.IsNumber(type)); }