SaaS CMS has officially launched! Learn more now.

Class PartialContentComponent<TContentData>

Provides the base implementation for synchronous partial content components.

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

The type of the content data.

Constructors

PartialContentComponent()

Declaration
protected PartialContentComponent()

Methods

Invoke(TContentData)

Mandatory method for synchronous view components. Will call method InvokeComponent(TContentData)

Declaration
public IViewComponentResult Invoke(TContentData currentContent)
Parameters
Type Name Description
TContentData currentContent

The current content instance.

Returns
Type Description
Microsoft.AspNetCore.Mvc.IViewComponentResult

Content from the view

InvokeComponent(TContentData)

Method that component should implement to render currentContent

Declaration
protected abstract IViewComponentResult InvokeComponent(TContentData currentContent)
Parameters
Type Name Description
TContentData currentContent

The current content instance.

Returns
Type Description
Microsoft.AspNetCore.Mvc.IViewComponentResult

The result from the component

Implements

Extension Methods