Compartilhar via


WorkItemType Class

Represents a specific type of WorkItem.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemType

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

Syntax

'Declaração
Public NotInheritable Class WorkItemType
public sealed class WorkItemType
public ref class WorkItemType sealed
[<Sealed>]
type WorkItemType =  class end
public final class WorkItemType

The WorkItemType type exposes the following members.

Properties

  Name Description
Public property Description Gets a user-readable description of this work item type.
Public property DisplayForm Gets the URL of the display form for this work item type.
Public property FieldDefinitions Gets the collection of FieldDefinitions that belongs to this work item type.
Public property Name Gets the name of this work item type.
Public property Project Gets the Project to which this work item type belongs.
Public property Store Gets the WorkItemStore that contains this work item type.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method Export Exports the work item type definition to XML.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetNextState Gets the next state of this work item type based on the current state and the specified action.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method NewWorkItem Creates and returns a new WorkItem instance of this work item type.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public methodStatic member Validate(Project, String) Validates this work item type in the context of the specified Project.
Public methodStatic member Validate(WorkItemStore, String) Validates the work item type in the context of the specified WorkItemStore.
Public methodStatic member Validate(Project, String, String) Validates the work item type in the context of the given Project and development method.
Public methodStatic member Validate(WorkItemStore, String, String) Validates the work item type in the context of the specified WorkItemStore.

Top

Events

  Name Description
Public eventStatic member ValidationEventHandler Event handler for events that occur during the Validate call.

Top

Remarks

More detail on work item types can be found in Customizing Project Tracking Data, Forms, Workflow, and Other Objects. The XML schema for a work item type is described in Index to XML Element Definitions for Types of Work Items.

Each WorkItem contains a reference to the WorkItemType that it implements. You must specify a WorkItemType when you construct a WorkItem through: WorkItem.WorkItem(WorkItemType). You can get the WorkItemType of a WorkItem through the WorkItem.Type property.

You can determine the rules that govern the fields of this work item type by exporting the work item type definition to XML and parsing the XML.

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