Class
ReplySortedCollection

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:

cs-api-definition
public class ReplySortedCollection : IList<SpreadsheetCommentReply>, ICollection<SpreadsheetCommentReply>, IEnumerable<SpreadsheetCommentReply>, IEnumerable

Inheritance: objectReplySortedCollection

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

Properties

Count

Returns the number of replies currently in the collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Implements ICollection<SpreadsheetCommentReply>.Count

IsReadOnly

Returns false as the collection supports modification operations.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements ICollection<SpreadsheetCommentReply>.IsReadOnly

this[int]

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

Declaration

cs-api-definition
public SpreadsheetCommentReply this[int index] { get; set; }

Parameters

index

int

Property Value

SpreadsheetCommentReply

The element at the specified index.

Implements IList<SpreadsheetCommentReply>.this[int]

Methods

Add(SpreadsheetCommentReply)

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

Declaration

cs-api-definition
public void Add(SpreadsheetCommentReply item)

Parameters

item

SpreadsheetCommentReply

The object to be added to the ReplySortedCollection.

Implements ICollection<SpreadsheetCommentReply>.Add(SpreadsheetCommentReply)

Clear()

Removes all replies from the collection.

Declaration

cs-api-definition
public void Clear()

Implements ICollection<SpreadsheetCommentReply>.Clear()

Contains(SpreadsheetCommentReply)

Checks whether the specified reply exists in the collection.

Declaration

cs-api-definition
public bool Contains(SpreadsheetCommentReply item)

Parameters

item

SpreadsheetCommentReply

The object to locate in ReplySortedCollection.

Returns

bool

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

Implements ICollection<SpreadsheetCommentReply>.Contains(SpreadsheetCommentReply)

CopyTo(SpreadsheetCommentReply[], int)

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

Declaration

cs-api-definition
public void CopyTo(SpreadsheetCommentReply[] array, int arrayIndex)

Parameters

array

SpreadsheetCommentReply[]

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

arrayIndex

int

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

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

GetEnumerator()

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

Declaration

cs-api-definition
public IEnumerator<SpreadsheetCommentReply> GetEnumerator()

Returns

IEnumerator<SpreadsheetCommentReply>

Implements IEnumerable<SpreadsheetCommentReply>.GetEnumerator()

IndexOf(SpreadsheetCommentReply)

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

Declaration

cs-api-definition
public int IndexOf(SpreadsheetCommentReply item)

Parameters

item

SpreadsheetCommentReply

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)

OnChanged(ReplySortedCollectionChangedEventArgs)

Raises the event after the collection has been modified.

Declaration

cs-api-definition
protected virtual void OnChanged(ReplySortedCollectionChangedEventArgs args)

Parameters

args

ReplySortedCollectionChangedEventArgs

The ReplySortedCollectionChangedEventArgs instance containing the event data.

OnChanging(ReplySortedCollectionChangingEventArgs)

Raises the event before modifying the collection.

Declaration

cs-api-definition
protected virtual void OnChanging(ReplySortedCollectionChangingEventArgs args)

Parameters

args

ReplySortedCollectionChangingEventArgs

The ReplySortedCollectionChangingEventArgs instance containing the event data.

Remove(SpreadsheetCommentReply)

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

Declaration

cs-api-definition
public bool Remove(SpreadsheetCommentReply item)

Parameters

item

SpreadsheetCommentReply

The object to remove from the ReplySortedCollection.

Returns

bool

Implements ICollection<SpreadsheetCommentReply>.Remove(SpreadsheetCommentReply)

RemoveAt(int)

Removes the reply at the specified position in the collection.

Declaration

cs-api-definition
public void RemoveAt(int index)

Parameters

index

int

The zero-based index of the element to remove.

Implements IList<SpreadsheetCommentReply>.RemoveAt(int)

Events

Changed

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

Declaration

cs-api-definition
public event EventHandler<ReplySortedCollectionChangedEventArgs> Changed

Event Value

EventHandler<ReplySortedCollectionChangedEventArgs>

Changing

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

Declaration

cs-api-definition
public event EventHandler<ReplySortedCollectionChangingEventArgs> Changing

Event Value

EventHandler<ReplySortedCollectionChangingEventArgs>