public override string ToString() { var buf = new byte[Length - 2]; Buffer.BlockCopy(_memoryStream.ToArray(), 2, buf, 0, buf.Length); return($"Opcode: 0x{(ushort) OpCode:X4} Length: {buf.Length} Data: {ByteUtils.BytesToHex(buf)}"); }
public string Dump() { return(ByteUtils.BytesToHex(memoryStream.ToArray(), $"Packet (0x{OpCode.ToString("X4")} - {Length}): ")); }
public override string ToString() { byte[] buf = new byte[this.Length - 2]; Buffer.BlockCopy(this.memoryStream.ToArray(), 2, buf, 0, buf.Length); return(string.Format("{0}|{1} Opcode: 0x{2:X4} Length: {3} Data: {4}", this.Header, this.Type, this.OpCode, buf.Length, ByteUtils.BytesToHex(buf))); }
public string Dump() { return(ByteUtils.BytesToHex(this.memoryStream.ToArray(), string.Format("Packet (0x{0} - {1}): ", this.OpCode.ToString("X4"), this.Length))); }
public override string ToString() { byte[] buf = new byte[this.Length - 2]; Buffer.BlockCopy(this.memoryStream.ToArray(), 2, buf, 0, buf.Length); return(string.Format("Opcode: 0x{0:X4} Length: {1} Data: {2}", (ushort)this.OpCode, buf.Length, ByteUtils.BytesToHex(buf))); }