C# Class Microsoft.Protocols.TestSuites.MS_WOPI.WOPIResponseHelper

A class is used to perform serializer operations for MS-WOPI protocol.
Inheritance: HelperBase
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
GetBytesStringValue ( byte rawData ) : string

A method used to get byte string values from the response. 50 bytes per line.

GetContentFromResponse ( WOPIHttpResponse wopiHttpResponse ) : byte[]

A method is used to get raw body contents whose length is in 1 to int.MaxValue bytes scope.

ReadHTTPResponseBodyToString ( WOPIHttpResponse wopiHttpResponse ) : string

A method is used to read the HTTP response body and decode to string.

ReadRawHTTPResponseToBytes ( WOPIHttpResponse wopiHttpResponse ) : List

A method is used to read the HTTP response body to the bytes array.

Private Methods

Method Description
ReadBytesFromHttpBodyStream ( Stream bodyBinaries, long contentLengthValue ) : List

A method used to read bytes data from the stream of the HTTP response.

WOPIResponseHelper ( ) : System

Prevents a default instance of the WOPIResponseHelper class from being created

Method Details

GetBytesStringValue() public static method

A method used to get byte string values from the response. 50 bytes per line.
public static GetBytesStringValue ( byte rawData ) : string
rawData byte A parameter represents a WOPI response instance which contains the response body.
return string

GetContentFromResponse() public static method

A method is used to get raw body contents whose length is in 1 to int.MaxValue bytes scope.
public static GetContentFromResponse ( WOPIHttpResponse wopiHttpResponse ) : byte[]
wopiHttpResponse WOPIHttpResponse A parameter represents the HTTP response.
return byte[]

ReadHTTPResponseBodyToString() public static method

A method is used to read the HTTP response body and decode to string.
public static ReadHTTPResponseBodyToString ( WOPIHttpResponse wopiHttpResponse ) : string
wopiHttpResponse WOPIHttpResponse A parameter represents the HTTP response.
return string

ReadRawHTTPResponseToBytes() public static method

A method is used to read the HTTP response body to the bytes array.
public static ReadRawHTTPResponseToBytes ( WOPIHttpResponse wopiHttpResponse ) : List
wopiHttpResponse WOPIHttpResponse A parameter represents the HTTP response.
return List