public NotificationWaitSuccessResponseBody NotificationWaitCall(IRequestBody requestBody)
{
string requestType = "NotificationWait";
HttpWebResponse response = SendMAPIHttpRequest(this.site, this.mailStoreUrl, this.userName, this.domain, this.userPassword, requestBody, requestType, this.cookies);
NotificationWaitSuccessResponseBody result = null;
string responseCode = response.Headers["X-ResponseCode"];
byte[] rawBuffer = ReadHttpResponse(response);
response.GetResponseStream().Close();
if (int.Parse(responseCode) == 0)
{
ChunkedResponse chunkedResponse = ChunkedResponse.ParseChunkedResponse(rawBuffer);
NotificationWaitSuccessResponseBody responseSuccess = NotificationWaitSuccessResponseBody.Parse(chunkedResponse.ResponseBodyRawData);
result = responseSuccess;
}
else
{
this.site.Assert.Fail("MAPIHTTP call failed, the error code returned from server is: {0}", responseCode);
}
return result;
}