include Encoding in Article POCO
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReadSharp
|
||||
{
|
||||
@@ -63,5 +64,13 @@ namespace ReadSharp
|
||||
/// The next page URL.
|
||||
/// </value>
|
||||
public Uri NextPage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the encoding of the article.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The encoding.
|
||||
/// </value>
|
||||
public Encoding Encoding { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -177,7 +177,8 @@ namespace ReadSharp
|
||||
FrontImage = transcodingResult.ExtractedImage,
|
||||
Images = images,
|
||||
Favicon = transcodingResult.ExtractedFavicon,
|
||||
NextPage = transcodingResult.NextPageUrl != null ? new Uri(transcodingResult.NextPageUrl, UriKind.Absolute) : null
|
||||
NextPage = transcodingResult.NextPageUrl != null ? new Uri(transcodingResult.NextPageUrl, UriKind.Absolute) : null,
|
||||
Encoding = _encoder.GetEncodingFromString(response.Charset) ?? encoding ?? null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user