Beispiel #1
0
 private string GetStringFrom(HttpWebResponse response)
 {
     var adapter = new WebResponseAdapter(response);
     var depresser = new StreamDepresser(adapter);
     using (var stream = depresser.Depress())
     {
         return htmlConverter.Convert(stream, adapter.CharacterSet);
     }
 }
Beispiel #2
0
        private string GetStringFrom(HttpWebResponse response)
        {
            var webResponseAdapter = new WebResponseAdapter(response);
            var streamDepresser    = new StreamDepresser(webResponseAdapter);

            using (var depressedStream = streamDepresser.Depress())
            {
                var pageContent = htmlConverter.Convert(depressedStream, webResponseAdapter.CharacterSet);
                return(pageContent);
            }
        }