Microsoft.TeamFoundation.WorkItemTracking.Client Namespace

The Microsoft.TeamFoundation.WorkItemTracking.Client namespace provides the APIs that are required to enable a client computer or application to work with user stories, requirements, tasks, bugs, and other types of work items.

The WorkItemStore represents the connection to the repository of work items on Visual Studio Team Foundation Server. The WorkItem object contains Fields that store data, Attachments that represent files, and WorkItemLinks that connect to other work items. The following example code demonstrates how to access a “User Story” work item type on a work item store.

// Connect to the server and the store, and get the WorkItemType object
// for user stories from the team project where the user story will be created. 
Uri collectionUri = (args.Length < 1) new Uri("http://server:port/vdir/DefaultCollection") : new Uri(args[0]);
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(collectionUri);
WorkItemStore workItemStore = tpc.GetService<WorkItemStore>();
Project teamProject = workItemStore.Projects["DinnerNow"];
WorkItemType workItemType = teamProject.WorkItemTypes["User Story"];

The Query class represents a query to the WorkItemStore. An executed query returns a WorkItemCollection, which contains the work items that satisfy the query.

The WorkItemType class defines a work item. The FieldDefinition class defines a field in a work item. The WorkItemLinkType class defines a WorkItemLink, which links two work items.

You can find the Microsoft.TeamFoundation.WorkItemTracking.Client namespace in \Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0 on computers where Team Explorer is installed, in the following assembly:

  • Microsoft.TeamFoundation.WorkItemTracking.Client.dll

Classes

  Class Description
