Class SharedBlockFactory
Default implementaion of ISharedBlockFactory.
Inheritance
System.Object
    SharedBlockFactory
  Implements
Namespace: EPiServer.Construction.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class SharedBlockFactory : Object, ISharedBlockFactoryConstructors
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 | 
