Close() public method

This method closes the WebResponse object.
public Close ( ) : void
return void
Ejemplo n.º 1
0
 /// <summary>
 /// This method closes the XmlReader member and the used <see cref="HttpClientUtil"/> instance.
 /// </summary>
 public void Dispose()
 {
     if (XmlReader != null)
     {
         XmlReader.Close();
     }
     if (_httpClientUtil != null)
     {
         _httpClientUtil.Close();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets a new XML document. 
 /// </summary>
 /// <param name="httpClientUtil">A configured <see cref="HttpClientUtil"/> instance for performing web requests</param>
 public void SetDocumentToParse(HttpClientUtil httpClientUtil)
 {
     try
     {
         InitializeXPathObjects(httpClientUtil.GetDataStream());
     }
     finally
     {
         httpClientUtil.Close();
     }
 }