New to Telerik Document ProcessingStart a free 30-day trial

Collection of comment replies automatically sorted by creation date in ascending order, supporting add, remove, and enumeration operations.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Comments

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class ReplySortedCollection : IList<SpreadsheetCommentReply>, ICollection<SpreadsheetCommentReply>, IEnumerable<SpreadsheetCommentReply>, IEnumerable

Inheritance: objectReplySortedCollection

Implements: ICollection<SpreadsheetCommentReply>IEnumerableIEnumerable<SpreadsheetCommentReply>IList<SpreadsheetCommentReply>

Events

Raised after a reply has been successfully added or removed from the collection.

C#
public event EventHandler<ReplySortedCollectionChangedEventArgs> Changed

Raised before a reply is added or removed, allowing cancellation of the operation.

C#
public event EventHandler<ReplySortedCollectionChangingEventArgs> Changing

Methods

Adds a reply to the collection and re-sorts all replies by creation date in ascending order.

C#
public void Add(SpreadsheetCommentReply item)
Parameters:itemSpreadsheetCommentReply

The object to be added to the ReplySortedCollection.

Implements: ICollection<SpreadsheetCommentReply>.Add(SpreadsheetCommentReply)

Removes all replies from the collection.

C#
public void Clear()

Implements: ICollection<SpreadsheetCommentReply>.Clear()

Checks whether the specified reply exists in the collection.

C#
public bool Contains(SpreadsheetCommentReply item)
Parameters:itemSpreadsheetCommentReply

The object to locate in ReplySortedCollection.

Returns:

bool

true if item is found in the ReplySortedCollection; otherwise, false.

Implements: ICollection<SpreadsheetCommentReply>.Contains(SpreadsheetCommentReply)

Copies all replies to the specified array starting at the given array index.

C#
public void CopyTo(SpreadsheetCommentReply[] array, int arrayIndex)
Parameters:arraySpreadsheetCommentReply[]

The one-dimensional System.Array that is the destination of the elements copied from ReplySortedCollection. The System.Array must have zero-based indexing.

arrayIndexint

The zero-based index in array at which copying begins.

Implements: ICollection<SpreadsheetCommentReply>.CopyTo(SpreadsheetCommentReply[], int)

Returns an enumerator for iterating through replies in creation date order.

C#
public IEnumerator<SpreadsheetCommentReply> GetEnumerator()
Returns:

IEnumerator<SpreadsheetCommentReply>

Implements: IEnumerable<SpreadsheetCommentReply>.GetEnumerator()

Finds the position of the specified reply in the sorted collection and returns its index, or -1 if not found.

C#
public int IndexOf(SpreadsheetCommentReply item)
Parameters:itemSpreadsheetCommentReply

The object to locate in the ReplySortedCollection. The value can be null for reference types.

Returns:

int

The zero-based index of the first occurrence of item within the entire ReplySortedCollection, if found; otherwise, –1

Implements: IList<SpreadsheetCommentReply>.IndexOf(SpreadsheetCommentReply)

Raises the event after the collection has been modified.

C#
protected virtual void OnChanged(ReplySortedCollectionChangedEventArgs args)
Parameters:argsReplySortedCollectionChangedEventArgs

The ReplySortedCollectionChangedEventArgs instance containing the event data.

Raises the event before modifying the collection.

C#
protected virtual void OnChanging(ReplySortedCollectionChangingEventArgs args)
Parameters:argsReplySortedCollectionChangingEventArgs

The ReplySortedCollectionChangingEventArgs instance containing the event data.

Removes the specified reply from the collection and returns whether the operation succeeded.

C#
public bool Remove(SpreadsheetCommentReply item)
Parameters:itemSpreadsheetCommentReply

The object to remove from the ReplySortedCollection.

Returns:

bool

Implements: ICollection<SpreadsheetCommentReply>.Remove(SpreadsheetCommentReply)

Removes the reply at the specified position in the collection.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based index of the element to remove.

Implements: IList<SpreadsheetCommentReply>.RemoveAt(int)

Properties

Returns the number of replies currently in the collection.

C#
public int Count { get; }

Implements: ICollection<SpreadsheetCommentReply>.Count

Returns false as the collection supports modification operations.

C#
public bool IsReadOnly { get; }

Implements: ICollection<SpreadsheetCommentReply>.IsReadOnly

Accesses the reply at the specified position in the sorted collection.

C#
public SpreadsheetCommentReply this[int index] { get; set; }
Parameters:indexintProperty Value:

The element at the specified index.

Implements: IList<SpreadsheetCommentReply>.this[int]