Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class DefaultMvcContentRenderer

Renders a block using the TemplateResolver.

Inheritance
System.Object
DefaultMvcContentRenderer
Implements
Namespace: EPiServer.Cms.AspNetCore.Mvc.Internal
Assembly: EPiServer.Cms.AspNetCore.Mvc.dll
Version: 12.0.3
Syntax
public class DefaultMvcContentRenderer : Object, IContentRenderer

Constructors

DefaultMvcContentRenderer(DisplayOptions, ICompositeViewEngine, IServiceProvider, IViewComponentInvokerFactory, IContextModeResolver, LocalizationService)

Initializes a new instance of the DefaultMvcContentRenderer class.

Declaration
public DefaultMvcContentRenderer(DisplayOptions displayOptions, ICompositeViewEngine viewEngine, IServiceProvider serviceProvider, IViewComponentInvokerFactory viewComponentInvokerFactory, IContextModeResolver contextModeResolver, LocalizationService localizationService)
Parameters
Type Name Description
DisplayOptions displayOptions
Microsoft.AspNetCore.Mvc.ViewEngines.ICompositeViewEngine viewEngine
System.IServiceProvider serviceProvider
Microsoft.AspNetCore.Mvc.ViewComponents.IViewComponentInvokerFactory viewComponentInvokerFactory
IContextModeResolver contextModeResolver
LocalizationService localizationService

Methods

RenderAsync(IHtmlHelper, IContentData, TemplateModel)

Renders the content given by contentData using the Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper.ViewContext.

Both partial controllers and partial views can be rendered.

Declaration
public Task RenderAsync(IHtmlHelper helper, IContentData contentData, TemplateModel templateModel)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper

The helper.

IContentData contentData

The content data.

TemplateModel templateModel

The template model.

Returns
Type Description
System.Threading.Tasks.Task

Implements

Extension Methods