/// <summary> /// Serializes the request to a byte buffer. /// </summary> /// <returns></returns> byte[] PrepareRequestBuffer() { using (var ms = new MemoryStream()) { serializer.Serialize(ms, request); return(WireFormat.GetBytes(method, ms)); } }