Skip to content

Commit 5f5387d

Browse files
Merge branch 'feature/Misc_release_2_changes' into develop
2 parents 9f17495 + d2efe94 commit 5f5387d

16 files changed

+318
-341
lines changed

NScrape/BinaryWebResponse.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ namespace NScrape {
55
/// Represents a web response for a request that returned binary data.
66
/// </summary>
77
public class BinaryWebResponse : WebResponse {
8-
/// <summary>
9-
/// Initializes a new instance of the <see cref="BinaryWebResponse"/> class.
10-
/// </summary>
11-
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
12-
/// <param name="url">The URL of the response.</param>
13-
/// <param name="data">The data that was returned by the web server.</param>
14-
public BinaryWebResponse( bool success, Uri url, byte[] data )
15-
: base( url, WebResponseType.Binary, success ) {
16-
this.Data = data;
8+
/// <summary>
9+
/// Initializes a new instance of the <see cref="BinaryWebResponse"/> class.
10+
/// </summary>
11+
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
12+
/// <param name="responseUrl">The URL of the response.</param>
13+
/// <param name="data">The data that was returned by the web server.</param>
14+
public BinaryWebResponse( bool success, Uri responseUrl, byte[] data )
15+
: base( success, responseUrl, WebResponseType.Binary ) {
16+
Data = data;
1717
}
1818

1919
/// <summary>

NScrape/ExceptionWebResponse.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace NScrape {
88
public class ExceptionWebResponse : WebResponse {
99
private readonly WebException exception;
1010

11-
/// <summary>
12-
/// Initializes a new instance of the <see cref="ExceptionWebResponse"/> class.
13-
/// </summary>
14-
/// <param name="exception">The exception of the response.</param>
15-
/// <param name="responseUrl">The URL of the response.</param>
16-
public ExceptionWebResponse( WebException exception, Uri responseUrl )
17-
: base( responseUrl, WebResponseType.Exception, false ) {
11+
/// <summary>
12+
/// Initializes a new instance of the <see cref="ExceptionWebResponse"/> class.
13+
/// </summary>
14+
/// <param name="responseUrl">The URL of the response.</param>
15+
/// <param name="exception">The exception of the response.</param>
16+
public ExceptionWebResponse( Uri responseUrl, WebException exception )
17+
: base( false, responseUrl, WebResponseType.Exception ) {
1818
this.exception = exception;
1919
}
2020

NScrape/HtmlWebResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ public class HtmlWebResponse : TextWebResponse {
1212
/// </summary>
1313
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
1414
/// <param name="responseUrl">The URL of the response.</param>
15-
/// <param name="html">The HTML text of the response.</param>
15+
/// <param name="htmlText">The HTML text of the response.</param>
1616
/// <param name="encoding">The encoding of the HTML text.</param>
17-
public HtmlWebResponse( bool success, Uri responseUrl, string html, Encoding encoding )
18-
: base( responseUrl, WebResponseType.Html, success, html, encoding ) {
17+
public HtmlWebResponse( bool success, Uri responseUrl, string htmlText, Encoding encoding )
18+
: base( success, responseUrl, WebResponseType.Html, htmlText, encoding ) {
1919
}
2020

2121
/// <summary>

NScrape/IWebClient.cs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
11
using System;
22
using System.Net;
33

4-
namespace NScrape
5-
{
6-
/// <summary>
7-
/// Represents a web client that handles cookies and redirection.
8-
/// </summary>
9-
public interface IWebClient
10-
{
11-
/// <include file='IWebClient.xml' path='/IWebClient/AddingCookie/*'/>
4+
namespace NScrape {
5+
/// <summary>
6+
/// Represents a web client that handles cookies and redirection.
7+
/// </summary>
8+
public interface IWebClient {
9+
/// <include file='IWebClient.xml' path='/IWebClient/AddingCookie/*'/>
1210
event EventHandler<AddingCookieEventArgs> AddingCookie;
1311

14-
/// <include file='IWebClient.xml' path='/IWebClient/SendingRequest/*'/>
15-
event EventHandler<SendingRequestEventArgs> SendingRequest;
12+
/// <include file='IWebClient.xml' path='/IWebClient/SendingRequest/*'/>
13+
event EventHandler<SendingRequestEventArgs> SendingRequest;
1614

17-
/// <include file='IWebClient.xml' path='/IWebClient/ProcessingResponse/*'/>
18-
event EventHandler<ProcessingResponseEventArgs> ProcessingResponse;
15+
/// <include file='IWebClient.xml' path='/IWebClient/ProcessingResponse/*'/>
16+
event EventHandler<ProcessingResponseEventArgs> ProcessingResponse;
1917

20-
/// <include file='IWebClient.xml' path='/IWebClient/CookieJar/*'/>
21-
CookieContainer CookieJar { get; }
18+
/// <include file='IWebClient.xml' path='/IWebClient/CookieJar/*'/>
19+
CookieContainer CookieJar { get; }
2220

2321
/// <include file='IWebClient.xml' path='/IWebClient/SendRequest_Uri/*'/>
24-
WebResponse SendRequest(Uri destination);
22+
WebResponse SendRequest( Uri destination );
2523
/// <include file='IWebClient.xml' path='/IWebClient/SendRequest_Uri_bool/*'/>
26-
WebResponse SendRequest(Uri destination, bool autoRedirect);
24+
WebResponse SendRequest( Uri destination, bool autoRedirect );
2725

2826
/// <include file='IWebClient.xml' path='/IWebClient/SendRequest_Uri_string/*'/>
29-
WebResponse SendRequest(Uri destination, string requestData);
27+
WebResponse SendRequest( Uri destination, string requestData );
3028

3129
/// <include file='IWebClient.xml' path='/IWebClient/SendRequest_Uri_string_bool/*'/>
32-
WebResponse SendRequest(Uri destination, string requestData, bool autoRedirect);
30+
WebResponse SendRequest( Uri destination, string requestData, bool autoRedirect );
3331

3432
/// <include file='IWebClient.xml' path='/IWebClient/SendRequest_WebRequest/*'/>
35-
WebResponse SendRequest(WebRequest webRequest);
33+
WebResponse SendRequest( WebRequest webRequest );
3634

3735
/// <include file='IWebClient.xml' path='/IWebClient/UserAgent/*'/>
38-
string UserAgent { get; set; }
39-
}
36+
string UserAgent { get; set; }
37+
}
4038
}
4139

NScrape/ImageWebResponse.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ namespace NScrape {
88
public class ImageWebResponse : WebResponse {
99
private readonly Bitmap image;
1010

11-
/// <summary>
12-
/// Initializes a new instance of the <see cref="ImageWebResponse"/> class.
13-
/// </summary>
14-
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
15-
/// <param name="responseUrl">The URL of the response.</param>
16-
/// <param name="image">The image of the response.</param>
17-
public ImageWebResponse( bool success, Uri responseUrl, Bitmap image )
18-
: base( responseUrl, WebResponseType.Image, success ) {
11+
/// <summary>
12+
/// Initializes a new instance of the <see cref="ImageWebResponse"/> class.
13+
/// </summary>
14+
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
15+
/// <param name="responseUrl">The URL of the response.</param>
16+
/// <param name="image">The image of the response.</param>
17+
public ImageWebResponse( bool success, Uri responseUrl, Bitmap image )
18+
: base( success, responseUrl, WebResponseType.Image ) {
1919
this.image = image;
2020
}
2121

NScrape/JavaScriptWebResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ public class JavaScriptWebResponse : TextWebResponse {
1212
/// </summary>
1313
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
1414
/// <param name="responseUrl">The URL of the response.</param>
15-
/// <param name="text">The JavaScript text of the response.</param>
15+
/// <param name="javaScriptText">The JavaScript text of the response.</param>
1616
/// <param name="encoding">The encoding of the JavaScript text.</param>
17-
public JavaScriptWebResponse( bool success, Uri responseUrl, string text, Encoding encoding )
18-
: base( responseUrl, WebResponseType.JavaScript, success, text, encoding ) {
17+
public JavaScriptWebResponse( bool success, Uri responseUrl, string javaScriptText, Encoding encoding )
18+
: base( success, responseUrl, WebResponseType.JavaScript, javaScriptText, encoding ) {
1919
}
2020

2121
/// <summary>

NScrape/JsonWebResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ public class JsonWebResponse : TextWebResponse {
1212
/// </summary>
1313
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
1414
/// <param name="responseUrl">The URL of the response.</param>
15-
/// <param name="text">The JSON text of the response.</param>
15+
/// <param name="jsonText">The JSON text of the response.</param>
1616
/// <param name="encoding">The encoding of the JSON text.</param>
17-
public JsonWebResponse( bool success, Uri responseUrl, string text, Encoding encoding )
18-
: base( responseUrl, WebResponseType.Json, success, text, encoding ) {
17+
public JsonWebResponse( bool success, Uri responseUrl, string jsonText, Encoding encoding )
18+
: base( success, responseUrl, WebResponseType.Json, jsonText, encoding ) {
1919
}
2020

2121
/// <summary>

NScrape/PlaintextWebResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ public class PlainTextWebResponse : TextWebResponse {
1212
/// </summary>
1313
/// <param name="success"><b>true</b> if the response is considered successful, <b>false</b> otherwise.</param>
1414
/// <param name="responseUrl">The URL of the response.</param>
15-
/// <param name="text">The plain text of the response.</param>
15+
/// <param name="plainText">The plain text of the response.</param>
1616
/// <param name="encoding">The encoding of the plain text.</param>
17-
public PlainTextWebResponse( bool success, Uri responseUrl, string text, Encoding encoding )
18-
: base( responseUrl, WebResponseType.PlainText, success, text, encoding ) {
17+
public PlainTextWebResponse( bool success, Uri responseUrl, string plainText, Encoding encoding )
18+
: base( success, responseUrl, WebResponseType.PlainText, plainText, encoding ) {
1919
}
2020

2121
/// <summary>

NScrape/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
// Build Number
3131
// Revision
3232
//
33-
[assembly: AssemblyFileVersion( "0.1.0.0" )]
34-
[assembly: AssemblyInformationalVersion( "0.1.0.0" )]
35-
[assembly: AssemblyVersion( "0.1.0.0" )]
33+
[assembly: AssemblyFileVersion( "0.2.0.0" )]
34+
[assembly: AssemblyInformationalVersion( "0.2.0.0" )]
35+
[assembly: AssemblyVersion( "0.2.0.0" )]

NScrape/RedirectedWebResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class RedirectedWebResponse : WebResponse {
1515
/// <param name="request">The original web request.</param>
1616
/// <param name="redirectUrl">The redirect URL of the response.</param>
1717
public RedirectedWebResponse( Uri responseUrl, WebRequest request, Uri redirectUrl )
18-
: base( responseUrl, WebResponseType.Redirect, true ) {
18+
: base( true, responseUrl, WebResponseType.Redirect ) {
1919
this.request = request;
2020
this.redirectUrl = redirectUrl;
2121
}

0 commit comments

Comments
 (0)