public int Deserialize(byte[] buffer, int offset, int end) { byte header = buffer.ReadUInt8(offset++); if ((MessageType)(header >> 4) != MessageType.Abort) throw new Exception("Could not deserialize an unconfirmed request message"); this.Server = (header & 0x01) > 0; this.InvokeId = buffer.ReadUInt8(offset++); this.AbortReason = buffer.ReadUInt8(offset++); return offset; }