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

AF SDK Reference

AFSearchExpressionToken Class

  • Last UpdatedNov 18, 2025
  • 4 minute read
AFSearchExpressionToken Class
Represents a logical grouping of search tokens.

Inheritance Hierarchy

SystemObject
  OSIsoft.AF.SearchAFSearchTokenBase
    OSIsoft.AF.SearchAFSearchExpressionToken

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

  NameDescription
Public method
AFSearchExpressionToken
Creates an AFSearchExpressionToken instance with the TokenCollection specified.

Properties

  NameDescription
Public property
Filter
The filter to be searched with the current token.
(Inherited from AFSearchTokenBase.)
Public property
TokenCollection
The collection of AFSearchTokenBase objects to be used for the expression.

Methods

  NameDescription
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFSearchTokenBase.)
Public method
Equals(AFSearchExpressionToken)
Indicates whether the current object is equal to another object of the same type.
Public method
Equals(AFSearchTokenBase)
Indicates whether the current object is equal to another object of the same type.
(Overrides AFSearchTokenBaseEquals(AFSearchTokenBase).)
Public method
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.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
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.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5

See Also

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