AFSearchExpressionToken Class
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
Represents a logical grouping of search tokens.
Inheritance Hierarchy
Namespace: OSIsoft.AF.Search
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public class AFSearchExpressionToken : AFSearchTokenBase, IEquatable<AFSearchExpressionToken>
<SerializableAttribute> Public Class AFSearchExpressionToken Inherits AFSearchTokenBase Implements IEquatable(Of AFSearchExpressionToken) Dim instance As AFSearchExpressionToken
[SerializableAttribute] public ref class AFSearchExpressionToken : public AFSearchTokenBase, IEquatable<AFSearchExpressionToken^>
[<SerializableAttribute>] type AFSearchExpressionToken = class inherit AFSearchTokenBase interface IEquatable<AFSearchExpressionToken> end
The AFSearchExpressionToken type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AFSearchExpressionToken |
Creates an AFSearchExpressionToken instance with the
TokenCollection specified.
|
Properties
| Name | Description | |
|---|---|---|
| Filter |
The filter to be searched with the current token.
(Inherited from AFSearchTokenBase.) | |
| TokenCollection |
The collection of AFSearchTokenBase objects to be used for the expression.
|
Methods
| Name | Description | |
|---|---|---|
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFSearchTokenBase.) | |
| Equals(AFSearchExpressionToken) |
Indicates whether the current object is equal to another object of the same type.
| |
| Equals(AFSearchTokenBase) |
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchTokenBaseEquals(AFSearchTokenBase).) | |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Overrides AFSearchTokenBaseGetHashCode.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString |
Returns a String that represents the current object.
(Overrides ObjectToString.) |
Remarks
This class represents a logical grouping of search tokens.
The AFSearchFilter and AFSearchOperator topics provide more information about the filters and operators that can be used in a search token.
Examples
// The following query string and code will generate the same token collections. IList<AFSearchTokenBase> tokensParsed = AFSearch.ParseQueryString("(Name:Tank* OR Name:'Valve*') |Level:50"); IList<AFSearchTokenBase> tokens = new AFSearchTokenBase[] { new AFSearchExpressionToken(AFSearchLogicalOperator.Or, new AFSearchTokenBase[] { new AFSearchFilterToken(AFSearchFilter.Name, "Tank*"), new AFSearchFilterToken(AFSearchFilter.Name, "Valve*") }), new AFSearchValueToken("|Level", "50") };
' The following query string and code will generate the same token collections. Dim tokensParsed As IList(Of AFSearchTokenBase) = AFSearch.ParseQueryString("(Name:Tank* OR Name:Valve*) |Level:50") Dim tokens As IList(Of AFSearchTokenBase) = New AFSearchTokenBase() { New AFSearchExpressionToken(AFSearchLogicalOperator.Or, New AFSearchTokenBase() { New AFSearchFilterToken(AFSearchFilter.Name, "Tank*"), New AFSearchFilterToken(AFSearchFilter.Name, "Valve*") }), New AFSearchValueToken("|Level", "50") }
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.