SaaS CMS has officially launched! Learn more now.

Class AsyncPartialContentComponent<TContentData>

Provides the base implementation for asynchronous partial content components.

Inheritance
System.Object
AsyncPartialContentComponent<TContentData>
Implements
IRenderTemplate<TContentData>
Namespace: EPiServer.Web.Mvc
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
[VisitorGroupImpersonation]
public abstract class AsyncPartialContentComponent<TContentData> : ViewComponent, IRenderTemplate<TContentData>, IRenderTemplate where TContentData : IContentData
Type Parameters
Name Description
TContentData

The type of the content data.

Constructors

AsyncPartialContentComponent()

Declaration
protected AsyncPartialContentComponent()

Methods

InvokeAsync(TContentData)

Mandatory method for asynchronous view components. Will call method InvokeComponentAsync(TContentData)

Declaration
public Task<IViewComponentResult> InvokeAsync(TContentData currentContent)
Parameters
Type Name Description
TContentData currentContent

The current content instance.

Returns
Type Description
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IViewComponentResult>

Result from the component

InvokeComponentAsync(TContentData)

Method that component should implement to render currentContent

Declaration
protected abstract Task<IViewComponentResult> InvokeComponentAsync(TContentData currentContent)
Parameters
Type Name Description
TContentData currentContent

The current content instance.

Returns
Type Description
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IViewComponentResult>

The result from the com

Implements

Extension Methods