AFSearch.SummaryAsync Method (String, AFSummaryTypes, String, CancellationToken)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Summarizes the result of this search with the specified weighting asynchronously.
Namespace: OSIsoft.AF.Search
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public Task<AFSummaryResult> SummaryAsync( string field, AFSummaryTypes summaryTypes, string weightField, CancellationToken cancellationToken )
Public Function SummaryAsync ( field As String, summaryTypes As AFSummaryTypes, weightField As String, cancellationToken As CancellationToken ) As Task(Of AFSummaryResult) Dim instance As AFSearch Dim field As String Dim summaryTypes As AFSummaryTypes Dim weightField As String Dim cancellationToken As CancellationToken Dim returnValue As Task(Of AFSummaryResult) returnValue = instance.SummaryAsync(field, summaryTypes, weightField, cancellationToken)
public: Task<AFSummaryResult^>^ SummaryAsync( String^ field, AFSummaryTypes summaryTypes, String^ weightField, CancellationToken cancellationToken )
member SummaryAsync : field : string * summaryTypes : AFSummaryTypes * weightField : string * cancellationToken : CancellationToken -> Task<AFSummaryResult>
Parameters
- 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. - cancellationToken
- Type: System.ThreadingCancellationToken
A token to control cancellation of the aggregation request.
Return Value
Type: TaskAFSummaryResultA result containing the requested summaries or an error if the summaries could not be performed.
Remarks
| 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. |