[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.BuildingBlockCollection

Class BuildingBlockCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a collection of building blocks.

public class BuildingBlockCollection : IContentList<BuildingBlock>, IReadOnlyList<BuildingBlock>, IReadOnlyCollection<BuildingBlock>, IEnumerable<BuildingBlock>, IEnumerable
Inheritance
object
BuildingBlockCollection
Implements
System.Collections.Generic.IReadOnlyList<T><BuildingBlock>
System.Collections.Generic.IReadOnlyCollection<T><BuildingBlock>
System.Collections.Generic.IEnumerable<T><BuildingBlock>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Count

Gets the number of building blocks in the collection.

public int Count { get; }

Property Value

int

First

Gets the first buildin block in the collection.

public BuildingBlock First { get; }

Property Value

BuildingBlock

this[int]

Gets the building block at the specified index in the collection.

public BuildingBlock this[int index] { get; }

Parameters

index int

Zero-based index of the building block to get.

Property Value

BuildingBlock

The building block at the specified index in the collection.

Last

Gets the last building block in the collection.

public BuildingBlock Last { get; }

Property Value

BuildingBlock

Methods

Add(string, string, BuildingBlockGallery, BuildingBlockInsertOptions, BuildingBlockType)

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)

Parameters

name string

The building block name.

category string

The building block category.

gallery BuildingBlockGallery

The building block gallery.

insertOptions BuildingBlockInsertOptions

The building block insert options.

type BuildingBlockType

The building block type.

Returns

BuildingBlock

A newyly added BuildingBlock.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<BuildingBlock> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><BuildingBlock>

An enumerator that can be used to iterate through the collection.

Remove(BuildingBlock)

Removes the specified building block from the collection.

public bool Remove(BuildingBlock buildingBlock)

Parameters

buildingBlock BuildingBlock

The building block to remove.

Returns

bool

true if the specified building block is removed; otherwise false.