Represents an advanced collection of time intervals.
public class TimeIntervalCollectionEx : TimeIntervalCollection
Public Class TimeIntervalCollectionEx Inherits TimeIntervalCollection
The TimeIntervalCollectionEx represents a collection of TimeInterval objects. The properties and methods declared by this class can be used to perform common collection operations, such as adding new or deleting existing items. Individual items can be accessed using indexer notation.
The TimeIntervalCollectionEx class provides advanced functionality compared with its immediate ancestor TimeIntervalCollection. When adding a new time interval, this collection allows intersecting time intervals to be joined and represented within the collection as a single time interval item. So, the collection always contains a minimal number of items. In the same manner, removing a time interval intersecting an existing time interval item results in the item being cut off, or divided into two items.
The following pictures illustrate how time intervals are added to the TimeIntervalCollectionEx and removed from it.
Add method. The original interval is merged with the one specified, resulting in one collection item.
Remove method. The specified interval is subtracted form the original, resulting in two separate intervals, so that two collection items appear.