示例#1
0
            public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
                                            JsonSerializer serializer)
            {
                SchemaVersionBase schemaVersionBase = (SchemaVersionBase)Activator.CreateInstance(objectType);

                schemaVersionBase.StringValue = reader.Value.ToString();
                return(schemaVersionBase);
            }
示例#2
0
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                SchemaVersionBase schemaVersionBase = (SchemaVersionBase)value;

                writer.WriteValue(schemaVersionBase.StringValue);
            }