/// <summary> /// Получить URI части треда. /// </summary> /// <param name="link">Ссылка.</param> /// <param name="isReferer">Реферер.</param> /// <returns>URI.</returns> public Uri GetThreadPartUri(ThreadPartLink link, bool isReferer) { if (!isReferer) { return new Uri(BaseUri, string.Format("makaba/mobile.fcgi?task=get_thread&board={0}&thread={1}&num={2}", link.Board, link.Thread, link.FromPost)); } return GetThreadUri(link, true); }
/// <summary> /// Парсить частичные данные треда. /// </summary> /// <param name="data">Данные.</param> /// <param name="link">Ссылка.</param> /// <returns>Результат.</returns> public ThreadTreePartial ParseThreadPartial(BoardPost2[] data, ThreadPartLink link) { var threadLink = new ThreadLink() { Engine = CoreConstants.Engine.Makaba, Board = link.Board, Thread = link.Thread }; var result = new ThreadTreePartial() { Link = threadLink, Posts = data.OrderBy(p => p.Number.TryParseWithDefault()).Select(p => Parse(p, threadLink, false)).ToList(), Extensions = new List<PostTreeCollectionExtension>(), ParentLink = new BoardLink() { Engine = CoreConstants.Engine.Makaba, Board = link.Board, }, }; return result; }