C# Class DotAmf.ServiceModel.Channels.AmfEncoder

AMF message encoder/decoder.
The encoder is the component that is used to write messages to a stream and to read messages from a stream.
Inheritance: MessageEncoder
Datei anzeigen Open project: artema/DotAmf Class Usage Examples

Public Methods

Method Description
AmfEncoder ( AmfEncodingOptions encodingOptions ) : System

Constructor.

IsContentTypeSupported ( string contentType ) : bool

Returns a value that indicates whether a specified message-level content-type value is supported by the message encoder.

ReadMessage ( ArraySegment buffer, System.ServiceModel.Channels.BufferManager bufferManager, string contentType ) : Message

Reads a message from a specified buffer.

ReadMessage ( Stream stream, int maxSizeOfHeaders, string contentType ) : Message

Reads a message from a specified stream.

An actual deserialization is performed rigth here.

WriteMessage ( Message message, int maxMessageSize, System.ServiceModel.Channels.BufferManager bufferManager, int messageOffset ) : ArraySegment

Writes a message of less than a specified size to a byte array buffer at the specified offset.

WriteMessage ( Message message, Stream stream ) : void

Writes a message to a specified stream.

An actual serialization is performed rigth here.

Method Details

AmfEncoder() public method

Constructor.
public AmfEncoder ( AmfEncodingOptions encodingOptions ) : System
encodingOptions DotAmf.Data.AmfEncodingOptions AMF encoding options.
return System

IsContentTypeSupported() public method

Returns a value that indicates whether a specified message-level content-type value is supported by the message encoder.
public IsContentTypeSupported ( string contentType ) : bool
contentType string The message-level content-type being tested.
return bool

ReadMessage() public method

Reads a message from a specified buffer.
public ReadMessage ( ArraySegment buffer, System.ServiceModel.Channels.BufferManager bufferManager, string contentType ) : Message
buffer ArraySegment Buffer from which the message is deserialized.
bufferManager System.ServiceModel.Channels.BufferManager BufferManager that manages the buffer from which the message is deserialized.
contentType string The Multipurpose Internet Mail Extensions (MIME) message-level content-type.
return Message

ReadMessage() public method

Reads a message from a specified stream.
An actual deserialization is performed rigth here.
public ReadMessage ( Stream stream, int maxSizeOfHeaders, string contentType ) : Message
stream Stream Stream object from which the message is read.
maxSizeOfHeaders int The maximum size of the headers that can be read from the message.
contentType string The Multipurpose Internet Mail Extensions (MIME) message-level content-type.
return Message

WriteMessage() public method

Writes a message of less than a specified size to a byte array buffer at the specified offset.
public WriteMessage ( Message message, int maxMessageSize, System.ServiceModel.Channels.BufferManager bufferManager, int messageOffset ) : ArraySegment
message Message The Message to write to the message buffer.
maxMessageSize int The maximum message size that can be written.
bufferManager System.ServiceModel.Channels.BufferManager The BufferManager that manages the buffer to which the message is written.
messageOffset int The offset of the segment that begins from the start of the byte array that provides the buffer.
return ArraySegment

WriteMessage() public method

Writes a message to a specified stream.
An actual serialization is performed rigth here.
public WriteMessage ( Message message, Stream stream ) : void
message Message The Message to write to the stream.
stream Stream The Stream object to which the message is written.
return void