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

AF SDK Reference

Product Family
Current publication

AFAggregate.FrequencyDistributionAsync(T) Method

Table of Contents

AFAggregate.FrequencyDistributionAsync(T) Method

AFAggregate.FrequencyDistributionAsync(T) Method
Generates a frequency distribution for the specified items asynchronously.

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

Syntax

public static Task<AFGroupedResult<Object>> FrequencyDistributionAsync<T>(
	this IEnumerable<T> items,
	string groupedField,
	CancellationToken cancellationToken
)
where T : AFObject
<ExtensionAttribute>
Public Shared Function FrequencyDistributionAsync(Of T As AFObject) ( 
	items As IEnumerable(Of T),
	groupedField As String,
	cancellationToken As CancellationToken
) As Task(Of AFGroupedResult(Of Object))

Dim items As IEnumerable(Of T)
Dim groupedField As String
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of AFGroupedResult(Of Object))

returnValue = items.FrequencyDistributionAsync(groupedField, 
	cancellationToken)
public:
[ExtensionAttribute]
generic<typename T>
where T : AFObject
static Task<AFGroupedResult<Object^>^>^ FrequencyDistributionAsync(
	IEnumerable<T>^ items, 
	String^ groupedField, 
	CancellationToken cancellationToken
)
[<ExtensionAttribute>]
static member FrequencyDistributionAsync : 
        items : IEnumerable<'T> * 
        groupedField : string * 
        cancellationToken : CancellationToken -> Task<AFGroupedResult<Object>>  when 'T : AFObject

Parameters

items
Type: System.Collections.Generic.IEnumerable<T>
The items that should be summarized.
groupedField
Type: System.String
The field whose value should be grouped.
cancellationToken
Type: System.Threading.CancellationToken
A token to control cancellation of the aggregation request.

Type Parameters

T
The type of items to summarize

Return Value

Type: Task<AFGroupedResult<Object>>
A result containing the requested frequency distribution 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 IEnumerable<T>. 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).

Remarks

Note Notes to Callers
This call might use a background task to complete some of its work. See the Threading Overview for some matters to consider when execution transitions to another thread.

Version Information

AFSDK

Supported in: 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

Was this topic helpful?