Beispiel #1
0
        //============================================================ Interface

        public static void Preload()
        {
            if (!Repository.WarmupEnabled)
            {
                Logger.WriteInformation(Logger.EventId.NotDefined, "***** Warmup is not enabled, skipped.");
                return;
            }

            //types
            ThreadPool.QueueUserWorkItem(delegate { PreloadTypes(); });

            //template replacers and resolvers
            ThreadPool.QueueUserWorkItem(delegate { TemplateManager.Init(); });
            ThreadPool.QueueUserWorkItem(delegate { NodeQuery.InitTemplateResolvers(); });

            //jscript evaluator
            ThreadPool.QueueUserWorkItem(delegate { JscriptEvaluator.Init(); });

            //xslt
            ThreadPool.QueueUserWorkItem(delegate { PreloadXslt(); });

            //content templates
            ThreadPool.QueueUserWorkItem(delegate { PreloadContentTemplates(); });

            //preload controls
            ThreadPool.QueueUserWorkItem(delegate { PreloadControls(); });

            //preload security items
            ThreadPool.QueueUserWorkItem(delegate { PreloadSecurity(); });
        }
Beispiel #2
0
        // ============================================================ Interface

        public static void Preload()
        {
            if (!SystemStart.WarmupEnabled)
            {
                SnLog.WriteInformation("***** Warmup is not enabled, skipped.");
                return;
            }

            // types
            ThreadPool.QueueUserWorkItem(delegate { PreloadTypes(); });

            // template replacers and resolvers
            ThreadPool.QueueUserWorkItem(delegate { TemplateManager.Init(); });

            // jscript evaluator
            ThreadPool.QueueUserWorkItem(delegate { JscriptEvaluator.Init(); });

            // xslt
            ThreadPool.QueueUserWorkItem(delegate { PreloadXslt(); });

            // content templates
            ThreadPool.QueueUserWorkItem(delegate { PreloadContentTemplates(); });

            // preload controls
            ThreadPool.QueueUserWorkItem(delegate { PreloadControls(); });

            // preload security items
            ThreadPool.QueueUserWorkItem(delegate { PreloadSecurity(); });
        }