[]
Represents a collection of building blocks.
public class BuildingBlockCollection : IContentList<BuildingBlock>, IReadOnlyList<BuildingBlock>, IReadOnlyCollection<BuildingBlock>, IEnumerable<BuildingBlock>, IEnumerable
Gets the number of building blocks in the collection.
public int Count { get; }
Gets the first buildin block in the collection.
public BuildingBlock First { get; }
Gets the building block at the specified index in the collection.
public BuildingBlock this[int index] { get; }
index intZero-based index of the building block to get.
The building block at the specified index in the collection.
Gets the last building block in the collection.
public BuildingBlock Last { get; }
Adds a new building block into the collection.
public BuildingBlock Add(string name, string category, BuildingBlockGallery gallery = BuildingBlockGallery.Default, BuildingBlockInsertOptions insertOptions = BuildingBlockInsertOptions.Content, BuildingBlockType type = BuildingBlockType.None)
name stringThe building block name.
category stringThe building block category.
gallery BuildingBlockGalleryThe building block gallery.
insertOptions BuildingBlockInsertOptionsThe building block insert options.
type BuildingBlockTypeThe building block type.
A newyly added BuildingBlock.
Returns an enumerator that iterates through the collection.
public IEnumerator<BuildingBlock> GetEnumerator()
An enumerator that can be used to iterate through the collection.
Removes the specified building block from the collection.
public bool Remove(BuildingBlock buildingBlock)
buildingBlock BuildingBlockThe building block to remove.
true if the specified building block is removed; otherwise false.