AFRpcMetric.ToDictionary Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Converts the AFRpcMetric list into a dictionary.
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static IDictionary<string, AFRpcMetric> ToDictionary( IList<AFRpcMetric> metrics )
Public Shared Function ToDictionary ( metrics As IList(Of AFRpcMetric) ) As IDictionary(Of String, AFRpcMetric) Dim metrics As IList(Of AFRpcMetric) Dim returnValue As IDictionary(Of String, AFRpcMetric) returnValue = AFRpcMetric.ToDictionary(metrics)
public: static IDictionary<String^, AFRpcMetric>^ ToDictionary( IList<AFRpcMetric>^ metrics )
static member ToDictionary : metrics : IList<AFRpcMetric> -> IDictionary<string, AFRpcMetric>
Parameters
- metrics
- Type: System.Collections.GenericIListAFRpcMetric
The list of AFRpcMetric items to be converted into a dictionary.
Return Value
Type: IDictionaryString, AFRpcMetricReturns a dictionary of AFRpcMetric items with the Name as the key.
Remarks
The returned dictionary uses the Name as the key.
This can be used to easily look up AFRpcMetric items by name.