Пример #1
0
        private async Task RenderPageCoreAsync(ITemplatePage page, PageContext context)
        {
            page.PageContext = context;
            page.IncludeFunc = async(key, model) =>
            {
                ITemplatePage template = await _engine.CompileTemplateAsync(key);

                await _engine.RenderTemplateAsync(template, model, model?.GetType(), context.Writer, context.ViewBag);
            };

            //_pageActivator.Activate(page, context);

            await page.ExecuteAsync().ConfigureAwait(false);
        }