public override string ToString() { StringBuilder builder = new StringBuilder(100); builder.Append("{ Len: ").Append(len) .Append(", MsgType: ").Append(MsgType.GetMsgTypeName(msgType)); if (this._HasField(MsgType._HAS_MSG_ID)) { builder.Append(", MsgID: ").Append(MsgIDToName(msgID)); } if (this._HasField(MsgType._HAS_RPC_ID)) { builder.Append(", RPC_ID: ").Append(RPC_ID); } if (this._HasField(MsgType._HAS_DEST_OR_SRC_TYPE)) { builder.Append(", Dest/Src_Type: ").Append(destOrSrcType); } if (this._HasField(MsgType._HAS_DEST_OR_SRC_ID)) { builder.Append(", Dest/Src_ID: ").Append(destOrSrcID); } builder.Append(", [Body]: ").Append(body == null? JsonWriter.Serialize(_body) : body).Append(" }"); return(builder.ToString()); }