Пример #1
0
        private PageContext OnChildPageContextRequest(
            PagePosition pagePosition,
            Func <PageNumber, IPage> pageFactory)
        {
            var nextPosition = pagePosition.Next();
            var context      = this.CreateContextForPagePosition(nextPosition, Rectangle.Empty, 0, pageFactory);

            return(context);
        }
Пример #2
0
        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);
        }