コード例 #1
0
        public async override Task ExecutePageHierarchyAsync()
        {
            // Push the current pagestart on the stack.
            TemplateStack.Push(Context, this);
            try
            {
                // Execute the developer-written code of the InitPage
                var task = ExecuteAsync();
                if (task != null)
                {
                    await task.ConfigureAwait(false);
                }
                else
                {
                    Execute();
                }

                // If the child page wasn't explicitly run by the developer of the InitPage, then run it now.
                // The child page is either the next InitPage, or the final WebPage.
                if (!RunPageCalled)
                {
                    await RunPageAsync().ConfigureAwait(false);
                }
            }
            finally
            {
                TemplateStack.Pop(Context);
            }
        }
コード例 #2
0
        public override void ExecutePageHierarchy()
        {
            PreparePageHierarchy();

            TemplateStack.Push(Context, this);
            try
            {
                // Execute the developer-written code of the WebPage
                ExecutePage();
            }
            finally
            {
                TemplateStack.Pop(Context);
            }
        }
コード例 #3
0
        public override void ExecutePageHierarchy()
        {
            // Unlike InitPages, for a WebPage there is no hierarchy - it is always
            // the last file to execute in the chain. There can still be layout pages
            // and partial pages, but they are never part of the hierarchy.

            TemplateStack.Push(Context, this);
            try
            {
                // Execute the developer-written code of the WebPage
                Execute();
            }
            finally
            {
                TemplateStack.Pop(Context);
            }
        }
コード例 #4
0
        public override void ExecutePageHierarchy()
        {
            // Push the current pagestart on the stack.
            TemplateStack.Push(Context, this);
            try {
                // Execute the developer-written code of the InitPage
                Execute();

                // If the child page wasn't explicitly run by the developer of the InitPage, then run it now.
                // The child page is either the next InitPage, or the final WebPage.
                if (!RunPageCalled)
                {
                    RunPage();
                }
            }
            finally {
                TemplateStack.Pop(Context);
            }
        }
コード例 #5
0
ファイル: WebPageBase.cs プロジェクト: emacslisp/cs
        public override void ExecutePageHierarchy()
        {
            // Unlike InitPages, for a WebPage there is no hierarchy - it is always
            // the last file to execute in the chain. There can still be layout pages
            // and partial pages, but they are never part of the hierarchy.

            // (add server header for falcon debugging)
            // call to MapPath() is expensive. If we are not emiting source files to header,
            // don't bother to populate the SourceFiles collection. This saves perf significantly.
            if (WebPageHttpHandler.ShouldGenerateSourceHeader(Context))
            {
                try
                {
                    string vp = VirtualPath;
                    if (vp != null)
                    {
                        string path = Context.Request.MapPath(vp);
                        if (!path.IsEmpty())
                        {
                            PageContext.SourceFiles.Add(path);
                        }
                    }
                }
                catch
                {
                    // we really don't care if this ever fails, so we swallow all exceptions
                }
            }

            TemplateStack.Push(Context, this);
            try
            {
                // Execute the developer-written code of the WebPage
                Execute();
            }
            finally
            {
                TemplateStack.Pop(Context);
            }
        }
コード例 #6
0
        public async override Task ExecutePageHierarchyAsync()
        {
            PreparePageHierarchy();

            TemplateStack.Push(Context, this);
            try
            {
                // Execute the developer-written code of the WebPage
                var task = ExecuteAsync();
                if (task != null)
                {
                    await task.ConfigureAwait(false);
                }
                else
                {
                    Execute();
                }
            }
            finally
            {
                TemplateStack.Pop(Context);
            }
        }