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

AF SDK Reference

AFElementSearch Constructor (AFDatabase, String, IList(AFSearchToken))

AFElementSearch Constructor (AFDatabase, String, IList(AFSearchToken))

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFElementSearch Constructor (AFDatabase, String, IList(AFSearchToken))

Note: This API is now obsolete.

Creates an instance of an AFElementSearch to search for AFElement objects using the specified list of search tokens.

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

Syntax

[ObsoleteAttribute("Use AFElementSearch(AFDatabase database, string name, IList<AFSearchTokenBase> tokens) constructor instead.")]
public AFElementSearch(
	AFDatabase database,
	string name,
	IList<AFSearchToken> tokens
)
<ObsoleteAttribute("Use AFElementSearch(AFDatabase database, string name, IList<AFSearchTokenBase> tokens) constructor instead.")>
Public Sub New ( 
	database As AFDatabase,
	name As String,
	tokens As IList(Of AFSearchToken)
)

Dim database As AFDatabase
Dim name As String
Dim tokens As IList(Of AFSearchToken)

Dim instance As New AFElementSearch(database, 
	name, tokens)
public:
[ObsoleteAttribute(L"Use AFElementSearch(AFDatabase database, string name, IList<AFSearchTokenBase> tokens) constructor instead.")]
AFElementSearch(
	AFDatabase^ database, 
	String^ name, 
	IList<AFSearchToken>^ tokens
)
[<ObsoleteAttribute("Use AFElementSearch(AFDatabase database, string name, IList<AFSearchTokenBase> tokens) constructor instead.")>]
new : 
        database : AFDatabase * 
        name : string * 
        tokens : IList<AFSearchToken> -> AFElementSearch

Parameters

database
Type: OSIsoft.AFAFDatabase
The AFDatabase to be searched by the query. This parameter will initialize the Database property.
name
Type: SystemString
The SearchName associated with the created search object. This is only informational and does not affect the searches.
tokens
Type: System.Collections.GenericIListAFSearchToken
The list of tokens to initialize the TokenCollection property for the new object and will be used when calling search method. A query string can be converted to a list of tokens by calling the ParseQueryString(String) method.

Version Information

AFSDK

Supported in: 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5
Obsolete (compiler warning) in 3.1.1
Obsolete (compiler warning) in 3.1.0
Obsolete (compiler warning) in 3.0.2
Obsolete (compiler warning) in 3.0.1
Obsolete (compiler warning) in 3.0.0
Obsolete (compiler warning) in 2.10.11
Obsolete (compiler warning) in 2.10.5

See Also

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