/// <exception cref="ArgumentNullException"><paramref name="infoNode"/> is <see langword="null" />.</exception> public CourseInfo ParseCourseInfo(INode infoNode) { if (infoNode == null) { throw new ArgumentNullException("infoNode"); } var description = infoNode.GetAttributeValue(Constants.CourseDescriptionAttribute); var relativeUrl = infoNode.GetAttributeValue(Constants.CourseUrlAttribute); var amendedUrl = AmendCourseUrl(relativeUrl); var courseUri = new Uri(_host, amendedUrl); var courseInfo = new CourseInfo { Name = HttpUtility.HtmlDecode(infoNode.InnerText), Description = HttpUtility.HtmlDecode(description), SiteUrl = courseUri.ToString(), UrlName = courseUri.Segments.Last() }; return(courseInfo); }
/// <exception cref="ArgumentNullException"><paramref name="infoNode"/> is <see langword="null" />.</exception> public CourseInfo ParseCourseInfo(INode infoNode) { if (infoNode == null) throw new ArgumentNullException("infoNode"); var description = infoNode.GetAttributeValue(Constants.CourseDescriptionAttribute); var relativeUrl = infoNode.GetAttributeValue(Constants.CourseUrlAttribute); var amendedUrl = AmendCourseUrl(relativeUrl); var courseUri = new Uri(_host, amendedUrl); var courseInfo = new CourseInfo { Name = HttpUtility.HtmlDecode(infoNode.InnerText), Description = HttpUtility.HtmlDecode(description), SiteUrl = courseUri.ToString(), UrlName = courseUri.Segments.Last() }; return courseInfo; }