Click or drag to resize

TimeIntervalCollectionTIntersectMergingData Method (TimeIntervalT, MergeTimeIntervalDataCallbackT)

Computes the intersection of this interval collection with an interval. When the interval overlaps an interval in the collection, 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: 24.3.420.0 (24.3.420.0)
Syntax
public TimeIntervalCollection<T> IntersectMergingData(
	TimeInterval<T> interval,
	MergeTimeIntervalDataCallback<T> mergeCallback
)

Parameters

interval
Type: AGI.Foundation.TimeTimeIntervalT
The interval to intersect with this collection
mergeCallback
Type: AGI.Foundation.TimeMergeTimeIntervalDataCallbackT
The method to use to "merge" the data on two intervals that intersect. If , the data from this interval will be used.

Return Value

Type: TimeIntervalCollectionT
The intersection of this collection with the interval.
Remarks
The returned collection will only contain the intervals that are in both collections. If two intervals in the two collections overlap but have different Data, the overlapping part will NOT be included in the resulting collection.
See Also