Class SharedBlockFactory

Default implementaion of ISharedBlockFactory.

Inheritance
System.Object
SharedBlockFactory
Implements
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.Construction
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(typeof(ISharedBlockFactory), Lifecycle = ServiceInstanceScope.Singleton)]
public class SharedBlockFactory : ISharedBlockFactory

Constructors

SharedBlockFactory(IContentDataBuilder, ConstructorParameterResolver, ServiceAccessor<ContentDataInterceptor>)

Initializes a new instance of the SharedBlockFactory class.

Declaration
public SharedBlockFactory(IContentDataBuilder blockDataBuilder, ConstructorParameterResolver constructorParameterResolver, ServiceAccessor<ContentDataInterceptor> contentDataInterceptorAccessor)
Parameters
Type Name Description
IContentDataBuilder blockDataBuilder

The block data builder.

ConstructorParameterResolver constructorParameterResolver

The constructor parameter resolver.

ServiceAccessor<ContentDataInterceptor> contentDataInterceptorAccessor

The content data interceptor accessor.

Methods

CreateAndPopulateSharedBlock(BlockType)

Creates a shared instance of a block of type defined by blockType.

Declaration
public virtual IContent CreateAndPopulateSharedBlock(BlockType blockType)
Parameters
Type Name Description
BlockType blockType

Type of the block.

Returns
Type Description
IContent
Remarks

This is the method used by system to create a proxy implementing IContent for a block when loading from database.

CreateSharedBlock(Type)

Creates a IContent instance by creating a proxy of passed in type (must inherit IContentData) and a MixIn class that implements IContent.

Declaration
public virtual IContent CreateSharedBlock(Type modelType)
Parameters
Type Name Description
System.Type modelType

Type of the model.

Returns
Type Description
IContent

Implements

Extension Methods