public static PropertyMetadataBuilder <T, DateTime?> DateTimeDataType <T>(this PropertyMetadataBuilder <T, DateTime?> builder, DateTimeDisplayMode displayMode = DateTimeDisplayMode.Date)
 {
     return(builder.SetDataTypeCore(GetDataTypeByDateTimeDisplayMode(displayMode)));
 }
 public static PropertyMetadataBuilder <T, int?> EnumDataType <T>(this PropertyMetadataBuilder <T, int?> builder, Type enumType)
 {
     return(EnumDataTypeCore(builder, enumType));
 }
 public static PropertyMetadataBuilder <T, string> ImageUrlDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.ImageUrl));
 }
 internal static PropertyMetadataBuilder <T, TProperty> CurrencyDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.Currency));
 }
 public static PropertyMetadataBuilder <T, string> UrlDataType <T>(this PropertyMetadataBuilder <T, string> builder, Func <string> errorMessageAccessor = null)
 {
     return(builder.AddOrReplaceAttribute(new UrlAttribute(errorMessageAccessor)));
 }
 public static PropertyMetadataBuilder <T, string> MultilineTextDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.MultilineText));
 }
 public static PropertyMetadataBuilder <T, ulong?> CurrencyDataType <T>(this PropertyMetadataBuilder <T, ulong?> builder)
 {
     return(PropertyMetadataBuilderExtensions.CurrencyDataTypeCore(builder));
 }
 public static PropertyMetadataBuilder <T, ulong?> EnumDataType <T>(this PropertyMetadataBuilder <T, ulong?> builder, Type enumType)
 {
     return(PropertyMetadataBuilderExtensions.EnumDataTypeCore(builder, enumType));
 }
 public static PropertyMetadataBuilder <T, TProperty?> InRange <T, TProperty>(this PropertyMetadataBuilder <T, TProperty?> builder, TProperty?minimum, TProperty?maximum, Func <string> errorMessageAccessor = null) where TProperty : struct, IComparable
 {
     return(builder.AddOrReplaceAttribute(new RangeAttribute(minimum, maximum, errorMessageAccessor)));
 }
 static PropertyMetadataBuilder <T, TProperty> SetDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder, PropertyDataType dataType)
 {
     return(DataAnnotationsAttributeHelper.SetDataTypeCore(builder, dataType));
 }
 internal static PropertyMetadataBuilder <T, TProperty> EnumDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder, Type enumType)
 {
     return(DataAnnotationsAttributeHelper.SetEnumDataTypeCore(builder, enumType));
 }
 public static PropertyMetadataBuilder <T, string> PasswordDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.Password));
 }
 public static PropertyMetadataBuilder <T, TProperty> InRange <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder, TProperty minimum, TProperty maximum, Func <TProperty, string> errorMessageAccessor) where TProperty : IComparable
 {
     return(builder.AddOrReplaceAttribute(new RangeAttribute(minimum, maximum, DXValidationAttribute.ErrorMessageAccessor(errorMessageAccessor))));
 }