Click or drag to resize

TimeIntervalCollectionTIntersectMergingData Method (TimeIntervalCollectionT, IEqualityComparerT, MergeTimeIntervalDataCallbackT)

Computes the intersection of this interval collection with another. When intervals in the two collections overlap, a provided callback is used to merge the Data on each into a single value that is applied to the interval of intersection. If the mergeCallback is , intervals that overlap in time will not be included in the returned intersection collection if they have different data.

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 20.3.405.0 (20.3.405.0)
Syntax
public TimeIntervalCollection<T> IntersectMergingData(
	TimeIntervalCollection<T> collection,
	IEqualityComparer<T> dataComparer,
	MergeTimeIntervalDataCallback<T> mergeCallback
)

Parameters

collection
Type: AGI.Foundation.TimeTimeIntervalCollectionT
The collection to intersect with this collection. The parameter can be null, in which case Intersect returns this instance.
dataComparer
Type: System.Collections.GenericIEqualityComparerT
The object to use to compare the Data properties of intervals.
mergeCallback
Type: AGI.Foundation.TimeMergeTimeIntervalDataCallbackT
The callback to use to merge the data in overlapping intervals. If , the data from this interval will be used.

Return Value

Type: TimeIntervalCollectionT
The intersection of this collection with another collection.
See Also