Example #1
0
        public static RazorHost CreateFromAnother(System.Web.WebPages.Razor.WebPageRazorHost host)
        {
            var newHost = new RazorHost(host.VirtualPath, host.PhysicalPath);                         //

            newHost.DefaultBaseClass           = typeof(TraceViewPage <>).FullName.Replace("`1", ""); //
            newHost.DefaultClassName           = host.DefaultClassName;
            newHost.DefaultDebugCompilation    = host.DefaultDebugCompilation;
            newHost.DefaultPageBaseClass       = typeof(TraceViewPage <>).FullName.Replace("`1", "");
            newHost.DesignTimeMode             = host.DesignTimeMode;
            newHost.EnableInstrumentation      = host.EnableInstrumentation;
            newHost.GeneratedClassContext      = host.GeneratedClassContext;
            newHost.InstrumentedSourceFilePath = host.InstrumentedSourceFilePath;
            newHost.IsIndentingWithTabs        = host.IsIndentingWithTabs;
            newHost.TabSize = host.TabSize;

            foreach (string current in host.NamespaceImports)
            {
                newHost.NamespaceImports.Add(current);
            }

            return(newHost);
        }
Example #2
0
 public CompilingPathEventArgs(string virtualPath, System.Web.WebPages.Razor.WebPageRazorHost host)
 {
 }
Example #3
0
 public static void ApplyConfigurationToHost(System.Web.WebPages.Razor.Configuration.RazorPagesSection config, System.Web.WebPages.Razor.WebPageRazorHost host)
 {
 }