Ejemplo n.º 1
0
 public static object DeserializeValue(
     System.Type propertyType,
     string value,
     string propertyDisplayName)
 {
     return(XmlPropertySetting.ConvertValueFromString(TypeDescriptor.GetConverter(propertyType), value, propertyDisplayName, propertyType, false));
 }
Ejemplo n.º 2
0
 public static object DeserializeValue(
     PropertyDescriptor prop,
     string value,
     string propertyDisplayName,
     bool throwOnError)
 {
     return(XmlPropertySetting.ConvertValueFromString(prop.Converter, value, propertyDisplayName, prop.PropertyType, throwOnError));
 }
Ejemplo n.º 3
0
        public static object DeserializeValue(RadProperty property, string value, bool throwOnError)
        {
            if (value == null)
            {
                return((object)null);
            }
            PropertyDescriptor prop = TypeDescriptor.GetProperties(property.OwnerType).Find(property.Name, true);

            return(prop == null?XmlPropertySetting.ConvertValueFromString(TypeDescriptor.GetConverter(property.PropertyType), value, property.FullName, property.PropertyType, throwOnError) : XmlPropertySetting.DeserializeValue(prop, value, property.FullName, throwOnError));
        }