public virtual IEnumerable <PostModel> CreatePostModel(IEnumerable <IDOMElement> serializedData) { IEnumerable <PostModel> result = null; if (serializedData.Any()) { result = XMLGuidePostModeCreator.CreatePostModel(serializedData); } return(result); }
public async Task <IEnumerable <PostModel> > GetContent(Uri expectedUri) { var expectedPage = DefaultPageCount + (_pageOffsetCount * _pageOffsetMultiplier++); IEnumerable <PostModel> result = null; var denormalizedData = await GetResourceData(new Uri(expectedUri.AbsoluteUri.TrimEnd(new [] { '/' }) + (expectedPage > 1 ? string.Format("index/page{0}", expectedPage) : "/")), HttpMethodEnum.GET, _mainFunGetData); var serializedData = Serialize(denormalizedData); if (serializedData.Any()) { result = XMLGuidePostModeCreator.CreatePostModel(serializedData); } #if DEBUG File.WriteAllText("C:\\mainfun.html", denormalizedData.ToString()); #endif return(result); }
private IEnumerable <PostModel> SerializeContent(StringBuilder content, bool firstEnter) { #if DEBUG File.WriteAllText("C:\\pikabu.html", content.ToString()); #endif IEnumerable <PostModel> result = null; if (firstEnter) { var serializedData = Serialize(content); if (serializedData.Any()) { result = XMLGuidePostModeCreator.CreatePostModel(serializedData); } } else { } return(result); }