StreamMessageHelper StreamMessageHelper Class

Helper class for creating a Message object from streaming content.

Syntax

Declaration

public static class StreamMessageHelperPublic Module StreamMessageHelper

Inheritance Hierarchy

Methods summary

Creates a JSON message with a specified version.

Creates a message from a stream, using the specified version, action, and delegate.

Creates a message, using the specified version, action, and stream.

Retrieves the stream of the specified message.

Retrieves the stream of the specified message with the specified reader.

Methods

  • CreateJsonMessage(MessageVersion, String, Stream)
    CreateJsonMessage(MessageVersion, String, Stream)

    Creates a JSON message with a specified version.

    public static Message CreateJsonMessage(MessageVersion version, string action, Stream jsonStream)Public Shared Function CreateJsonMessage(version As MessageVersion, action As String, jsonStream As Stream) As Message

    Parameters

    Returns

  • CreateMessage(MessageVersion, String, StreamWriterDelegate)
    CreateMessage(MessageVersion, String, StreamWriterDelegate)

    Creates a message from a stream, using the specified version, action, and delegate.

    public static Message CreateMessage(MessageVersion version, string action, StreamWriterDelegate writer)Public Shared Function CreateMessage(version As MessageVersion, action As String, writer As StreamWriterDelegate) As Message

    Parameters

    • version

      Specifies the addressing and envelope versions to use for the newly created message. If the request is made using REST, the Addressing and Envelope version are None.

    • action

      A description of how the message should be processed. For messages sent in response to a HTTP request, this value must be “GETRESPONSE”.

    • writer

      A delegate that allowsMicrosoft.ServiceBus.Web.StreamMessageHelper.CreateMessage to call back and ask for a Stream to populate the body of the message.

    Returns

  • CreateMessage(MessageVersion, String, Stream)
    CreateMessage(MessageVersion, String, Stream)

    Creates a message, using the specified version, action, and stream.

    public static Message CreateMessage(MessageVersion version, string action, Stream stream)Public Shared Function CreateMessage(version As MessageVersion, action As String, stream As Stream) As Message

    Parameters

    • version

      Specifies the addressing and envelope versions to use for the newly created message. If the request is made using REST, the Addressing and Envelope version are None.

    • action

      A description of how the message should be processed. For messages sent in response to a HTTP request, this value must be “GETRESPONSE”.

    • stream

      A stream that contains content used to write the body of the new message.

    Returns

  • GetStream(Message)
    GetStream(Message)

    Retrieves the stream of the specified message.

    public static Stream GetStream(Message message)Public Shared Function GetStream(message As Message) As Stream

    Parameters

    Returns

    • Returns aStream that contains the stream of the message. A Stream is always returned regardless of whether the message body is empty.

  • GetStream(XmlDictionaryReader)
    GetStream(XmlDictionaryReader)

    Retrieves the stream of the specified message with the specified reader.

    public static Stream GetStream(XmlDictionaryReader reader)Public Shared Function GetStream(reader As XmlDictionaryReader) As Stream

    Parameters

    Returns

Details

Namespace

Microsoft.ServiceBus.Web

Assembly

Microsoft.ServiceBus.dll