Class BuildingBlockCollection
Provides ordered access to a glossary document's building blocks.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public sealed class BuildingBlockCollection : IEnumerable<BuildingBlock>, IEnumerable
Properties
Count
Gets the number of building blocks.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets a building block by zero-based index.
Declaration
public BuildingBlock this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The item index. |
Property Value
| Type | Description |
|---|---|
| BuildingBlock |
Methods
Add(BuildingBlock)
Adds a building block and enforces unique names.
Declaration
public BuildingBlock Add(BuildingBlock buildingBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildingBlock | buildingBlock | The building block to add. |
Returns
| Type | Description |
|---|---|
| BuildingBlock | The added building block. |
Clear()
Removes all building blocks.
Declaration
public void Clear()
FindByName(string)
Finds a building block by name, ignoring case.
Declaration
public BuildingBlock FindByName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The building block name. |
Returns
| Type | Description |
|---|---|
| BuildingBlock | The matching building block, or null. |
GetEnumerator()
Returns the collection enumerator.
Declaration
public IEnumerator<BuildingBlock> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<BuildingBlock> |
Remove(BuildingBlock)
Removes a building block.
Declaration
public bool Remove(BuildingBlock buildingBlock)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildingBlock | buildingBlock | The building block to remove. |
Returns
| Type | Description |
|---|---|
| bool | true when the item was removed. |