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

AF SDK Reference

AFAggregate.BinnedSummary(T, TBin) Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFAggregate.BinnedSummary(T, TBin) Method
Generates a summary broken down by the specified bins for items matching the search criteria.

Namespace:  OSIsoft.AF.Data.Aggregate
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static AFBinnedResult<TBin> BinnedSummary<T, TBin>(
	this IEnumerable<T> items,
	string field,
	IEnumerable<TBin> bins,
	UOM binUOM,
	string summaryField,
	AFSummaryTypes summaryTypes
)
where T : AFObject
where TBin : Object, IComparable<TBin>
<ExtensionAttribute>
Public Shared Function BinnedSummary(Of T As AFObject, TBin As {Object, IComparable(Of TBin)}) ( 
	items As IEnumerable(Of T),
	field As String,
	bins As IEnumerable(Of TBin),
	binUOM As UOM,
	summaryField As String,
	summaryTypes As AFSummaryTypes
) As AFBinnedResult(Of TBin)

Dim items As IEnumerable(Of T)
Dim field As String
Dim bins As IEnumerable(Of TBin)
Dim binUOM As UOM
Dim summaryField As String
Dim summaryTypes As AFSummaryTypes
Dim returnValue As AFBinnedResult(Of TBin)

returnValue = items.BinnedSummary(field, 
	bins, binUOM, summaryField, summaryTypes)
public:
[ExtensionAttribute]
generic<typename T, typename TBin>
where T : AFObject
where TBin : Object, IComparable<TBin>
static AFBinnedResult<TBin>^ BinnedSummary(
	IEnumerable<T>^ items, 
	String^ field, 
	IEnumerable<TBin>^ bins, 
	UOM^ binUOM, 
	String^ summaryField, 
	AFSummaryTypes summaryTypes
)
[<ExtensionAttribute>]
static member BinnedSummary : 
        items : IEnumerable<'T> * 
        field : string * 
        bins : IEnumerable<'TBin> * 
        binUOM : UOM * 
        summaryField : string * 
        summaryTypes : AFSummaryTypes -> AFBinnedResult<'TBin>  when 'T : AFObject when 'TBin : Object and IComparable<'TBin>

Parameters

items
Type: System.Collections.GenericIEnumerableT
The items that should be summarized.
field
Type: SystemString
The field whose value should be binned.
bins
Type: System.Collections.GenericIEnumerableTBin
The bins the field should be sorted into.
binUOM
Type: OSIsoft.AF.UnitsOfMeasureUOM
The unit of measure associated with bin values.
summaryField
Type: SystemString
The field that should be summarized for each group.
summaryTypes
Type: OSIsoft.AF.DataAFSummaryTypes
The types of summaries to perform for each group.

Type Parameters

T
The type of items to summarize
TBin
The type of bins the summary is broken into.

Return Value

Type: AFBinnedResultTBin
A result containing the requested histogram or an error if the summaries 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