/// <summary>See <see cref="TypeConverter.ConvertFrom(ITypeDescriptorContext,CultureInfo,Object)"/>.</summary>
 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
 {
     if (context != null)
     {
         string refMode = value as string;
         if (refMode != null)
         {
             object     instance = EditorUtility.ResolveContextInstance(context.Instance, true);
             FactType   factType;
             ObjectType objectType;
             if (null != (objectType = instance as ObjectType) ||
                 (null != (factType = instance as FactType) && null != (objectType = factType.NestingType)))
             {
                 ReferenceMode singleMode = ReferenceMode.GetReferenceModeForDecoratedName(refMode, objectType.ResolvedModel, false);
                 return((object)singleMode ?? refMode);
             }
         }
     }
     return(base.ConvertFrom(context, culture, value));
 }