AFAggregate.Summary(T) Method (IEnumerable(T), String, AFSummaryTypes, String)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Summarizes the specified items with the specified weighting.
Namespace: OSIsoft.AF.Data.Aggregate
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFSummaryResult Summary<T>( this IEnumerable<T> items, string field, AFSummaryTypes summaryTypes, string weightField ) where T : AFObject
<ExtensionAttribute> Public Shared Function Summary(Of T As AFObject) ( items As IEnumerable(Of T), field As String, summaryTypes As AFSummaryTypes, weightField As String ) As AFSummaryResult Dim items As IEnumerable(Of T) Dim field As String Dim summaryTypes As AFSummaryTypes Dim weightField As String Dim returnValue As AFSummaryResult returnValue = items.Summary(field, summaryTypes, weightField)
public: [ExtensionAttribute] generic<typename T> where T : AFObject static AFSummaryResult^ Summary( IEnumerable<T>^ items, String^ field, AFSummaryTypes summaryTypes, String^ weightField )
[<ExtensionAttribute>] static member Summary : items : IEnumerable<'T> * field : string * summaryTypes : AFSummaryTypes * weightField : string -> AFSummaryResult when 'T : AFObject
Parameters
- items
- Type: System.Collections.GenericIEnumerableT
The items that should be summarized. - field
- Type: SystemString
The field that should be summarized. - summaryTypes
- Type: OSIsoft.AF.DataAFSummaryTypes
The summaries that should be performed on the field. - weightField
- Type: SystemString
The field that should be used to weight the values being summarized.
Type Parameters
- T
- The type of items to summarize
Return Value
Type: AFSummaryResultA result containing the requested summaries or an error if the summaries could not be performed.