public override object ReadJson( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var jo = JObject.Load(reader); var notifyEntry = new AlertInfo { Message = new HtmlString(jo.Value <string>("Message")) }; if (Enum.TryParse(jo.Value <string>("Type"), out AlertType type)) { notifyEntry.Type = type; } return(notifyEntry); }
public AlertCompiledView(AlertInfo alert) { _alert = alert; }