public override void WriteTo(TBufferWriter writer) { int gender = (int)Gender; writer.Write(UserID); writer.Write(NickName); writer.Write(Region); writer.Write(AccountType); writer.Write(gender); writer.Write(Age); writer.Write(Level); }
public bool Encode(out byte[] buffer) { try { TBufferWriter writer = new TBufferWriter(); BeforeEncode(writer); WriteTo(writer); buffer = writer.GetBufferData(); return(true); } catch (Exception ex) { buffer = null; TLog.TError(ex); return(false); } }
public bool Encode(TBufferWriter writer) { if (writer == null) { return(false); } try { BeforeEncode(writer); WriteTo(writer); return(true); } catch (Exception ex) { TLog.TError(ex); return(false); } }
public override void WriteTo(TBufferWriter writer) { writer.Write(KVInfo); }
protected virtual void BeforeEncode(TBufferWriter writer) { }
public abstract void WriteTo(TBufferWriter writer);