Microsoft.TeamFoundation.WorkItemTracking.Client Namespace
The 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 | |
---|---|---|
Administration | Class for administrative tasks to perform on a work item store. | |
AllowedValuesCollection | Represents a list of valid values for a Field. | |
Attachment | Describes a file attachment to a work item. | |
AttachmentCollection | Stores the attachments that are associated with a work item. | |
BatchReadParameter | Represents an ID and revision pair that will be added to a BatchReadParameterCollection. | |
BatchReadParameterCollection | Represents a collection of parameters from a batch read. | |
BatchSave | Represents methods and properties for batch saving work item links. | |
BatchSaveError | Class to describe a batch save error for a single work item. | |
BatchSaveFailedException | Class for a batch save failed error. | |
BatchSaveRetryFailedException | Class for an error that occurs during a retry of a batch save. | |
CancelableAsyncResult | Class that is used to access the state of the asynchronous operation or to cancel the result. | |
CannotChangePageSizeException | Obsolete. Class for an attempt to change page size error. | |
Category | Describes the category of work item types. | |
CategoryCollection | A collection of category objects. | |
ClientException | Base class for all client-generated exceptions. | |
ConnectionException | Class to describe a connection failure to the server. | |
CoreFieldReferenceNames | Class that contains the reference names for core fields. | |
CoreLinkTypeReferenceNames | Class that contains reference names for core link types. | |
DeniedOrNotExistException | Class to describe access denied or item does not exist exceptions. | |
DisplayFieldList | Represents a collection of WorkItem FieldDefinitions that will be paged from the server when the WorkItems in a WorkItemCollection are accessed. | |
DuplicateBatchReadParameterException | Class for a duplicate batch read parameter error. | |
DuplicateWorkItemException | Obsolete. Class for a duplicate work item error. | |
ExternalLink | Represents a link to other tools. | |
Field | Represents a field in a WorkItem. | |
FieldCollection | Represents a collection of Fields in a WorkItem object. | |
FieldDefinition | Represents the attributes of a Field. | |
FieldDefinitionCollection | Describes a collection of FieldDefinition objects. | |
FieldDefinitionNotExistException | Class for an error when a field definition does not exist. | |
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. | |
FieldFilterList | Represents a list of field filters that can be sorted by using a query. | |
FileAttachmentException | Class for a file attachment error. | |
Hyperlink | Represents a hyperlink. The link type is URL, UNC, or BIS URI. | |
IdentityNotExistException | Class for an error when an identity does not exist in a collection. | |
ImportEventArgs | Arguments for import events. | |
ImportStructureException | Class for an error that occurs during import of a work item type. | |
ImportWorkItemLinkTypeException | Class for a query text error that is not valid. | |
ImportWorkitemTypeException | Class for an error that occurs during import of a work item type. | |
InternalDatastoreException | Exception for an error in the internal data store. | |
InternalFields | Defines all internal field reference names. | |
InvalidFieldValueException | Class for an error that occurs when an attempt is made to write an invalid value to a field. | |
InvalidProjectException | Obsolete. Class for an invalid project error. | |
InvalidQueryTextException | Class for a query text error that is not valid. | |
InvalidTreeNodeException | Class for an invalid tree node error. | |
ItemAlreadyUpdatedOnServerException | Class for an item already updated on server error. | |
Link | Describes the implementation of a link. | |
LinkCollection | Represents the collection of Link objects that belongs to a WorkItem. | |
MetadataEventArgs | Arguments for metadata change events. | |
Node | Describes a Node object that is used in the work item tracking data structures. | |
NodeCollection | Represents a collection of Node objects. | |
PageSizeRangeException | Class for an error in the page size range. | |
Project | Represents a work item tracking project. | |
ProjectCollection | Represents a collection of projects. | |
Query | Represents a query to the work item tracking service. | |
QueryDefinition | Represents a query. | |
QueryFolder | Represents a folder in a team project that can contain QueryDefinitions and other QueryFolders. | |
QueryFolderContentsChangedEventArgs | Event arguments for the QueryFolderContentsChanged event. | |
QueryHierarchy | Represents the top-level folder in a project. | |
QueryHierarchyException | Class for an error that occurs during a query of the hierarchy of the work item store. | |
QueryItem | The base class for query folders and query definitions. | |
ReadOnlyFieldException | Class for an attempt to write to a read-only field error. | |
RegisteredLinkType | Describes a registered link type. | |
RegisteredLinkTypeCollection | A collection of valid registered link types. | |
RelatedLink | Links two work item objects in the same work item store and across stores. | |
ReportingAttributes | Describes the reporting attributes of the field. | |
RequestCancelledByUserException | Class for a request cancelled by user error. | |
RequestNotCancelableException | Class for an attempt to cancel a noncancelable request error. | |
Revision | Represents a work item revision state. | |
RevisionCollection | Represents the revision history of a work item. | |
Schemas | Abstract class that contains schema-related methods. | |
Server | Class used to make server calls. | |
ServerInfo | This class exposes information about the server. | |
ServerRejectedChangesException | Class for a server rejected changes error. | |
SortField | Represents a WorkItemField that can be used to sort the results of a query. | |
SortFieldList | Represents a collection of SortFields that can be sorted by a query. | |
StoredQueriesChangedEventArgs | Arguments or the StoredQueriesChanged event. | |
StoredQuery | Represents a stored query. | |
StoredQueryCollection | Represents the stored queries collection from a project or work item store. | |
SupportedFeatures | A list of IDs for all known supported features. | |
TreeViolationException | Class for an error that occurs during import of a work item type. | |
UnexpectedErrorException | A class to report unusual error conditions. | |
UnsupportedDocumentVersionException | Class for unsupported document version errors. | |
ValidationException | Class to describe validation exceptions. | |
ValuesCollection | A collection of values. | |
VerbatimMessageException | Class for an error that has a message that should be displayed verbatim. | |
WorkItem | Represents a work item on Team Foundation Server. | |
WorkItemAsyncEventArgs | A class to handle WorkItem asynchronous change events to the state of a query. | |
WorkItemChangeRejectedException | Class for a work item change rejection error. | |
WorkItemCollection | Represents a collection of work items that result from a query to the WorkItemStore. | |
WorkItemEventArgs | Arguments for a work item event. | |
WorkItemLink | Links two WorkItems in the same WorkItemStore. | |
WorkItemLinkCollection | Represents a collection of WorkItemLinks. | |
WorkItemLinkEventArgs | Arguments for a work item link event. | |
WorkItemLinkType | Represents a specific type of WorkItemLink. | |
WorkItemLinkTypeCollection | Represents a collection of WorkItemLinkType objects. | |
WorkItemLinkTypeEnd | Represents an endpoint of a WorkItemLinkType. | |
WorkItemLinkTypeEndCollection | Represents a collection of WorkItemLinkTypeEnd objects. | |
WorkItemLinkValidationException | Class for an error that occurs during validation of a work item link. | |
WorkItemOperationError | Represents the error of an operation on a work item. | |
WorkItemStore | Represents the Work Item Tracking client connection to a server that is running Team Foundation Server. | |
WorkItemStoreDiagnostics | Implements diagnostic methods for the work item link service. | |
WorkItemType | Represents a specific type of WorkItem. | |
WorkItemTypeCollection | Represents a collection of WorkItemType objects. | |
WorkItemTypeDeniedOrNotExistException | Class to describe access denied or work item type does not exist exceptions. |
Structures
Structure | Description | |
---|---|---|
FieldIndexData | Data structure for field index data. | |
WorkItemLinkInfo | Structure that represents WorkItemLink query results. | |
WorkItemLinkValidationException.WorkItemLinkInfo | Describes the work item link information. |
Delegates
Delegate | Description | |
---|---|---|
ImportEventHandler | Event handler for an import. | |
MetadataChangeEventHandler | Event handler for metadata changes. | |
QueryFolderContentsChangedEventHandler | Event handler delegate for the ContentsChanged and ChangesCommitted event. | |
StoredQueriesEventHandler | The event handler for stored queries. | |
WorkItemAsyncEventHandler | This event handler listens to asynchronous changes to the state of a query. | |
WorkItemFieldChangeEventHandler | Event handler delegate for events that are fired when a field is changed. |
Enumerations
Enumeration | Description | |
---|---|---|
BaseLinkType | Describes the type of a link. | |
CancelableActionState | Describes the state of a cancellable action. | |
CoreField | Specifies the type of a WorkItem field. | |
FieldStatus | Describes status of a field. | |
FieldType | Describes the data type of a Field. | |
FieldUsages | Describes the type of object on which a FieldDefinition applies. | |
ImportSeverity | Describes the severity of an event. | |
ImportStructureException.Type | Describes the type of the exception. | |
ImportWorkItemLinkTypeException.Type | Further specifies the type of a WorkItemLinkTypeException. | |
ImportWorkitemTypeException.Type | Further classification of the WorkitemType exception. | |
LinkAction | Describes how the collection was modified. | |
MetadataChangeTypes | Describes all possible metadata change types. | |
Node.TreeType | Describes the type of tree (area or iteration). | |
PageSizes | Describes the page sizes that are supported for queries and batch reads. | |
QueryFolderAction | Indicates the type of changes that occurred to an item in a folder. | |
QueryHierarchyException.Type | Further classifies a QueryHierarchyException. | |
QueryItemPermissions | Permissions bit masks for query items. | |
QueryScope | Describes the query scope. | |
QueryType | Describes the type of the query. | |
ReportingType | Describes the reporting type of the field. | |
SaveFlags | Describes the save flags. | |
SchemaType | Describes the schema of an XML document. | |
SortType | Describes the order by which a SortField is sorted. | |
StoredQueriesAction | Describes the latest action that was performed on a stored queries collection. | |
StringDataLengths | Describes the maximum lengths for string values that may be saved to the database. | |
TargetSet | Specifies the target link collection. | |
UserDisplayMode | Specifies the display mode of the user account. | |
WorkItemCopyFlags | Flags that specify optional work item data that should be copied. | |
WorkItemLinkType.Topology | Describes the allowed Topology types for WorkItemLinkType. | |
WorkItemLinkValidationException.Action | Describes the action of the exception. | |
WorkItemLinkValidationException.Type | Describes the type of the exception. |