Esempio 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);
        }
Esempio n. 2
0
 public SimpleSwitchable()
 {
     Text = new MinHtml();
     Image = new Image();
     Heading = new BbText();
 }
Esempio n. 3
0
 public SimpleSwitchable()
 {
     Text    = new MinHtml();
     Image   = new Image();
     Heading = new BbText();
 }