private PageContext OnChildPageContextRequest( PagePosition pagePosition, Func <PageNumber, IPage> pageFactory) { var nextPosition = pagePosition.Next(); var context = this.CreateContextForPagePosition(nextPosition, Rectangle.Empty, 0, pageFactory); return(context); }
private PageContext GetOrCreateNextPageContext(PagePosition currentPagePosition) { var nextPageContext = _pageContexts.FirstOrDefault(pc => pc.PagePosition == currentPagePosition.Next()); if (nextPageContext != null) { return(nextPageContext); } nextPageContext = this.PageContextFactory(currentPagePosition); _pageContexts.Add(nextPageContext); return(nextPageContext); }