Class converts NotificationObject to String and the other way.
Example #1
0
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            var type = (NotificationObject)value;

            writer.WriteValue(NotificationObjectEnumStringConverter.GetString(type));
        }
Example #2
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var value = (string)reader.Value;

            return(NotificationObjectEnumStringConverter.GetNotificationObject(value));
        }