Freigeben über


MessageEncoder.WriteMessage Method (Message, Int32, BufferManager, Int32)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

When overridden in a derived class, writes a message of less than a specified size to a byte array buffer at the specified offset.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public MustOverride Function WriteMessage ( _
    message As Message, _
    maxMessageSize As Integer, _
    bufferManager As BufferManager, _
    messageOffset As Integer _
) As ArraySegment(Of Byte)
public abstract ArraySegment<byte> WriteMessage(
    Message message,
    int maxMessageSize,
    BufferManager bufferManager,
    int messageOffset
)

Parameters

  • maxMessageSize
    Type: System.Int32
    The maximum message size that can be written.
  • messageOffset
    Type: System.Int32
    The offset of the segment that begins from the start of the byte array that provides the buffer.

Return Value

Type: System.ArraySegment<Byte>
A ArraySegment<T> of type byte that provides the buffer to which the message is serialized.

Remarks

This method is called by WriteMessage(Message, Int32, BufferManager, Int32).

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.