public async Task <Forum> GetForumDescriptionsFromForumPageAsync(Forum forum) { if (forum.SubForums.Count <= 0) { return(forum); } var result = await _webManager.GetDataAsync(string.Format(EndPoints.ForumPage, forum.ForumId)); var document = await _webManager.Parser.ParseAsync(result.ResultHtml); return(ForumHandler.ParseSubForumDescriptions(document, forum)); }
public async Task <Forum> GetForumDescriptionsFromForumPageAsync(Forum forum, CancellationToken token = default) { if (forum == null) { throw new ArgumentNullException(nameof(forum)); } if (forum.SubForums.Count <= 0) { return(forum); } var result = await this.webManager.GetDataAsync(string.Format(CultureInfo.InvariantCulture, EndPoints.ForumPage, forum.ForumId), token).ConfigureAwait(false); var document = await this.webManager.Parser.ParseDocumentAsync(result.ResultHtml, token).ConfigureAwait(false); return(ForumHandler.ParseSubForumDescriptions(document, forum)); }