Ejemplo n.º 1
0
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            if (value == null)
            {
                return;
            }
            var newValue = FunctionEnum.GetEnumDescription((Enum)value);

            JToken.FromObject(newValue).WriteTo(writer);
        }
Ejemplo n.º 2
0
 public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 {
     return(reader == null ? null : FunctionEnum.GetEnumDescription((Enum)reader.Value));
 }