Class ParagraphCollection
Provides ordered access to the paragraphs in a story.
Inherited Members
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public class ParagraphCollection : IEnumerable<Paragraph>, IEnumerable
Properties
Count
Gets the number of paragraphs in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
First
Gets the first paragraph, or null when the collection is empty.
Declaration
public Paragraph First { get; }
Property Value
| Type | Description |
|---|---|
| Paragraph |
this[int]
Gets the paragraph at the specified zero-based index.
Declaration
public Paragraph this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based paragraph index. |
Property Value
| Type | Description |
|---|---|
| Paragraph | The paragraph at |
Last
Gets the last paragraph, or null when the collection is empty.
Declaration
public Paragraph Last { get; }
Property Value
| Type | Description |
|---|---|
| Paragraph |
Methods
Add(Paragraph)
Adds a paragraph to the end of the story.
Declaration
public void Add(Paragraph item)
Parameters
| Type | Name | Description |
|---|---|---|
| Paragraph | item | The paragraph to add. |
GetEnumerator()
Returns an enumerator over paragraphs in document order.
Declaration
public IEnumerator<Paragraph> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Paragraph> | An enumerator over the live collection. |
Insert(int, Paragraph)
Inserts a paragraph at the specified zero-based index.
Declaration
public void Insert(int index, Paragraph item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based insertion index. |
| Paragraph | item | The paragraph to insert. |
RemoveAt(int)
Removes the paragraph at the specified zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index to remove. |