Share via


Query Class

Represents a query to the work item tracking service.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.WorkItemTracking.Client.Query

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

Syntax

'Declaration
Public NotInheritable Class Query
public sealed class Query
public ref class Query sealed
[<Sealed>]
type Query =  class end
public final class Query

The Query type exposes the following members.

Constructors

  Name Description
Public method Query(WorkItemStore, String) Initializes a new instance of the Query class.
Public method Query(WorkItemStore, String, BatchReadParameterCollection) Initializes a new instance of the Query class.
Public method Query(WorkItemStore, String, IDictionary) Initializes a new instance of the Query class.
Public method Query(WorkItemStore, String, array<Int32[]) Initializes a new instance of the Query class.
Public method Query(WorkItemStore, String, IDictionary, Boolean) Initializes a new instance of the Query class.
Public method Query(WorkItemStore, String, array<Int32[], array<Int32[]) Initializes a new instance of the Query class.

Top

Properties

  Name Description
Public property AsOf Gets the date and time, in local time, to which query results are current.
Public property AsOfUTC Gets the date and time, in UTC, to which query results are current.
Public property DisplayFieldList Gets the list of Fields that will be paged from the server when this query executes.
Public property IsBatchReadMode Gets a flag that describes whether the query is reading a batch of parameters.
Public property IsLinkQuery Gets a flag that describes whether this query is for WorkItemLink objects.
Public property IsTreeQuery Gets a flag that describes whether this query is recursive on links.
Public property QueryString Gets the query string.
Public property SortFieldList Gets the SortFieldList that can be used to sort the results of this query.
Public property WorkItemStore Gets the WorkItemStore that is being queried.

Top

Methods

  Name Description
Public method BeginCountOnlyQuery() Initializes a cancelable asynchronous query that will return only the count of results.
Public method BeginCountOnlyQuery(AsyncCallback) Initializes a cancelable asynchronous query that will return only the count of results by using a callback function.
Public method BeginLinkQuery() Initializes a cancelable asynchronous query that will return a collection of WorkItemLinkInfo objects.
Public method BeginLinkQuery(AsyncCallback) Initializes a cancelable asynchronous query that will return a collection of WorkItemLinkInfo objects by using a callback function.
Public method BeginQuery() Initializes a cancelable asynchronous query of WorkItem objects.
Public method BeginQuery(AsyncCallback) Initializes a cancelable asynchronous query of WorkItem objects by using a callback function.
Public method BeginRegularQuery() Initializes a query for WorkItem IDs.
Public method BeginRegularQuery(AsyncCallback) Initializes a query of WorkItem IDs by using a callback function.
Public method EndCountOnlyQuery Finalizes a cancelable asynchronous query that will return only the count of results.
Public method EndLinkQuery Finalizes a cancelable asynchronous query that will return an array of WorkItemLinkInfo objects.
Public method EndQuery Gets the WorkItemCollection object that resulted from the query.
Public method EndRegularQuery Finalizes a cancelable asynchronous query that will return an array of WorkItem IDs that resulted from the query.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLinkTypes Gets the array of WorkItemLinkTypeEnd objects that are associated with this query.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method RunCountQuery Executes a query that returns the number of results.
Public method RunLinkQuery Executes a query that gets an array of WorkItemLinkInfo objects.
Public method RunQuery Executes a query that gets a WorkItemCollection that contains WorkItem objects that satisfy the query.
Public method RunRegularQuery Executes a query that gets an array of WorkItem IDs that satisfy the query.
Public method RunRevisionQuery Executes a query that gets an enumerable collection of work item revisions.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event AsyncStateChanged Occurs when the state of the asynchronous query changes. Calls the WorkItemAsyncEventHandler event handler.

Top

Remarks

For a description of work item tracking queries, see Query for Bugs, Tasks, and Other Work Items.

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