Share via


TimelineMarkerCollection.Append(TimelineMarker) Method

Definition

Adds a new item to the collection.

public:
 virtual void Append(TimelineMarker ^ value) = IVector<TimelineMarker ^>::Append;
void Append(TimelineMarker const& value);
public void Append(TimelineMarker value);
function append(value)
Public Sub Append (value As TimelineMarker)

Parameters

value
TimelineMarker

The new item to add.

Implements

Remarks

Collection API for TimelineMarkerCollection

A TimelineMarkerCollection is an ordered list where the order is determined by the Time value of each TimelineMarker item contained in the collection. The collection API for TimelineMarkerCollection internally processes each new item that is added to the collection and adds it at an index location that corresponds to an updated ordering of all Time values for all TimelineMarker items in the collection.

The intention of having the TimelineMarkerCollection always maintain a Time-based order is so that enumerating/iterating the collection gives the TimelineMarker values in the order that corresponds to the Position of a media asset that's being played and the order that MarkerReached events would fire. Otherwise, if the collection weren't Time-ordered, it would have been necessary to sort the collection by time prior to use.

If you call Append, the item might be added to the beginning, middle or end of the ordered list, depending on the Time value of the TimelineMarker you are adding. This is different from typical Append behavior that extends the index and always adds to the last index.

Time values aren't exclusive in a TimelineMarkerCollection, more than one TimelineMarker with a shared Time can be in a list and will be in appropriate Time-based order. However the relative order between items that share a Time is indeterminate within the collection and should be considered an implementation detail.

Applies to