protected override MessageBuffer OnCreateBufferedCopy( int maxBufferSize) { var headers = new MessageHeaders(Headers); var props = new MessageProperties(Properties); return(new DefaultMessageBuffer(maxBufferSize, headers, props, body.CreateBufferedCopy(maxBufferSize), false)); }
protected override MessageBuffer OnCreateBufferedCopy( int maxBufferSize) { var headers = new MessageHeaders(Headers); var props = new MessageProperties(Properties); var atts = new AttributeCollection(Attributes); return(new DefaultMessageBuffer(maxBufferSize, headers, props, body.CreateBufferedCopy(maxBufferSize), IsFault, atts)); }
public override Message CreateMessage() { if (closed) { throw new ObjectDisposedException("The message buffer has already been closed."); } Message msg; if (body == null) { msg = new EmptyMessage(headers.MessageVersion, headers.Action); } else { msg = new SimpleMessage(headers.MessageVersion, headers.Action, body.CreateBufferedCopy(max_buffer_size), is_fault, attributes); } msg.Headers.Clear(); msg.Headers.CopyHeadersFrom(headers); msg.Properties.CopyProperties(properties); return(msg); }