/// <summary> /// Converts the given object to the type of this converter, using the specified /// context and culture information. /// </summary> /// <param name="context">An <see cref="ITypeDescriptorContext"/> that provides a format context.</param> /// <param name="culture">The current culture.</param> /// <param name="value">The object to convert.</param> /// <returns>An object that represents the converted value.</returns> /// <exception cref="NotSupportedException">The conversion cannot be performed.</exception> public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { var text = value as string; if (text == null) { return(base.ConvertFrom(context, culture, value)); } return(MostRecentlyUsed.Deserialize(culture, text)); }