Ejemplo n.º 1
0
 public override object ConvertFromString(string value, IValueSerializerContext context)
 {
     if (value != null)
     {
         return(DataRect.Parse(value));
     }
     return(base.ConvertFromString(value, context));
 }
Ejemplo n.º 2
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (value == null)
            {
                throw GetConvertFromException(value);
            }

            string source = value as string;

            if (source != null)
            {
                return(DataRect.Parse(source));
            }

            return(base.ConvertFrom(context, culture, value));
        }