Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAggregate.Aggregate(T) Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAggregate.Aggregate(T) Method
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: AFAggregateResultCollection
An AFAggregateResultCollection containing the results of the requested aggregates or errors if the aggregates could not be performed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in