Public class Administration Class for administrative tasks to perform on a work item store.
Public class AllowedValuesCollection Represents a list of valid values for a Field.
Public class Attachment Describes a file attachment to a work item.
Public class AttachmentCollection Stores the attachments that are associated with a work item.
Public class BatchReadParameter Represents an ID and revision pair that will be added to a BatchReadParameterCollection.
Public class BatchReadParameterCollection Represents a collection of parameters from a batch read.
Public class BatchSave Represents methods and properties for batch saving work item links.
Public class BatchSaveError Class to describe a batch save error for a single work item.
Public class BatchSaveFailedException Class for a batch save failed error.
Public class BatchSaveRetryFailedException Class for an error that occurs during a retry of a batch save.
Public class CancelableAsyncResult Class that is used to access the state of the asynchronous operation or to cancel the result.
Public class CannotChangePageSizeException Obsolete. Class for an attempt to change page size error.
Public class Category Describes the category of work item types.
Public class CategoryCollection A collection of category objects.
Public class ClientException Base class for all client-generated exceptions.
Public class ClientWiqlAdapterHelper
Public class ConnectionException Class to describe a connection failure to the server.
Public class CoreFieldReferenceNames Class that contains the reference names for core fields.
Public class CoreLinkTypeReferenceNames Class that contains reference names for core link types.
Public class DeniedOrNotExistException Class to describe access denied or item does not exist exceptions.
Public class DisplayFieldList Represents a collection of WorkItem. FieldDefinitions that will be paged from the server when the WorkItems in a WorkItemCollection are accessed.
Public class DuplicateBatchReadParameterException Class for a duplicate batch read parameter error.
Public class DuplicateWorkItemException Obsolete. Class for a duplicate work item error.
Public class ExternalLink Represents a link to other tools.
Public class Field Represents a field in a WorkItem.
Public class FieldCollection Represents a collection of Fields in a WorkItem object.
Public class FieldConflict
Public class FieldDefinition Represents the attributes of a Field.
Public class FieldDefinitionCollection Describes a collection of FieldDefinition objects.
Public class FieldDefinitionNotExistException Class for an error when a field definition does not exist.
Public class FieldFilter Represents a single field-value pair that can be used to model a FieldDefinition object. Used together with a FieldFilterList to filter allowed values of fields.
Public class FieldFilterList Represents a list of field filters that can be sorted by using a query.
Public class FileAttachmentException Class for a file attachment error.
Public class Hyperlink Represents a hyperlink. The link type is URL, UNC, or BIS URI.
Public class IdentityNotExistException Class for an error when an identity does not exist in a collection.
Public class ImportEventArgs Arguments for import events.
Public class ImportStructureException Class for an error that occurs during import of a work item type.
Public class ImportWorkItemLinkTypeException Class for a query text error that is not valid.
Public class ImportWorkitemTypeException Class for an error that occurs during import of a work item type.
Public class InternalDatastoreException Exception for an error in the internal data store.
Public class InternalFields Defines all internal field reference names.
Public class InvalidFieldValueException Class for an error that occurs when an attempt is made to write an invalid value to a field.
Public class InvalidProjectException Obsolete. Class for an invalid project error.
Public class InvalidQueryTextException Class for a query text error that is not valid.
Public class InvalidTreeNodeException Class for an invalid tree node error.
Public class ItemAlreadyUpdatedOnServerException Class for an item already updated on server error.
Public class Link Describes the implementation of a link.
Public class LinkCollection Represents the collection of Link objects that belongs to a WorkItem.
Public class MetadataEventArgs Arguments for metadata change events.
Public class Node Describes a Node object that is used in the work item tracking data structures.
Public class NodeCollection Represents a collection of Node objects.
Public class PageSizeRangeException Class for an error in the page size range.
Public class Project Represents a work item tracking project.
Public class ProjectCollection Represents a collection of projects.
Public class Query Represents a query to the work item tracking service.
Public class QueryDefinition Represents a query.
Public class QueryFolder Represents a folder in a team project that can contain QueryDefinitions and other QueryFolders.
Public class QueryFolderContentsChangedEventArgs Event arguments for the QueryFolderContentsChanged event.
Public class QueryHierarchy Represents the top-level folder in a project.
Public class QueryHierarchyException Class for an error that occurs during a query of the hierarchy of the work item store.
Public class QueryItem The base class for query folders and query definitions.
Public class ReadOnlyFieldException Class for an attempt to write to a read-only field error.
Public class RegisteredLinkType Describes a registered link type.
Public class RegisteredLinkTypeCollection A collection of valid registered link types.
Public class RelatedLink Links two work item objects in the same work item store and across stores.
Public class ReportingAttributes Describes the reporting attributes of the field.
Public class RequestCancelledByUserException Class for a request cancelled by user error.
Public class RequestNotCancelableException Class for an attempt to cancel a noncancelable request error.
Public class Revision Represents a work item revision state.
Public class RevisionCollection Represents the revision history of a work item.
Public class Schemas Abstract class that contains schema-related methods.
Public class Server Class used to make server calls.
Public class ServerInfo This class exposes information about the server.
Public class ServerRejectedChangesException Class for a server rejected changes error.
Public class SortField Represents a WorkItemField that can be used to sort the results of a query.
Public class SortFieldList Represents a collection of SortFields that can be sorted by a query.
Public class StoredQueriesChangedEventArgs Arguments or the StoredQueriesChanged event.
Public class StoredQuery Represents a stored query.
Public class StoredQueryCollection Represents the stored queries collection from a project or work item store.
Public class SupportedFeatures A list of IDs for all known supported features.
Public class TreeViolationException Class for an error that occurs during import of a work item type.
Public class UnexpectedErrorException A class to report unusual error conditions.
Public class UnsupportedDocumentVersionException Class for unsupported document version errors.
Public class ValidationException Class to describe validation exceptions.
Public class ValuesCollection A collection of values.
Public class VerbatimMessageException Class for an error that has a message that should be displayed verbatim.
Public class WorkItem Represents a work item on Team Foundation Server.
Public class WorkItemAsyncEventArgs A class to handle WorkItem asynchronous change events to the state of a query.
Public class WorkItemChangeRejectedException Class for a work item change rejection error.
Public class WorkItemCollection Represents a collection of work items that result from a query to the WorkItemStore.
Public class WorkItemEventArgs Arguments for a work item event.
Public class WorkItemLink Links two WorkItems in the same WorkItemStore.
Public class WorkItemLinkCollection Represents a collection of WorkItemLinks.
Public class WorkItemLinkEventArgs Arguments for a work item link event.
Public class WorkItemLinkType Represents a specific type of WorkItemLink.
Public class WorkItemLinkTypeCollection Represents a collection of WorkItemLinkType objects.
Public class WorkItemLinkTypeEnd Represents an endpoint of a WorkItemLinkType.
Public class WorkItemLinkTypeEndCollection Represents a collection of WorkItemLinkTypeEnd objects.
Public class WorkItemLinkValidationException Class for an error that occurs during validation of a work item link.
Public class WorkItemOperationError Represents the error of an operation on a work item.
Public class WorkItemStore Represents the Work Item Tracking client connection to a server that is running Team Foundation Server.
Public class WorkItemStoreDiagnostics Implements diagnostic methods for the work item link service.
Public class WorkItemType Represents a specific type of WorkItem.
Public class WorkItemTypeCollection Represents a collection of WorkItemType objects.
Public class WorkItemTypeDeniedOrNotExistException Class to describe access denied or work item type does not exist exceptions.

