Beispiel #1
0
 internal static void GetHttpWebResponse(InvalidOperationException exception, ref HttpWebResponse response)
 {
     if (null == response)
     {
         WebException webexception = (exception as WebException);
         if (null != webexception)
         {
             response = (HttpWebResponse)webexception.Response;
         }
     }
 }
Beispiel #2
0
        internal static Dictionary<string, string> WrapResponseHeaders(HttpWebResponse response)
        {
            Dictionary<string, string> headers = new Dictionary<string, string>(EqualityComparer<string>.Default);
            if (null != response)
            {
                foreach (string name in response.Headers.AllKeys)
                {
                    headers.Add(name, response.Headers[name]);
                }
            }

            return headers;
        }
Beispiel #3
0
 public WebException(string message, Exception innerException, HttpWebResponse response)
     : base(message, innerException)
 {
     this.response = response;
 }
 internal DataServiceStreamResponse(HttpWebResponse response)
 {
     Debug.Assert(response != null, "Can't create a stream response object from a null response.");
     this.response = response;
 }
 private void SetHttpWebResponse(HttpWebResponse webResponse)
 {
     Debug.Assert(webResponse != null, "Can't set a null response.");
     this.response = webResponse;
 }