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 : ObjectConstructors
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
| Type | Name | Description |
|---|---|---|
| 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
| Type | Description |
|---|---|
| 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
| Type | Name | Description |
|---|---|---|
| System.IServiceProvider | services |
The System.IServiceProvider. |
Returns
| Type | Description |
|---|---|
| IComponentRenderer |
An instance of an IComponentRenderer. |