Beispiel #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;
                }
            });
        }
Beispiel #2
0
 private void InitDataHelper() => _data = Factory.Resolve <DynamicCodeRoot>().Init(Block, 9, Log);
Beispiel #3
0
 private void InitDataHelper() => _data = _dynCodeRootLazy.Value.Init(Block, Log, 9);
Beispiel #4
0
 private void InitDataHelper()
 {
     _data = Factory.Resolve <IWebFactoryTemp>().AppAndDataHelpers(BlockBuilder);
 }