Task Class
An implementation of IVsTaskItem, used to modify the appearance and functionality of a task in the task list.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Shell.Task
Microsoft.VisualStudio.Shell.ErrorTask
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣告
<ComVisibleAttribute(True)> _
Public Class Task _
Implements IVsTaskItem, IVsProvideUserContext
[ComVisibleAttribute(true)]
public class Task : IVsTaskItem, IVsProvideUserContext
The Task type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Task() | Initializes a new instance of Task. | |
Task(Exception) | Initializes a new instance of Task for the supplied exception. |
Top
Properties
Name | Description | |
---|---|---|
CanDelete | Gets or sets whether or not the task can be deleted. | |
Category | Gets or sets the task's category. | |
Checked | Gets or sets whether not the task's check box is currently selected or cleared. | |
Column | Gets or sets the column number within the file associated with the task. | |
Document | Gets or sets the file associated with the task. | |
HelpKeyword | Gets or sets the Help keyword associated with the task. | |
ImageIndex | Gets or sets the index of the image associated with the task. | |
IsCheckedEditable | Gets or sets whether or not it is possible to edit the checked state of the task. | |
IsPriorityEditable | Gets or sets whether or not it is possible to edit the priority of a task. | |
IsTextEditable | Gets or sets whether or not it is possible to edit the description of a task. | |
Line | Gets or sets the line number of the file associated with the task. | |
Priority | Gets or sets the priority of a task. | |
SubcategoryIndex | Gets or sets the index of the subcategory of the task. | |
Text | Gets or sets the description of a task. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUserContext | Creates a new user context. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDeleted | Raised when the task has been deleted. | |
OnHelp | Raised when the user requests Help; for example by right-clicking and selecting Show Error Help. | |
OnNavigate | Raised when the user attempts to navigate to the task's location in the file, for example by double-clicking on the task. | |
OnRemoved | Raised when a task has been removed from the task list. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
Deleted | Handles OnDeleted events. | |
Help | Handles OnHelp events. | |
Navigate | Handles OnNavigate events. | |
Removed | Handles OnRemoved events. |
Top
Fields
Name | Description | |
---|---|---|
contextNameKeyword | Represents the keyword for the user context. This field is constant. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IVsTaskItem.CanDelete | Gets whether or not it is possible to delete the task. | |
IVsTaskItem.Category | Sets the task category. | |
IVsTaskItem.Column | Gets the column number of the file associated with the task. | |
IVsTaskItem.Document | Gets the name of the file associated with the task. | |
IVsTaskItem.get_Checked | Determines whether the task item's check box is currently selected or cleared. | |
IVsTaskItem.get_Priority | Gets the priority of the task. | |
IVsTaskItem.get_Text | Gets the description of the task. | |
IVsTaskItem.HasHelp | Determines whether or not the task has associated help. | |
IVsTaskItem.ImageListIndex | Gets the index of the image associated with the task. | |
IVsTaskItem.IsReadOnly | Determines whether or not the specified task field is read-only. | |
IVsTaskItem.Line | Gets the line number of the file associated with the task. | |
IVsTaskItem.NavigateTo | Opens a file associated with a task and moves to the appropriate position in the file. | |
IVsTaskItem.NavigateToHelp | Opens the Help resource associated with a task. | |
IVsTaskItem.OnDeleteTask | Raised when a task has been deleted. | |
IVsTaskItem.OnFilterTask | Raised when a task has been filtered into or out of a view. | |
IVsTaskItem.put_Checked | Sets whether a task item's check box is selected or cleared. | |
IVsTaskItem.put_Priority | Sets the priority level of a task item. | |
IVsTaskItem.put_Text | Sets the description of the task. | |
IVsTaskItem.SubcategoryIndex | Gets the index of the task in the subcategory list. |
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.