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
Constructors
ComponentRendererDescriptor(Predicate, Func<IServiceProvider, IComponentRenderer>)
Initializes a new instance of the ComponentRendererDescriptor class.
Declaration
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
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
Parameters
| Type | Name | Description |
|---|---|---|
| System.IServiceProvider | services | The System.IServiceProvider. |
Returns
| Type | Description |
|---|---|
| IComponentRenderer | An instance of an IComponentRenderer. |
If you have suggestions for improving this article, let us know!