Ejemplo n.º 1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            if (reader.Value == null)
            {
                return((MinHtml)null);
            }
            // we assume the MinHtml is always clean when serialized
            MinHtml mHtml = Activator.CreateInstance(objectType, reader.Value as string, true) as MinHtml;

            return(mHtml);
        }
Ejemplo n.º 2
0
 public SimpleSwitchable()
 {
     Text = new MinHtml();
     Image = new Image();
     Heading = new BbText();
 }
Ejemplo n.º 3
0
 public SimpleSwitchable()
 {
     Text    = new MinHtml();
     Image   = new Image();
     Heading = new BbText();
 }