Exemple #1
0
        public static FormatValueType?GetValueType(PropertyInfo propertyInfo)
        {
            var type = DynamicDataPropertyHandlerBase.UnwrapNullableType(propertyInfo.PropertyType);

            if (numericTypes.Contains(type))
            {
                return(FormatValueType.Number);
            }
            else if (dateTypes.Contains(type))
            {
                return(FormatValueType.DateTime);
            }
            if (stringTypes.Contains(type))
            {
                return(FormatValueType.Text);
            }

            return(null);
        }
Exemple #2
0
        public static bool CanHandleProperty(PropertyInfo propertyInfo, DynamicDataContext context)
        {
            var type = DynamicDataPropertyHandlerBase.UnwrapNullableType(propertyInfo.PropertyType);

            return(stringTypes.Contains(type) || numericTypes.Contains(type) || dateTypes.Contains(type));
        }