VsSearchTask.OnStartSearch Method
Called on background threads when the search is started. Override to do task-specific search.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaration
Protected Overridable Sub OnStartSearch
protected virtual void OnStartSearch()
protected:
virtual void OnStartSearch()
abstract OnStartSearch : unit -> unit
override OnStartSearch : unit -> unit
protected function 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.