Partager via


WorkItemCollection Class

Represents a collection of work items that result from a query to the WorkItemStore.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.WorkItemTracking.Common.ReadOnlyList
    Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemCollection

Namespace:  Microsoft.TeamFoundation.WorkItemTracking.Client
Assembly:  Microsoft.TeamFoundation.WorkItemTracking.Client (in Microsoft.TeamFoundation.WorkItemTracking.Client.dll)

Syntax

'Declaration
Public NotInheritable Class WorkItemCollection _
    Inherits ReadOnlyList
public sealed class WorkItemCollection : ReadOnlyList
public ref class WorkItemCollection sealed : public ReadOnlyList
[<Sealed>]
type WorkItemCollection =  
    class 
        inherit ReadOnlyList 
    end
public final class WorkItemCollection extends ReadOnlyList

The WorkItemCollection type exposes the following members.

Properties

  Name Description
Public property AsOf Gets or sets the time that the query was executed in the local time zone.
Public property AsOfUTC Gets or sets the time that the query was executed in UTC.
Public property Count Gets the number of WorkItems in this collection. (Overrides ReadOnlyList.Count.)
Public property DefaultProjectHint Gets or sets the Id of the Project to support in partial opening.
Public property DisplayFields Gets a list of the WorkItemFieldDefinitions that will be paged from the server when a WorkItem in this collection is accessed.
Public property IsFixedSize Obsolete. (Inherited from ReadOnlyList.)
Public property IsReadOnly Obsolete. (Inherited from ReadOnlyList.)
Public property IsSynchronized Obsolete. (Inherited from ReadOnlyList.)
Public property Item Gets the WorkItem in this collection at the specified index.
Public property PageSize Gets or sets the number of WorkItems that this collection will keep in cache from the server when a WorkItem that has not been cached is accessed.
Public property Query Gets information about the query that resulted in this collection.
Public property SortFields Gets a list of the SortFields that are associated with this collection.
Public property Store Gets the WorkItemStore that is associated with this collection.
Public property SyncRoot Obsolete. (Inherited from ReadOnlyList.)

Top

Methods

  Name Description
Public method Contains Checks whether the specified WorkItem occurs in this collection.
Public method CopyTo Obsolete. (Inherited from ReadOnlyList.)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method GetEnumerator (Inherited from ReadOnlyList.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf(Int32) Gets the index of the WorkItem that has the specified ID.
Public method IndexOf(WorkItem) Gets the index of a WorkItem in this collection.
Public method Resort Sorts this collection based on the current contents of the SortFields property.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IList.Add (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.Clear (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.Contains (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method ICollection.CopyTo (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property ICollection.Count (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.IndexOf (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.Insert (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property IList.IsFixedSize (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property IList.IsReadOnly (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property ICollection.IsSynchronized (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property IList.Item (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.Remove (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate method IList.RemoveAt (Inherited from ReadOnlyList.)
Explicit interface implemetationPrivate property ICollection.SyncRoot (Inherited from ReadOnlyList.)

Top

Remarks

A WorkItemCollection is returned by methods such as WorkItemStore.Query(String). The properties of a WorkItemCollection contain information about the query that resulted in this particular collection:

  • The time that the query was executed.

  • The query string that resulted in this collection.

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.TeamFoundation.WorkItemTracking.Client Namespace