TimeIntervalCollection<T>.IntersectMergingData Method (TimeIntervalCollection<T>, IEqualityComparer<T>, MergeTimeIntervalDataCallback<T>) |
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
null, 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: 25.1.421.0 (25.1.421.0)
Syntaxpublic TimeIntervalCollection<T> IntersectMergingData(
TimeIntervalCollection<T> collection,
IEqualityComparer<T> dataComparer,
MergeTimeIntervalDataCallback<T> mergeCallback
)
Public Function IntersectMergingData (
collection As TimeIntervalCollection(Of T),
dataComparer As IEqualityComparer(Of T),
mergeCallback As MergeTimeIntervalDataCallback(Of T)
) As TimeIntervalCollection(Of T)
public:
TimeIntervalCollection<T>^ IntersectMergingData(
TimeIntervalCollection<T>^ collection,
IEqualityComparer<T>^ dataComparer,
MergeTimeIntervalDataCallback<T>^ mergeCallback
)
member IntersectMergingData :
collection : TimeIntervalCollection<'T> *
dataComparer : IEqualityComparer<'T> *
mergeCallback : MergeTimeIntervalDataCallback<'T> -> TimeIntervalCollection<'T>
Parameters
- collection
- Type: AGI.Foundation.Time.TimeIntervalCollection<T>
The collection to intersect with this collection. The parameter
can be null, in which case Intersect returns this instance. - dataComparer
- Type: System.Collections.Generic.IEqualityComparer<T>
The object to use to compare the Data properties of intervals. - mergeCallback
- Type: AGI.Foundation.Time.MergeTimeIntervalDataCallback<T>
The callback to use to merge the data in overlapping intervals. If null,
the data from this interval will be used.
Return Value
Type:
TimeIntervalCollection<T>The intersection of this collection with another collection.
See Also