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

AF SDK Reference

AFBinningRequest(TBin).BinBy(TPrimaryBin) Method (String, IEnumerable(TPrimaryBin))

AFBinningRequest(TBin).BinBy(TPrimaryBin) Method (String, IEnumerable(TPrimaryBin))

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFBinningRequest(TBin).BinBy(TPrimaryBin) Method (String, IEnumerable(TPrimaryBin))
Creates a compound grouping with this aggregate partitioned into bins of the specified field.

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

Syntax

public AFCompoundPartitioningRequest<AFRange<TPrimaryBin>, AFRange<TBin>> BinBy<TPrimaryBin>(
	string field,
	IEnumerable<TPrimaryBin> bins
)
where TPrimaryBin : Object, IComparable<TPrimaryBin>
Public Function BinBy(Of TPrimaryBin As {Object, IComparable(Of TPrimaryBin)}) ( 
	field As String,
	bins As IEnumerable(Of TPrimaryBin)
) As AFCompoundPartitioningRequest(Of AFRange(Of TPrimaryBin), AFRange(Of TBin))

Dim instance As AFBinningRequest
Dim field As String
Dim bins As IEnumerable(Of TPrimaryBin)
Dim returnValue As AFCompoundPartitioningRequest(Of AFRange(Of TPrimaryBin), AFRange(Of TBin))

returnValue = instance.BinBy(field, bins)
public:
generic<typename TPrimaryBin>
where TPrimaryBin : Object, IComparable<TPrimaryBin>
AFCompoundPartitioningRequest<AFRange<TPrimaryBin>^, AFRange<TBin>^>^ BinBy(
	String^ field, 
	IEnumerable<TPrimaryBin>^ bins
)
member BinBy : 
        field : string * 
        bins : IEnumerable<'TPrimaryBin> -> AFCompoundPartitioningRequest<AFRange<'TPrimaryBin>, AFRange<'TBin>>  when 'TPrimaryBin : Object and IComparable<'TPrimaryBin>

Parameters

field
Type: SystemString
The field whose values should be binned.
bins
Type: System.Collections.GenericIEnumerableTPrimaryBin
The endpoints of the bins.

Type Parameters

TPrimaryBin
The type of bins to partition by.

Return Value

Type: AFCompoundPartitioningRequestAFRangeTPrimaryBin, AFRangeTBin
An aggregate request grouped by a compound key of two fields.

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