Compartir a través de


TaskItems Interface

Definition

The TaskItems collection contains all of the tasks in the Task List window.

public interface class TaskItems : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("4B51103D-513C-4773-B56A-354D0928FD04")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface TaskItems : System.Collections.IEnumerable
[System.Runtime.InteropServices.Guid("4B51103D-513C-4773-B56A-354D0928FD04")]
public interface TaskItems : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("4B51103D-513C-4773-B56A-354D0928FD04")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type TaskItems = interface
    interface IEnumerable
[<System.Runtime.InteropServices.Guid("4B51103D-513C-4773-B56A-354D0928FD04")>]
type TaskItems = interface
    interface IEnumerable
Public Interface TaskItems
Implements IEnumerable
Derived
Attributes
Implements

Examples

Sub TaskItemsCollectionExample()  
   Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)  
   Dim TL As TaskList = win.Object  
   Dim TLItem As TaskItem  

   ' Add a couple of tasks to the Task List.  
   TLItem = TL.TaskItems.Add(" ", " ", "Test task 1.", vsTaskPriority.vsTaskPriorityHigh, vsTaskIcon.vsTaskIconUser, True, , 10, , )  
   TLItem = TL.TaskItems.Add(" ", " ", "Test task 2.", vsTaskPriority.vsTaskPriorityLow, vsTaskIcon.vsTaskIconComment, , 20, , )  

   ' List the total number of task list items after adding the new   
   ' task items.  
   MsgBox("Task Item 1 description: " & TL.TaskItems.Item(2).Description)  
   MsgBox("Total number of task items: " & TL.TaskItems.Count)  

   ' Remove the second task item. The items list in reverse numeric order.  
   MsgBox("Deleting the second task item")  
   TL.TaskItems.Item(1).Delete()  
   MsgBox("Total number of task items: " & TL.TaskItems.Count)  
End Sub  

Properties

Count

Gets a value indicating the number of objects in the collection.

DTE

Gets the top-level extensibility object.

Parent

Gets the immediate parent object of a TaskItems collection.

Methods

Add(String, String, String, vsTaskPriority, Object, Boolean, String, Int32, Boolean, Boolean)
ForceItemsToTaskList()

Sends all task items not yet added to the task list.

GetEnumerator()

Gets an enumeration for items in a collection.

Item(Object)

Returns a TaskItem object in a TaskItems collection.

Applies to