IJavaScriptConverter are back in the next version

Because I got a lot of feedback that sometimes it would be nice to have my own converter I included the converter interface again. The default converter like IEnumerable, IList, NameValueCollection, HtmlControls (!!!!) , DateTime, all DataSet objects and IDictionary are included as source code.

public class IJavaScriptConverter
{
  public virtual void Initialize()
  {
  }

  public virtual object Deserialize(IJavaScriptObject o, Type t)
  {
   return null;
  }

  public virtual string GetClientScript()
  {
   return "";
  }

  public virtual string Serialize(object o)
  {
   throw new NotImplementedException("Converter for type '" + o.GetType().FullName + "'.");
  }

  public virtual Type[] SerializableTypes
  {
   get
   {
    return null;
   }
  }

  public virtual Type[] DeserializableTypes
  {
   get
   {
    return null;
   }
  }
}

5 Comments

Comments have been disabled for this content.