Class CommentCollection
An ordered collection of Comment objects belonging to a slide.
Inherited Members
Namespace: DRIT.Presentation
Assembly: DRIT.Presentation.dll
Syntax
public class CommentCollection : IEnumerable<Comment>, IEnumerable
Properties
Count
Returns the number of comments in this collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Returns the comment at the given zero-based index.
Declaration
public Comment this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| Comment |
Methods
Add(Comment)
Appends an existing Comment to this collection.
Declaration
public void Add(Comment comment)
Parameters
| Type | Name | Description |
|---|---|---|
| Comment | comment |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
Add(string, string, string)
Creates and appends a new comment in a single call.
Declaration
public Comment Add(string text, string authorName, string initials = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Comment body text. |
| string | authorName | Author display name. When null, no author is assigned. |
| string | initials | Optional author initials. |
Returns
| Type | Description |
|---|---|
| Comment |
AddNew(string, CommentAuthor, double, double)
Creates a new comment with the given text and optional properties, appends it, and returns it.
Declaration
public Comment AddNew(string text, CommentAuthor author = null, double left = 0, double top = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | |
| CommentAuthor | author | |
| double | left | |
| double | top |
Returns
| Type | Description |
|---|---|
| Comment |
Clear()
Removes all comments from this collection.
Declaration
public void Clear()
GetEnumerator()
Returns an enumerator that iterates through this collection.
Declaration
public IEnumerator<Comment> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<Comment> | An enumerator that iterates through this collection. |
Remove(Comment)
Removes the specified comment. Returns true if the comment was found and removed.
Declaration
public bool Remove(Comment comment)
Parameters
| Type | Name | Description |
|---|---|---|
| Comment | comment |
Returns
| Type | Description |
|---|---|
| bool |