AFPathToken Constructor (AFIdentity, AFPathFilterType, String, Int32)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Creates an AFPathToken instance with an AFPathFilter.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFPathToken( AFIdentity identity, AFPathFilterType type, string expression = null, int index = -1 )
Public Sub New ( identity As AFIdentity, type As AFPathFilterType, Optional expression As String = Nothing, Optional index As Integer = -1 ) Dim identity As AFIdentity Dim type As AFPathFilterType Dim expression As String Dim index As Integer Dim instance As New AFPathToken(identity, type, expression, index)
public: AFPathToken( AFIdentity identity, AFPathFilterType type, String^ expression = nullptr, int index = -1 )
new : identity : AFIdentity * type : AFPathFilterType * ?expression : string * ?index : int (* Defaults: let _expression = defaultArg expression null let _index = defaultArg index -1 *) -> AFPathToken
Parameters
- identity
- Type: OSIsoft.AFAFIdentity
The AFIdentity of the desired object. - type
- Type: OSIsoft.AFAFPathFilterType
The type for the first filter. - expression (Optional)
- Type: SystemString
The expression for the first filter. - index (Optional)
- Type: SystemInt32
The index of the desired object within the collection. The index will be ignored for the default value of -1. When the index is greater than or equal to zero, it is the index from the beginning of the collection. When the index less than -1, it is the index from the end of the collection (e.g. -2 would be the last item in the collection, -3 is second-to-last item in the collection).
Remarks
This constructor will initialize all the fields with an AFPathFilter.
Additional filters can be added using the AddFilter(AFPathFilterType, String, Int32) method.