Class ComponentRendererDescriptor
Service descriptor for a IComponentRenderer.
Inheritance
System.Object
ComponentRendererDescriptor
Namespace: Sitecore.AspNet.RenderingEngine.Rendering
Assembly: Sitecore.AspNet.RenderingEngine.Abstractions.dll
Syntax
public class ComponentRendererDescriptor : Object
Constructors
ComponentRendererDescriptor(Predicate<String>, Func<IServiceProvider, IComponentRenderer>)
Initializes a new instance of the ComponentRendererDescriptor class.
Declaration
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
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
public IComponentRenderer GetOrCreate(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | services | The System.IServiceProvider. |
Returns
Type | Description |
---|---|
IComponentRenderer | An instance of an IComponentRenderer. |