Пример #1
0
 public static PropertyMetadataBuilder <T, DateTime?> DateTimeDataType <T>(this PropertyMetadataBuilder <T, DateTime?> builder, DateTimeDisplayMode displayMode = DateTimeDisplayMode.Date)
 {
     return(builder.SetDataTypeCore(GetDataTypeByDateTimeDisplayMode(displayMode)));
 }
Пример #2
0
 public static PropertyMetadataBuilder <T, int?> EnumDataType <T>(this PropertyMetadataBuilder <T, int?> builder, Type enumType)
 {
     return(EnumDataTypeCore(builder, enumType));
 }
Пример #3
0
 public static PropertyMetadataBuilder <T, string> ImageUrlDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.ImageUrl));
 }
Пример #4
0
 internal static PropertyMetadataBuilder <T, TProperty> CurrencyDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.Currency));
 }
Пример #5
0
 public static PropertyMetadataBuilder <T, string> UrlDataType <T>(this PropertyMetadataBuilder <T, string> builder, Func <string> errorMessageAccessor = null)
 {
     return(builder.AddOrReplaceAttribute(new UrlAttribute(errorMessageAccessor)));
 }
Пример #6
0
 public static PropertyMetadataBuilder <T, string> MultilineTextDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.MultilineText));
 }
Пример #7
0
 public static PropertyMetadataBuilder <T, ulong?> CurrencyDataType <T>(this PropertyMetadataBuilder <T, ulong?> builder)
 {
     return(PropertyMetadataBuilderExtensions.CurrencyDataTypeCore(builder));
 }
Пример #8
0
 public static PropertyMetadataBuilder <T, ulong?> EnumDataType <T>(this PropertyMetadataBuilder <T, ulong?> builder, Type enumType)
 {
     return(PropertyMetadataBuilderExtensions.EnumDataTypeCore(builder, enumType));
 }
Пример #9
0
 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)));
 }
Пример #10
0
 static PropertyMetadataBuilder <T, TProperty> SetDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder, PropertyDataType dataType)
 {
     return(DataAnnotationsAttributeHelper.SetDataTypeCore(builder, dataType));
 }
Пример #11
0
 internal static PropertyMetadataBuilder <T, TProperty> EnumDataTypeCore <T, TProperty>(this PropertyMetadataBuilder <T, TProperty> builder, Type enumType)
 {
     return(DataAnnotationsAttributeHelper.SetEnumDataTypeCore(builder, enumType));
 }
Пример #12
0
 public static PropertyMetadataBuilder <T, string> PasswordDataType <T>(this PropertyMetadataBuilder <T, string> builder)
 {
     return(builder.SetDataTypeCore(PropertyDataType.Password));
 }
Пример #13
0
 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))));
 }