System Library Common Episerver
Search Results for

    DocFx,SystemLibrary.Common.Episerver.Properties.MessageConfig,SystemLibrary.Common.Episerver.Properties.MessageEditorDescriptor,SystemLibrary.Common.Episerver.Properties.MessageProperty,SystemLibrary.Common.Episerver.Properties.MessageController,SystemLibrary.Common.Episerver.Attributes.BoxSelectionController,SystemLibrary.Common.Episerver.Attributes.BoxSelectionFactory,SystemLibrary.Common.Episerver.Attributes.JsonEditController,SystemLibrary.Common.Episerver.Attributes.JsonEditFactory,SystemLibrary.Common.Episerver.Descriptors.HideCategoryListDescriptor,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceController,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceEditorDescriptor,SystemLibrary.Common.Episerver.Properties.ParentLinkReferenceProperty,SystemLibrary.Common.Episerver.Attributes.MultiDropdownSelectionController,SystemLibrary.Common.Episerver.Attributes.MultiDropdownSelectionFactory,SystemLibrary.Common.Episerver.Initialize.RemoveSuggestedContentTypes,SystemLibrary.Common.Episerver.Extensions.CommonEpiserverApplicationServicesOptions,SystemLibrary.Common.Episerver.Extensions.CommonEpiserverApplicationBuilderOptions,SystemLibrary.Common.Episerver.EditController,SystemLibrary.Common.Episerver.Abstract.BaseController,SystemLibrary.Common.Episerver.Abstract.BaseMultiSelectionFactory,SystemLibrary.Common.Episerver.ConnectionStringsConfig,SystemLibrary.Common.Episerver.PropertiesConfig,SystemLibrary.Common.Episerver.EditConfig,SystemLibrary.Common.Episerver.Properties.MessageConfig,SystemLibrary.Common.Episerver.FontAwesome,SystemLibrary.Common.Episerver.AppSettings.Configuration,SystemLibrary.Common.Episerver.Attributes.ParentLinkReferenceFactory,SystemLibrary.Common.Episerver.Abstract.InternalBaseController,WebApplicationInitializer
    Show / Hide Table of Contents
    NamespaceSystemLibrary.Common.Episerver.Components SystemLibrary.Common.Episerver.dll

    AsyncComponent<T>

    public abstract class AsyncComponent<T> : AsyncBlockComponent<T>, IRenderTemplate<T>, IRenderTemplate where T : BlockData

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ViewComponent
    EPiServer.Web.Mvc.AsyncPartialContentComponent<T>
    EPiServer.Web.Mvc.AsyncBlockComponent<T>
    AsyncComponent<T>
    _DefaultBlockComponent
    Implements
    EPiServer.Web.IRenderTemplate<T>
    EPiServer.Web.IRenderTemplate
    Inherited Members
    EPiServer.Web.Mvc.AsyncPartialContentComponent<T>.InvokeAsync(T)
    EPiServer.Web.Mvc.AsyncPartialContentComponent<T>.InvokeComponentAsync(T)
    Microsoft.AspNetCore.Mvc.ViewComponent.Content(System.String)
    Microsoft.AspNetCore.Mvc.ViewComponent.View()
    Microsoft.AspNetCore.Mvc.ViewComponent.View(System.String)
    Microsoft.AspNetCore.Mvc.ViewComponent.View<TModel>(TModel)
    Microsoft.AspNetCore.Mvc.ViewComponent.View<TModel>(System.String, TModel)
    Microsoft.AspNetCore.Mvc.ViewComponent.HttpContext
    Microsoft.AspNetCore.Mvc.ViewComponent.Request
    Microsoft.AspNetCore.Mvc.ViewComponent.User
    Microsoft.AspNetCore.Mvc.ViewComponent.UserClaimsPrincipal
    Microsoft.AspNetCore.Mvc.ViewComponent.RouteData
    Microsoft.AspNetCore.Mvc.ViewComponent.ViewBag
    Microsoft.AspNetCore.Mvc.ViewComponent.ModelState
    Microsoft.AspNetCore.Mvc.ViewComponent.Url
    Microsoft.AspNetCore.Mvc.ViewComponent.ViewComponentContext
    Microsoft.AspNetCore.Mvc.ViewComponent.ViewContext
    Microsoft.AspNetCore.Mvc.ViewComponent.ViewData
    Microsoft.AspNetCore.Mvc.ViewComponent.TempData
    Microsoft.AspNetCore.Mvc.ViewComponent.ViewEngine
    Type Parameters
    Name Description
    T
    Examples
    Arguments
    X
    Generic types
    Name Description
    T

    Methods

    Returns a react rendered view component

    Assumes no cshtml files as it the engine returns HTML generated by the react component

    Remarks
    X

    Assumes by default that all frontend react components is registered under DOM variable "window.reactComponents."

    View Source

    protected IViewComponentResult ReactServerSideResult(object model, object additionalProps = null, bool camelCaseProps = false, bool renderClientOnly = false, bool renderServerOnly = false, string tagName = "div", string cssClass = null, string id = null, string componentFullName = null, bool printNullValues = true)

    X
    Methods arguments
    Type Name Description
    System.Object model
    System.Object additionalProps
    System.Boolean camelCaseProps
    System.Boolean renderClientOnly
    System.Boolean renderServerOnly
    System.String tagName
    System.String cssClass
    System.String id
    System.String componentFullName
    System.Boolean printNullValues
    X
    Type Description
    Microsoft.AspNetCore.Mvc.IViewComponentResult

    Returns a react rendered view component

    Assumes no cshtml files as it the engine returns HTML generated by the react component

    Remarks
    X

    Assumes by default that all frontend react components is registered under DOM variable "window.reactComponents."

    Use the 'componentFullName' if your react components live elsewhere

    Use 'additionalProps' as a mean to add more properties without extending 'model'

    Use 'additionalProps' as a mean to render a content area and its children as 'json object' instead of invoking the render method on the component. Supports up to a depth of 12 nested blocks

    View Source

    protected async Task<IViewComponentResult> ReactServerSideResultAsync(object model, object additionalProps = null, bool camelCaseProps = false, bool renderClientOnly = false, bool renderServerOnly = false, string tagName = "div", string cssClass = null, string id = null, string componentFullName = null, bool printNullValues = true)

    X
    return await ReactServerSideResultAsync(currentBlock, new {
        ContentAreaProperty = currentBlock.ContentAreaProperty.SelectFiltered<ButtonBlock>(),
    },
    : true);
    X
    Methods arguments
    Type Name Description
    System.Object model

    Current block or view model you want as props to your component

    System.Object additionalProps

    Add additional props without extending 'model'. Tip, want content area rendered as 'json object' instead of pre-rendered as a string? Use .SelectFiltered on the ContentArea and add the same name here

    System.Boolean camelCaseProps

    Force all properties to be camel cased

    System.Boolean renderClientOnly

    Render client only, will only render an empty div placeholder for the component

    System.Boolean renderServerOnly

    Render server only will not render the json props in hidden inputs

    System.String tagName
    System.String cssClass
    System.String id
    System.String componentFullName

    Specify the full component name if you do not use the default naming conventions

    System.Boolean printNullValues

    Print properties that are null, or skip printing them, you will then receive undefined

    X
    Type Description
    Task<Microsoft.AspNetCore.Mvc.IViewComponentResult>

    Returns a view component (file, cshtml) based on standards

    Assumes ~/Content/Components/Car/Index.cshtml structure

    Fallback to ~/Content/Blocks/CarBlock/Index.cshtml if component contains "Block" in its type name (epi 11 compatibility...)

    View Source

    protected IViewComponentResult Result(object component, string viewName = "Index.cshtml")

    X
    Methods arguments
    Type Name Description
    System.Object component
    System.String viewName
    X
    Type Description
    Microsoft.AspNetCore.Mvc.IViewComponentResult

    Return view component (view file) based on input

    Returns a view component (file, cshtml) based on standards

    Assumes ~/Content/Components/Car/Index.cshtml structure

    Fallback to ~/Content/Blocks/CarBlock/Index.cshtml if component contains "Block" in its type name (epi 11 compatibility...)

    View Source

    protected async Task<IViewComponentResult> ResultAsync(object component, string viewName = "Index.cshtml")

    X
    Methods arguments
    Type Name Description
    System.Object component
    System.String viewName
    X
    Type Description
    Task<Microsoft.AspNetCore.Mvc.IViewComponentResult>

    Return view component (view file) based on input

    Implements

    EPiServer.Web.IRenderTemplate<TModel>
    EPiServer.Web.IRenderTemplate

    Extension Methods

    TExtensions.ReactServerSideRender<T>(T, Object, String, Boolean, String, String, String, Boolean, Boolean, Boolean)

    }

    • View Source
    In This Article
    Package: nuget
    Source: github
    Website: System Library Common Episerver