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

AF SDK Reference

AFKeyedResults(TKey, TResult) Class

  • Last UpdatedNov 18, 2025
  • 5 minute read
AFKeyedResults(TKey, TResult) Class
This class is used to return a dictionary of results along with error information.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFErrorsTKey
    OSIsoft.AFAFKeyedResultsTKey, TResult

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

Syntax

public sealed class AFKeyedResults<TKey, TResult> : AFErrors<TKey>, 
	IEnumerable<TResult>, IEnumerable
Public NotInheritable Class AFKeyedResults(Of TKey, TResult)
	Inherits AFErrors(Of TKey)
	Implements IEnumerable(Of TResult), IEnumerable

Dim instance As AFKeyedResults(Of TKey, TResult)
generic<typename TKey, typename TResult>
public ref class AFKeyedResults sealed : public AFErrors<TKey>, 
	IEnumerable<TResult>, IEnumerable
[<SealedAttribute>]
type AFKeyedResults<'TKey, 'TResult> =  
    class
        inherit AFErrors<'TKey>
        interface IEnumerable<'TResult>
        interface IEnumerable
    end

Type Parameters

TKey
The type of keys in the Results dictionary and the Errors dictionary.
TResult
The type of values in the Results dictionary.

The AFKeyedResultsTKey, TResult type exposes the following members.

Constructors

  NameDescription
Public method
AFKeyedResultsTKey, TResult
Initializes a new instance of the AFKeyedResultsTKey, TResult class.
Public method
AFKeyedResultsTKey, TResult(Int32)
Initializes a new instance of the AFKeyedResultsTKey, TResult class.

Properties

Methods

  NameDescription
Public method
AddError
Add an error that is not specific to a PISystem or PIServer.
(Inherited from AFErrorsTKey.)
Public method
AddPIServerError
Add a PIServer specific error.
(Inherited from AFErrorsTKey.)
Public method
AddPISystemError
Add a PISystem specific error.
(Inherited from AFErrorsTKey.)
Public method
AddResult
Add a result to the Results dictionary.
Public method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method
TryGetValue
Gets the value associated with the specified key.

Extension Methods

  NameDescription
Public Extension MethodCode example
ChunkedByTResult
This extension method breaks up search results into chunks to make it easier to page through and process IEnumerableT collections in chunks.
(Defined by AFSDKExtension.)

Remarks

This class is used to return a dictionary of results along with error information from methods. This allows a list of inputs to be matched with the returned results and any errors.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in