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

A class that implements MapiHttp transport.
Show file Open project: OfficeDev/Interop-TestSuites Class Usage Examples

Public Methods

Method Description
Connect ( string mailStoreUrl, string domain, string userName, string userDN, string password ) : uint

The private method to connect the exchange server through MAPIHTTP transport.

Disconnect ( ) : uint

This method sends the disconnect request through MAPIHTTP transport to the server.

Execute ( byte rgbIn, uint pcbOut, byte &rawData ) : uint

Send ROP request through MAPI over HTTP

MapiHttpAdapter ( ITestSite site ) : System

Initializes a new instance of the MapiHttpAdapter class.

NotificationWaitCall ( IRequestBody requestBody ) : NotificationWaitSuccessResponseBody

The method to send NotificationWait request to the server.

ReadHttpResponse ( HttpWebResponse response ) : byte[]

The method gets the binary data from the response data.

SendMAPIHttpRequest ( ITestSite site, string mailStoreUrl, string userName, string domain, string password, IRequestBody requestBody, string requestType, CookieCollection cookies ) : HttpWebResponse

The method to send MAPIHTTP request to the server.

Method Details

Connect() public method

The private method to connect the exchange server through MAPIHTTP transport.
public Connect ( string mailStoreUrl, string domain, string userName, string userDN, string password ) : uint
mailStoreUrl string The mail store Url.
domain string The domain the server is deployed.
userName string The domain account name
userDN string User's distinguished name (DN).
password string user Password.
return uint

Disconnect() public method

This method sends the disconnect request through MAPIHTTP transport to the server.
public Disconnect ( ) : uint
return uint

Execute() public method

Send ROP request through MAPI over HTTP
public Execute ( byte rgbIn, uint pcbOut, byte &rawData ) : uint
rgbIn byte ROP request buffer.
pcbOut uint The maximum size of the rgbOut buffer to place response in.
rawData byte The response payload bytes.
return uint

MapiHttpAdapter() public method

Initializes a new instance of the MapiHttpAdapter class.
public MapiHttpAdapter ( ITestSite site ) : System
site ITestSite site used to write log to log files
return System

NotificationWaitCall() public method

The method to send NotificationWait request to the server.
public NotificationWaitCall ( IRequestBody requestBody ) : NotificationWaitSuccessResponseBody
requestBody IRequestBody The NotificationWait request body.
return NotificationWaitSuccessResponseBody

ReadHttpResponse() public static method

The method gets the binary data from the response data.
public static ReadHttpResponse ( HttpWebResponse response ) : byte[]
response System.Net.HttpWebResponse The structure of the response data.
return byte[]

SendMAPIHttpRequest() public static method

The method to send MAPIHTTP request to the server.
public static SendMAPIHttpRequest ( ITestSite site, string mailStoreUrl, string userName, string domain, string password, IRequestBody requestBody, string requestType, CookieCollection cookies ) : HttpWebResponse
site ITestSite An instance of interface ITestSite which provides logging, assertions, /// and adapters for test code onto its execution context.
mailStoreUrl string Mail store url.
userName string The user which connects the server.
domain string The domain of the user.
password string The password for the user.
requestBody IRequestBody The MAPIHTTP request body.
requestType string The MAPIHTTP request type.
cookies System.Net.CookieCollection Cookie container for client.
return System.Net.HttpWebResponse