Compartilhar via


VsSearchTask Class

Base class for implementing search tasks used by search-able tool windows.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Shell.VsSearchTask

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaração
Public Class VsSearchTask _
    Implements IVsSearchTask
public class VsSearchTask : IVsSearchTask

The VsSearchTask type exposes the following members.

Constructors

  Name Description
Public method VsSearchTask Initializes a new instance of the VsSearchTask class.

Top

Properties

  Name Description
Public property ErrorCode Gets or sets the error code describing the search result if the search task has completed with errors. If the task completes without errors, this property is set to zero (0).
Public property Id Gets the search task identifier. The task identifier is the cookie passed in the VsSearchTask constructor when the task was created.
Protected property SearchCallback Gets the callback interface that needs to be called when the search is complete.
Public property SearchQuery Gets the search query used by the search task.
Public property SearchResults Gets or sets the number of search results found. Set this value appropriately as the search progresses.
Public property TaskStatus Gets the status of the current search. This property is set to appropriate values as the search progresses.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnStartSearch Called on background threads when the search is started. Override to do task-specific search.
Protected method OnStopSearch Called on the UI thread when the search is stopped. Override to do task-specific stop actions.
Protected method SetTaskStatus Helper function to set the task status.
Public method Start Starts the search task.
Public method Stop Stops the search task.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate property IVsSearchTask.Status Gets the task status.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace