AFAggregate.Aggregate(T) Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Performs all requested aggregates on the specified items.
Namespace: OSIsoft.AF.Data.Aggregate
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFAggregateResultCollection Aggregate<T>( this IEnumerable<T> items, IEnumerable<AFAggregateRequest> aggregateRequests ) where T : AFObject
<ExtensionAttribute> Public Shared Function Aggregate(Of T As AFObject) ( items As IEnumerable(Of T), aggregateRequests As IEnumerable(Of AFAggregateRequest) ) As AFAggregateResultCollection Dim items As IEnumerable(Of T) Dim aggregateRequests As IEnumerable(Of AFAggregateRequest) Dim returnValue As AFAggregateResultCollection returnValue = items.Aggregate(aggregateRequests)
public: [ExtensionAttribute] generic<typename T> where T : AFObject static AFAggregateResultCollection^ Aggregate( IEnumerable<T>^ items, IEnumerable<AFAggregateRequest^>^ aggregateRequests )
[<ExtensionAttribute>] static member Aggregate : items : IEnumerable<'T> * aggregateRequests : IEnumerable<AFAggregateRequest> -> AFAggregateResultCollection when 'T : AFObject
Parameters
- items
- Type: System.Collections.GenericIEnumerableT
The items that should be summarized. - aggregateRequests
- Type: System.Collections.GenericIEnumerableAFAggregateRequest
All aggregates that should be performed on the items.
Type Parameters
- T
- The type of items to summarize
Return Value
Type: AFAggregateResultCollectionAn AFAggregateResultCollection containing the results of the requested aggregates or errors if the aggregates could not be performed.