VsSearchTask.OnStartSearch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called on background threads when the search is started. Override to do task-specific search. Set the SearchResults to indicate the number of results found so far. Call the SearchCallback on ReportProgress to report progress (if progress is supported) and call it on ReportComplete when the search is completed (with or without errors). Set the TaskStatus appropriately when done to Completed/Error. During the search, TaskStatus can be periodically checked if the search task was Stopped.
protected:
virtual void OnStartSearch();
protected:
virtual void OnStartSearch();
virtual void OnStartSearch();
protected virtual void OnStartSearch ();
abstract member OnStartSearch : unit -> unit
override this.OnStartSearch : unit -> unit
Protected Overridable Sub OnStartSearch ()
Remarks
During the search, in overrides of this method, the search implementer should set the SearchResults to indicate the number of results found so far. SearchCallback should be called on ReportProgress to report progress as the search progresses (if progress is supported) and should be called on ReportComplete when the search is completed (with or without errors). The TaskStatus should be set appropriately when done to Completed or Error. During the search, TaskStatus
can be periodically checked to determine if the search task was stopped.
This implementation of this method in the base class calls ReportComplete
with the SearchResults
set by derived classes, so you can call the base's class implementation for reporting task completion.