Ejemplo n.º 1
0
        public async Task OnGetAsync()
        {
            DynamicCodeRoot dynCode = null;// _sxcMvc.CreateDynCode(TestIds.Blog, null);

            var path = $"/{MvcConstants.WwwRoot}2sxc/Blog App/_1 Main blog view.cshtml";

            InnerRender = await _renderer.RenderToStringAsync(
                path,
                new ContactForm
            {
                Email    = "something@somewhere",
                Message  = "Hello message!",
                Name     = "The Dude",
                Priority = Priority.Medium,
                Subject  = "This is the subject"
            }, rzv =>
            {
                if (rzv.RazorPage is ISxcRazorComponent asSxc)
                {
                    asSxc.DynCode = dynCode;
                    //asSxc.VirtualPath = path;
                    asSxc.Purpose = Purpose.WebView;
                }
            });
        }
Ejemplo n.º 2
0
 private void InitDataHelper() => _data = Factory.Resolve <DynamicCodeRoot>().Init(Block, 9, Log);
Ejemplo n.º 3
0
 private void InitDataHelper() => _data = _dynCodeRootLazy.Value.Init(Block, Log, 9);
Ejemplo n.º 4
0
 private void InitDataHelper()
 {
     _data = Factory.Resolve <IWebFactoryTemp>().AppAndDataHelpers(BlockBuilder);
 }