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

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

            return(NotificationTypeEnumStringConverter.GetNotificationType(value));
        }