Class BlockTypeRepository

Repository for working with BlockType.

Inheritance
System.Object
BlockTypeRepository
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.DataAbstraction
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[Obsolete("Use IContentTypeRepository")]
[ServiceConfiguration(typeof(BlockTypeRepository))]
public class BlockTypeRepository : IContentTypeRepository<BlockType>

Constructors

BlockTypeRepository(IContentTypeRepository)

Initializes a new instance of the BlockTypeRepository class.

Declaration
public BlockTypeRepository(IContentTypeRepository contentTypeRepository)
Parameters
Type Name Description
IContentTypeRepository contentTypeRepository

The content type repository.

Methods

Copy(BlockType)

Copies the specified BlockType.

Declaration
public virtual BlockType Copy(BlockType blockType)
Parameters
Type Name Description
BlockType blockType

The block type to copy.

Returns
Type Description
BlockType

The newly created copy.

Copy(Int32)

Copies the BlockType with specified id.

Declaration
public virtual BlockType Copy(int id)
Parameters
Type Name Description
System.Int32 id

The id of the block type to copy.

Returns
Type Description
BlockType

The newly created copy.

Copy(Type)

Copies the BlockType with a model of a specified type.

Declaration
public virtual BlockType Copy(Type modelType)
Parameters
Type Name Description
System.Type modelType

The model type used by the block type.

Returns
Type Description
BlockType

The newly created copy.

Delete(BlockType)

Deletes the specified BlockType.

Declaration
public virtual void Delete(BlockType blockType)
Parameters
Type Name Description
BlockType blockType

The block type that will be deleted.

Delete(Int32)

Deletes the BlockType with specified id.

Declaration
public virtual void Delete(int id)
Parameters
Type Name Description
System.Int32 id

The id of the block type that should be deleted.

Delete(Type)

Deletes the BlockType with a model of a specified type.

Declaration
public virtual void Delete(Type modelType)
Parameters
Type Name Description
System.Type modelType

The type of the model on the block type that should be deleted.

Delete<T>()

Deletes the BlockType with a model of a specified type.

Declaration
public virtual void Delete<T>()
    where T : BlockData
Type Parameters
Name Description
T

The type of the model on the block type that should be deleted.

List()

Lists all registered BlockTypes.

Declaration
public virtual IEnumerable<BlockType> List()
Returns
Type Description
System.Collections.Generic.IEnumerable<BlockType>

A list of block types.

Load(Guid)

Loads the BlockType with given guid based identifier.

Declaration
public virtual BlockType Load(Guid guid)
Parameters
Type Name Description
System.Guid guid

The GUID of the block type to load.

Returns
Type Description
BlockType

A block type with the specified GUID.

Load(Int32)

Loads the BlockType with given id.

Declaration
public virtual BlockType Load(int id)
Parameters
Type Name Description
System.Int32 id

The id of the block type to load.

Returns
Type Description
BlockType

A block type with the specified id.

Load(String)

Loads the BlockType with given name.

Declaration
public virtual BlockType Load(string name)
Parameters
Type Name Description
System.String name

The name of the block type to load.

Returns
Type Description
BlockType

A block type with the specified name.

Load(Type)

Loads the BlockType with given type.

Declaration
public virtual BlockType Load(Type modelType)
Parameters
Type Name Description
System.Type modelType

The type of the model on the block type that should be loaded.

Returns
Type Description
BlockType

A block type with the specified model type.

Load<T>()

Loads the BlockType with given type.

Declaration
public virtual BlockType Load<T>()
    where T : BlockData
Returns
Type Description
BlockType

A block type with the specified model type.

Type Parameters
Name Description
T

The type of the model on the block type that should be loaded.

Save(BlockType)

Saves the specified block type.

Declaration
public virtual void Save(BlockType blockType)
Parameters
Type Name Description
BlockType blockType

The block type that should be saved.

Implements

Extension Methods