Class ComponentRendererDescriptor

Version: 21.x

Service descriptor for a IComponentRenderer.

Inheritance
System.Object
ComponentRendererDescriptor
Namespace: Sitecore.AspNet.RenderingEngine.Rendering
Assembly: Sitecore.AspNet.RenderingEngine.Abstractions.dll
Syntax
RequestResponse
public class ComponentRendererDescriptor : Object

Constructors

ComponentRendererDescriptor(Predicate<String>, Func<IServiceProvider, IComponentRenderer>)

Initializes a new instance of the ComponentRendererDescriptor class.

Declaration
RequestResponse
public ComponentRendererDescriptor(Predicate<string> match, Func<IServiceProvider, IComponentRenderer> factory)
Parameters
TypeNameDescription
System.Predicate<System.String>match

The predicate to use when retrieving a IComponentRenderer.

System.Func<System.IServiceProvider, IComponentRenderer>factory

The factory method to create a new instance of the IComponentRenderer.

Properties

Match

Gets a predicate used for matching Sitecore layout components.

Declaration
RequestResponse
public Predicate<string> Match { get; }
Property Value
TypeDescription
System.Predicate<System.String>

Methods

GetOrCreate(IServiceProvider)

Gets an instance of an IComponentRenderer, creating one if it has not yet been instantiated.

Declaration
RequestResponse
public IComponentRenderer GetOrCreate(IServiceProvider services)
Parameters
TypeNameDescription
System.IServiceProviderservices

The System.IServiceProvider.

Returns
TypeDescription
IComponentRenderer

An instance of an IComponentRenderer.

Do you have some feedback for us?

If you have suggestions for improving this article,