public override void ReadFrom(TBufferReader reader) { int gender = 0; reader.Read(ref UserID); reader.Read(ref NickName); reader.Read(ref Region); reader.Read(ref AccountType); reader.Read(ref gender); reader.Read(ref Age); reader.Read(ref Level); Gender = (UserGender)gender; }
public bool Decode(TBufferReader reader) { if (reader != null) { try { BeforeDecode(reader); ReadFrom(reader); return(true); } catch (Exception ex) { TLog.TError(ex); return(false); } } return(false); }
public bool Decode(byte[] data) { if (data != null) { try { TBufferReader reader = new TBufferReader(data); BeforeDecode(reader); ReadFrom(reader); return(true); } catch (Exception ex) { TLog.TError(ex); return(false); } } return(false); }
public override void ReadFrom(TBufferReader reader) { reader.Read(ref KVInfo); }
protected virtual void BeforeDecode(TBufferReader reader) { }
public abstract void ReadFrom(TBufferReader reader);