Пример #1
0
        public void EnsureCompiled( RazorPage page, IHttpResponse response )
        {
            if ( page == null ) return;
            if ( page.IsValid ) return;

            var type = page.PageHost.Compile();

            page.PageType = type;

            page.IsValid = true;
        }
Пример #2
0
        protected virtual void TrackRazorPage( IVirtualFile file )
        {
            //get the base type.
            var pageBaseType = this.Config.PageBaseType;

            var transformer = new RazorViewPageTransformer( pageBaseType );

            //create a RazorPage
            var page = new RazorPage
                {
                    PageHost = new RazorPageHost( PathProvider, file, transformer, new CSharpCodeProvider(), new Dictionary<string, string>() ),
                    IsValid = false,
                    File = file
                };

            //add it to our pages dictionary.
            AddRazorPage(page);
        }
Пример #3
0
        protected virtual void AddRazorPage( RazorPage page )
        {
            var pagePath = GetDictionaryPagePath( page.PageHost.File );

            this.Pages.Add( pagePath, page );
        }