Exemple #1
0
    private async Task RenderPageCoreAsync(IRazorPage page, ViewContext context)
    {
        page.ViewContext = context;
        _pageActivator.Activate(page, context);

        OnAfterPageActivated?.Invoke(page, context);

        _diagnosticListener.BeforeViewPage(page, context);

        try
        {
            await page.ExecuteAsync();
        }
        finally
        {
            _diagnosticListener.AfterViewPage(page, context);
        }
    }