/// <summary> /// Creates a new message with the QueryOptions and original message body embedded in it. /// </summary> /// <param name="message">The original message.</param> /// <param name="queryOptions">The query options to embed in the new message.</param> internal static void AddMessageQueryOptions(ref Message message, IList<KeyValuePair<string, string>> queryOptions) { BodyWriter bodyWriter = new QueryOptionsBodyWriter(message, queryOptions); // Note, we must use a null action, otherwise 2 actions will exist in the headers. Message queryOptionsMessage = Message.CreateMessage(message.Version, /*action*/ null, bodyWriter); queryOptionsMessage.Headers.CopyHeadersFrom(message); queryOptionsMessage.Properties.CopyProperties(message.Properties); message = queryOptionsMessage; }
/// <summary> /// Creates a new message with the QueryOptions and original message body embedded in it. /// </summary> /// <param name="message">The original message.</param> /// <param name="queryOptions">The query options to embed in the new message.</param> internal static void AddMessageQueryOptions(ref Message message, IList <KeyValuePair <string, string> > queryOptions) { BodyWriter bodyWriter = new QueryOptionsBodyWriter(message, queryOptions); // Note, we must use a null action, otherwise 2 actions will exist in the headers. Message queryOptionsMessage = Message.CreateMessage(message.Version, /*action*/ null, bodyWriter); queryOptionsMessage.Headers.CopyHeadersFrom(message); queryOptionsMessage.Properties.CopyProperties(message.Properties); message = queryOptionsMessage; }