public override object Deserialize(DynamicSerializer serializer, DataStream ds) { DynamicStructure dynvalue = new DynamicStructure(); foreach (var field in Fields) { object vv = serializer.ReadField(field.Value, ds); dynvalue.Dictionary[field.Key.ToLower()] = vv; } return(dynvalue); }
public override void Serialize(DynamicSerializer serializer, DataStream ds, object value) { DynamicStructure dynvalue = (DynamicStructure)value; foreach (var field in Fields) { object vv; if (dynvalue != null) { dynvalue.Dictionary.TryGetValue(field.Key.ToLower(), out vv); } else { vv = null; } serializer.WriteField(field.Value, ds, vv); } }
public override object Deserialize(DynamicSerializer serializer, DataStream ds) { return(Reader(ds)); }
public override void Serialize(DynamicSerializer serializer, DataStream ds, object value) { Writer(ds, value); }
public virtual object Deserialize(DynamicSerializer serializer, DataStream ds) { throw new NotImplementedException(); }
public virtual void Serialize(DynamicSerializer serializer, DataStream ds, object value) { throw new NotImplementedException(); }