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

AF SDK Reference

AFCaseSearch Constructor (AFDatabase, String, AFSearchMode, AFTime, AFTime, IList(AFSearchTokenBase))

AFCaseSearch Constructor (AFDatabase, String, AFSearchMode, AFTime, AFTime, IList(AFSearchTokenBase))

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFCaseSearch Constructor (AFDatabase, String, AFSearchMode, AFTime, AFTime, IList(AFSearchTokenBase))
Creates an instance of an AFCaseSearch to search for AFCase objects using the specified AFSearchMode, times and optional search query string.

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

Syntax

public AFCaseSearch(
	AFDatabase database,
	string name,
	AFSearchMode searchMode,
	AFTime startTime,
	AFTime endTime,
	IList<AFSearchTokenBase> tokens
)
Public Sub New ( 
	database As AFDatabase,
	name As String,
	searchMode As AFSearchMode,
	startTime As AFTime,
	endTime As AFTime,
	tokens As IList(Of AFSearchTokenBase)
)

Dim database As AFDatabase
Dim name As String
Dim searchMode As AFSearchMode
Dim startTime As AFTime
Dim endTime As AFTime
Dim tokens As IList(Of AFSearchTokenBase)

Dim instance As New AFCaseSearch(database, 
	name, searchMode, startTime, endTime, 
	tokens)
public:
AFCaseSearch(
	AFDatabase^ database, 
	String^ name, 
	AFSearchMode searchMode, 
	AFTime startTime, 
	AFTime endTime, 
	IList<AFSearchTokenBase^>^ tokens
)
new : 
        database : AFDatabase * 
        name : string * 
        searchMode : AFSearchMode * 
        startTime : AFTime * 
        endTime : AFTime * 
        tokens : IList<AFSearchTokenBase> -> AFCaseSearch

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.
searchMode
Type: OSIsoft.AF.AssetAFSearchMode
The AFEventFrameSearchMode to be converted into a search query which indicates the direction in time from the StartTime or EndTime to proceed when returning cases.
startTime
Type: OSIsoft.AF.TimeAFTime
The starting time to be used in the generated search query. The startTime must be less than or equal to the endTime. The searchMode parameter will control whether the comparison will be performed against the case's StartTime or EndTime.
endTime
Type: OSIsoft.AF.TimeAFTime
The ending time to be used in the generated search query. The endTime must be greater than or equal to the startTime. The searchMode parameter will control whether the comparison will be performed against the case's StartTime or EndTime.
tokens
Type: System.Collections.GenericIListAFSearchTokenBase
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.

Remarks

This constructor will create a search query based upon the specified searchMode and times. The times in the query string will have the correct operators specified for the Start and/or End filters. The tokens will be used to add additional search filters to the search query. These parameters will be used to create tokens and initialize the TokenCollection property.

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

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