VersionControlServer.GetItem Method (Int32, Int32)

Every file and folder on the server that is running Team Foundation Server has a unique ID assigned. This method allows you to get an Item object for an old version of a file or folder, based on the changeset that version was part of. If the item cannot be found, null is returned. Download information is not included in this method. The function call is faster without the download information, but if you want to download files, you should use one of the overload methods that will allow you to get download information with the returned items.

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

Syntax

'Declaration
Public Function GetItem ( _
    itemId As Integer, _
    changesetNumber As Integer _
) As Item
'Usage
Dim instance As VersionControlServer 
Dim itemId As Integer 
Dim changesetNumber As Integer 
Dim returnValue As Item 

returnValue = instance.GetItem(itemId, _
    changesetNumber)
public Item GetItem(
    int itemId,
    int changesetNumber
)
public:
Item^ GetItem(
    int itemId, 
    int changesetNumber
)
public function GetItem(
    itemId : int, 
    changesetNumber : int
) : Item

Parameters

  • itemId
    Type: System.Int32

    A unique ID of the file or folder that you want to get.

  • changesetNumber
    Type: System.Int32

    A changeset that included this version.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Item
Returns the Item if the Item was found, otherwise it is null.

.NET Framework Security

See Also

Reference

VersionControlServer Class

VersionControlServer Members

GetItem Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace