[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.CommentCollection

Class CommentCollection

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

Represents a collection of Comment elements.

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

Methods

Add(string, string, DateTime, string)

Adds a Comment to this collection.

public Comment Add(string text, string author, DateTime date, string initials)

Parameters

text string

The new comment text.

author string

The new comment author.

date System.DateTime

The new comment date.

initials string

The new comment author initials.

Returns

Comment

The added Comment.

Add(string, string, DateTime)

Adds a Comment to this collection.

public Comment Add(string text, string author, DateTime date)

Parameters

text string

The new comment text.

author string

The new comment author.

date System.DateTime

The new comment date.

Returns

Comment

The added Comment.

Add(string, string)

Adds a Comment to this collection at the Content position.

public Comment Add(string text = null, string author = null)

Parameters

text string

The new comment text.

author string

The new comment author.

Returns

Comment

The added Comment.

Contains(long)

Checks whether this collection contains a comment with the specified ID.

public bool Contains(long id)

Parameters

id long

The comment ID.

Returns

bool

True if the collection contains a comment with the specified ID, false otherwise.

GetByID(long)

Gets a comment from this collection by its ID.

public Comment GetByID(long id)

Parameters

id long

The comment ID.

Returns

Comment

The Comment with the specified ID.

Exceptions

System.Collections.Generic.KeyNotFoundException

Throws if the comment with the specified ID was not found in the collection.

Insert(RangeLocation)

Inserts a Comment into this collection at the specified location.

public Comment Insert(RangeLocation location)

Parameters

location RangeLocation

The target RangeLocation for the insertion.

Returns

Comment

The inserted Comment.

Insert(string, string, RangeLocation)

Inserts a Comment into this collection at the specified location.

public Comment Insert(string text, string author, RangeLocation location)

Parameters

text string

The new comment text.

author string

The new comment author.

location RangeLocation

The target RangeLocation for the insertion.

Returns

Comment

The inserted Comment.

Insert(string, string, DateTime, RangeLocation)

Inserts a Comment into this collection at the specified location.

public Comment Insert(string text, string author, DateTime date, RangeLocation location)

Parameters

text string

The new comment text.

author string

The new comment author.

date System.DateTime

The new comment date.

location RangeLocation

The target RangeLocation for the insertion.

Returns

Comment

The inserted Comment.

Insert(string, string, DateTime, string, RangeLocation)

Inserts a Comment into this collection at the specified location.

public Comment Insert(string text, string author, DateTime date, string initials, RangeLocation location)

Parameters

text string

The new comment text.

author string

The new comment author.

date System.DateTime

The new comment date.

initials string

The new comment author initials.

location RangeLocation

The target RangeLocation for the insertion.

Returns

Comment

The inserted Comment.