public override void GenerateRequest(string url, string emailAddress, Stream requestStream)
            {
                SafeXmlSerializer      safeXmlSerializer = new SafeXmlSerializer(typeof(AutoDiscoverRequestXML));
                AutoDiscoverRequestXML o = AutoDiscoverRequestXML.NewRequest(emailAddress);

                safeXmlSerializer.Serialize(requestStream, o);
            }
        private HttpWebRequest SendRequest(ICredentials credentials)
        {
            HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(this.url);

            AutoDiscoverClient.AddOutlook14Cookie(httpWebRequest);
            httpWebRequest.Method          = "POST";
            httpWebRequest.ContentType     = "text/xml; charset=utf-8";
            httpWebRequest.Credentials     = credentials;
            httpWebRequest.PreAuthenticate = true;
            httpWebRequest.Headers.Set(HttpRequestHeader.Pragma, "no-cache");
            foreach (string text in this.additionalHeaders.Keys)
            {
                httpWebRequest.Headers.Add(text, this.additionalHeaders[text]);
            }
            httpWebRequest.UserAgent = string.Format("{0}/{1}/{2}", Environment.MachineName, this.componentId, this.emailAddress);
            CertificateValidationManager.SetComponentId(httpWebRequest, this.componentId);
            this.TraceHeaders(httpWebRequest.Headers);
            using (Stream requestStream = httpWebRequest.GetRequestStream())
            {
                SafeXmlSerializer      safeXmlSerializer = new SafeXmlSerializer(typeof(AutoDiscoverRequestXML));
                AutoDiscoverRequestXML o = AutoDiscoverRequestXML.NewRequest(this.emailAddress);
                safeXmlSerializer.Serialize(requestStream, o);
            }
            return(httpWebRequest);
        }