/// <summary> /// 获取新闻评论。 /// </summary> /// <param name="newsDetail">新闻内容。</param> /// <param name="pageIndex">第几页,从 1 开始。</param> /// <param name="pageSize">每页条数。</param> /// <returns>新闻评论。</returns> /// <exception cref="ArgumentNullException">新闻内容为 null。</exception> public static async Task <IEnumerable <NewsComment> > CommentAsync(this NewsDetail newsDetail, int pageIndex, int pageSize) { if (newsDetail == null) { throw new ArgumentNullException(nameof(newsDetail)); } return(await NewsService.CommentAsync(newsDetail.Id, pageIndex, pageSize)); }