Structures

  Structure Description
Public structure FieldIndexData Data structure for field index data.
Public structure WorkItem.EditActionInfo
Public structure WorkItem.EditActionSet
Public structure WorkItemLinkInfo Structure that represents WorkItemLink query results.
Public structure WorkItemLinkValidationException.WorkItemLinkInfo Describes the work item link information.

Delegates

  Delegate Description
Public delegate ImportEventHandler Event handler for an import.
Public delegate MetadataChangeEventHandler Event handler for metadata changes.
Public delegate QueryFolderContentsChangedEventHandler Event handler delegate for the ContentsChanged and ChangesCommitted event.
Public delegate StoredQueriesEventHandler The event handler for stored queries.
Public delegate WorkItemAsyncEventHandler This event handler listens to asynchronous changes to the state of a query.
Public delegate WorkItemFieldChangeEventHandler Event handler delegate for events that are fired when a field is changed.
Public delegate WorkItemPreSaveEventHandler

Enumerations

  Enumeration Description
Public enumeration BaseLinkType Describes the type of a link.
Public enumeration CancelableActionState Describes the state of a cancellable action.
Public enumeration CoreField Specifies the type of a WorkItem field.
Public enumeration FieldStatus Describes status of a field.
Public enumeration FieldType Describes the data type of a Field.
Public enumeration FieldUsages Describes the type of object on which a FieldDefinition applies.
Public enumeration ImportSeverity Describes the severity of an event.
Public enumeration ImportStructureException.Type Describes the type of the exception.
Public enumeration ImportWorkItemLinkTypeException.Type Further specifies the type of a WorkItemLinkTypeException.
Public enumeration ImportWorkitemTypeException.Type Further classification of the WorkitemType exception.
Public enumeration LinkAction Describes how the collection was modified.
Public enumeration MetadataChangeTypes Describes all possible metadata change types.
Public enumeration Node.TreeType Describes the type of tree (area or iteration).
Public enumeration PageSizes Describes the page sizes that are supported for queries and batch reads.
Public enumeration QueryFolderAction Indicates the type of changes that occurred to an item in a folder.
Public enumeration QueryHierarchyException.Type Further classifies a QueryHierarchyException.
Public enumeration QueryItemPermissions Permissions bit masks for query items.
Public enumeration QueryScope Describes the query scope.
Public enumeration QueryType Describes the type of the query.
Public enumeration ReportingType Describes the reporting type of the field.
Public enumeration SaveFlags Describes the save flags.
Public enumeration SchemaType Describes the schema of an XML document.
Public enumeration SortType Describes the order by which a SortField is sorted.
Public enumeration StoredQueriesAction Describes the latest action that was performed on a stored queries collection.
Public enumeration StringDataLengths Describes the maximum lengths for string values that may be saved to the database.
Public enumeration TargetSet Specifies the target link collection.
Public enumeration UserDisplayMode Specifies the display mode of the user account.
Public enumeration WorkItem.EditAction
Public enumeration WorkItem.EditActionFlags
Public enumeration WorkItemCopyFlags Flags that specify optional work item data that should be copied.
Public enumeration WorkItemLinkType.Topology Describes the allowed Topology types for WorkItemLinkType.
Public enumeration WorkItemLinkValidationException.Action Describes the action of the exception.
Public enumeration WorkItemLinkValidationException.Type Describes the type of the exception.
Public enumeration WorkItemStoreFlags Enum used to determine behavior of work item store object

See Also

Reference

Other Resources

Extending Team Foundation