Esempio n. 1
0
        public object ExportToModel(Type targetType, params object[] context)
        {
            if (string.IsNullOrWhiteSpace(JSonModel))
            {
                return(null);
            }
            if (!targetType.IsAssignableFrom(typeof(T)))
            {
                throw (new NotSupportedException(string.Format(ControlsResources.NotCompatibleTypes, typeof(T).FullName, targetType.FullName)));
            }
            object result = BasicHtmlHelper.ClientDecode(JSonModel, typeof(T));

            Validate(result, null, null, prefix);
            return(result);
        }
Esempio n. 2
0
 public object ExportToModel(Type targetType, params object[] context)
 {
     return(BasicHtmlHelper.ClientDecode(JSonModel, targetType));
 }