Пример #1
0
        /// <exclude />
        public void Dispose()
        {
            PageRenderingHistory.MarkPageAsRendered(this.Page);

            _dataScope?.Dispose();

            if (PreviewMode)
            {
                PagePreviewContext.Remove(_previewKey);
            }
        }
Пример #2
0
        private static IEnumerable <KeyValuePair <Type, IDataUrlMapper> > GetDynamicMappers(IPage page)
        {
            ConcurrentDictionary <Type, IDataUrlMapper> mappers;

            PageRenderingHistory.RenderPageIfNotRendered(page);

            if (!_dynamicPageDataUrlMappers.TryGetValue(page.Id, out mappers))
            {
                return(Enumerable.Empty <KeyValuePair <Type, IDataUrlMapper> >());
            }

            return(mappers);
        }
        /// <exclude />
        public void Dispose()
        {
            PageRenderingHistory.MarkPageAsRendered(this.Page);

            _dataScope?.Dispose();

            if (PreviewMode)
            {
                var cache = HttpRuntime.Cache;

                cache.Remove(_previewKey + "_SelectedPage");
                cache.Remove(_previewKey + "_SelectedContents");
            }
        }