Class AttributedComponentProvider

Provides components that are defined in a ComponentAttribute.

Inheritance
System.Object
AttributedComponentProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.ViewComposition
Assembly: EPiServer.Shell.dll
Version: 10.10.4
Syntax
[ComponentProvider]
public class AttributedComponentProvider : IComponentProvider, ISortable

Constructors

AttributedComponentProvider(ITypeScannerLookup)

Initializes a new instance of the AttributedComponentProvider class.

Declaration
public AttributedComponentProvider(ITypeScannerLookup typeLookup)
Parameters
Type Name Description
ITypeScannerLookup typeLookup

The type repository providing types scanned for attributes.

Properties

SortOrder

Used to select the order of execution of the IComponentProviders.

Declaration
public int SortOrder { get; }
Property Value
Type Description
System.Int32

AttributedComponentProvider has a sort order of 150.

Methods

CreateComponent(IComponentDefinition)

Try creating a component instance corresponding to an IComponentDefinition.

Declaration
public IComponent CreateComponent(IComponentDefinition definition)
Parameters
Type Name Description
IComponentDefinition definition

The component definition to create a component for.

Returns
Type Description
IComponent

A component instance if the definition is provided by this provider; otherwise null

GetComponentDefinitions()

Returns all components provided by this provider.

Declaration
public IEnumerable<IComponentDefinition> GetComponentDefinitions()
Returns
Type Description
System.Collections.Generic.IEnumerable<IComponentDefinition>

Implements

Extension Methods