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:
public class ReplySortedCollection : IList<SpreadsheetCommentReply>, ICollection<SpreadsheetCommentReply>, IEnumerable<SpreadsheetCommentReply>, IEnumerable
Inheritance: objectReplySortedCollection
Implements:
Events
Raised after a reply has been successfully added or removed from the collection.
public event EventHandler<ReplySortedCollectionChangedEventArgs> Changed
Raised before a reply is added or removed, allowing cancellation of the operation.
public event EventHandler<ReplySortedCollectionChangingEventArgs> Changing
Methods
Adds a reply to the collection and re-sorts all replies by creation date in ascending order.
public void Add(SpreadsheetCommentReply item)
The object to be added to the ReplySortedCollection.
Implements:
Removes all replies from the collection.
public void Clear()
Implements:
Checks whether the specified reply exists in the collection.
public bool Contains(SpreadsheetCommentReply item)
The object to locate in ReplySortedCollection.
Returns:true if item is found in the ReplySortedCollection; otherwise, false.
Implements:
Copies all replies to the specified array starting at the given array index.
public void CopyTo(SpreadsheetCommentReply[] array, int arrayIndex)
The one-dimensional System.Array that is the destination of the elements copied from ReplySortedCollection. The System.Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.
Implements:
Returns an enumerator for iterating through replies in creation date order.
public IEnumerator<SpreadsheetCommentReply> GetEnumerator()
Implements:
Finds the position of the specified reply in the sorted collection and returns its index, or -1 if not found.
public int IndexOf(SpreadsheetCommentReply item)
The object to locate in the ReplySortedCollection. The value can be null for reference types.
Returns:The zero-based index of the first occurrence of item within the entire ReplySortedCollection, if found; otherwise, –1
Implements:
Raises the event after the collection has been modified.
protected virtual void OnChanged(ReplySortedCollectionChangedEventArgs args)
The ReplySortedCollectionChangedEventArgs instance containing the event data.
Raises the event before modifying the collection.
protected virtual void OnChanging(ReplySortedCollectionChangingEventArgs args)
The ReplySortedCollectionChangingEventArgs instance containing the event data.
Removes the specified reply from the collection and returns whether the operation succeeded.
public bool Remove(SpreadsheetCommentReply item)
The object to remove from the ReplySortedCollection.
Returns:Implements:
Removes the reply at the specified position in the collection.
public void RemoveAt(int index)
The zero-based index of the element to remove.
Implements:
Properties
Returns the number of replies currently in the collection.
public int Count { get; }
Implements:
Returns false as the collection supports modification operations.
public bool IsReadOnly { get; }
Implements:
Accesses the reply at the specified position in the sorted collection.
public SpreadsheetCommentReply this[int index] { get; set; }
The element at the specified index.
Implements: