C# Class Microsoft.Protocols.TestSuites.Common.WOPIMessageEncoder

WOPIMessageEncoder is the component that is used to write the XML corresponding with the MS-FSSHTTP type definition to a payload in a HTTP post request and to read the XML from a payload when invoking the ExecuteCellStorageRequest and ExecuteCellStorageRelativeRequest for MS-WOPI server.
Inheritance: MessageEncoder
Show file Open project: OfficeDev/Interop-TestSuites

Public Methods

Method Description
IsContentTypeSupported ( string messageLevelContentType ) : bool

This method is used to support the text/html content type.

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

This method is used to read a message from a specified buffer.

ReadMessage ( System stream, int maxSizeOfHeaders, string messageContentType ) : Message

This method is used to read a message from a specified stream.

WOPIMessageEncoder ( WOPIMessageEncoderFactory factory ) : System

Initializes a new instance of the WOPIMessageEncoder class with the specified message encoder factory.

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

This method is used to write a message less than a specified size to a byte array buffer at the specified offset using the inner message encoder.

WriteMessage ( Message message, System stream ) : void

This method is used to write a message to a specified stream using the inner message encoder.

Method Details

IsContentTypeSupported() public method

This method is used to support the text/html content type.
public IsContentTypeSupported ( string messageLevelContentType ) : bool
messageLevelContentType string Specify the message-level content-type being tested.
return bool

ReadMessage() public method

This method is used to read a message from a specified buffer.
public ReadMessage ( ArraySegment buffer, System.ServiceModel.Channels.BufferManager bufferManager, string messageContentType ) : Message
buffer ArraySegment Specify the buffer.
bufferManager System.ServiceModel.Channels.BufferManager Specify the buffer manager.
messageContentType string Specify the content type.
return Message

ReadMessage() public method

This method is used to read a message from a specified stream.
public ReadMessage ( System stream, int maxSizeOfHeaders, string messageContentType ) : Message
stream System Specify the stream.
maxSizeOfHeaders int Specify the maximum size of the headers that can be read from the message
messageContentType string Specify the content type.
return Message

WOPIMessageEncoder() public method

Initializes a new instance of the WOPIMessageEncoder class with the specified message encoder factory.
public WOPIMessageEncoder ( WOPIMessageEncoderFactory factory ) : System
factory WOPIMessageEncoderFactory Specify the message encoder factory.
return System

WriteMessage() public method

This method is used to write a message less than a specified size to a byte array buffer at the specified offset using the inner message encoder.
public WriteMessage ( Message message, int maxMessageSize, System.ServiceModel.Channels.BufferManager bufferManager, int messageOffset ) : ArraySegment
message Message Specify the message which is needed to be written into buffer.
maxMessageSize int Specify the max size of the message.
bufferManager System.ServiceModel.Channels.BufferManager Specify the buffer manager.
messageOffset int Specify the offset of the segment that begins from the start of the byte array that provides the buffer.
return ArraySegment

WriteMessage() public method

This method is used to write a message to a specified stream using the inner message encoder.
public WriteMessage ( Message message, System stream ) : void
message Message Specify the message which is needed to be written into buffer.
stream System Specify the written stream.
return void