public bool from_byte(byte[] buffer, ref long pos) { this.id = Cmd.to_string(buffer, ref pos); this.login_name = Cmd.to_string(buffer, ref pos); this.login_psw = Cmd.to_string(buffer, ref pos); return(true); }
public override bool from_byte(byte[] buffer, ref long pos) { if (!base.from_byte(buffer, ref pos)) { return(false); } this.ip = Cmd.to_string(buffer, ref pos); return(true); }
public bool from_byte(byte[] buffer, ref long pos) { this.name = Cmd.to_string(buffer, ref pos); long len = Cmd.to_long(buffer, ref pos); this.content = null; if (len > 0) { this.content = new byte[len]; Array.Copy(buffer, pos, this.content, 0, len); pos += len; } return(true); }
public bool from_byte(byte[] buffer, ref long pos) { this.id = Cmd.to_string(buffer, ref pos); this.name = Cmd.to_string(buffer, ref pos); this.is_male = Cmd.to_bool(buffer, ref pos); this.age = Cmd.to_uint(buffer, ref pos); this.dcm_type = Cmd.to_string(buffer, ref pos); this.study_department = Cmd.to_string(buffer, ref pos); this.report_num = Cmd.to_uint(buffer, ref pos); this.dcm_num = Cmd.to_uint(buffer, ref pos); this.desc = Cmd.to_string(buffer, ref pos); this.available = Cmd.to_bool(buffer, ref pos); return(true); }
public override bool from_byte(byte[] buffer, ref long pos) { if (!base.from_byte(buffer, ref pos)) { return(false); } int size = Cmd.to_int(buffer, ref pos); this.ips = size > 0 ? new string[size] : null; for (int i = 0; i < size; i++) { this.ips[i] = Cmd.to_string(buffer, ref pos); } return(true); }
public virtual bool from_byte(byte[] buffer, ref long pos) { try { this.id = (CmdType)to_int(buffer, ref pos); this.no = to_ulong(buffer, ref pos); this.sender_name = to_string(buffer, ref pos); this.MessageId = Cmd.to_string(buffer, ref pos); this.RepliedMessageId = Cmd.to_string(buffer, ref pos); } catch { return(false); } return(true); }