public override void WriteObject(object obj, Com.Bj58.Spat.Gaea.Serializer.Component.GaeaStream outStream) { outStream.WriteUInt32(obj.GetType().GetTypeId()); string value = obj.ToString(); SerializerFactory.GetSerializer(typeof(string)).WriteObject(value, outStream); }
public override object ReadObject(Com.Bj58.Spat.Gaea.Serializer.Component.GaeaStream inStream, Type defType) { uint typeId = inStream.ReadUInt32(); Type type = typeId.ToType(); String value = Convert.ToString(SerializerFactory.GetSerializer(typeof(string)).ReadObject(inStream, typeof(string))); return(Enum.Parse(type, value)); }
public override object ReadObject(Com.Bj58.Spat.Gaea.Serializer.Component.GaeaStream inStream, Type defType) { object value = SerializerFactory.GetSerializer(typeof(string)).ReadObject(inStream, typeof(string)); if (value != null) { return(decimal.Parse(value.ToString())); } return(default(decimal)); }
public override void WriteObject(object obj, Com.Bj58.Spat.Gaea.Serializer.Component.GaeaStream outStream) { SerializerFactory.GetSerializer(typeof(string)).WriteObject(obj.ToString(), outStream); }