AFSearch.Close Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Closes the search that is cached in the server.
Namespace: OSIsoft.AF.Search
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void Close()
Public Sub Close Dim instance As AFSearch instance.Close()
public: void Close()
member Close : unit -> unit
Remarks
When a cached search is no longer needed, this method should be called to clear the cached results from the server. If the cache was not enabled for the search, then this method will not do anything. If the cache was enabled, then a call is made to the server to clear the cached results. Once the search is closed, a new call to get results from the search will behave as if the Refresh method had been called.
| This method implements the Dispose method and therefore can be used with a using statement. |