We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

VersionControlServer.GetItems Method (Int32[], Int32, Boolean)

Every file and folder on the server that is running Team Foundation Server has a unique ID assigned. This method allows you to get one or more Item objects for old versions of files or folders, based on the changeset that included those versions.

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

public Item[] GetItems(
	int[] itemIds,
	int changesetNumber,
	bool includeDownloadInfo
)

Parameters

itemIds
Type: System.Int32[]
changesetNumber
Type: System.Int32

A changeset that included these items. Note that you are passing many items, but you only review one changeset. This method is useful for you to get many items that were all part of the same changeset.

includeDownloadInfo
Type: System.Boolean

If you set includeDownloadInfo to true, the returned Item objects will contain information required to download the files. This makes the initial GetItems call slower, so should only be used if you want to download the files using the returned objects.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Item[]
Returns an array of Item objects that correspond to the passed itemIDs. (So the first Item object corresponds to the first itemId, and continuing in this pattern.) If an item cannot be found for a specific itemId and changeset, then the corresponding element in the item output array will be null.

If an item cannot be found for a specific ItemId and Changeset then the corresponding element in the item output array will be null.

Only set includeDownloadInfo to true if you want to download the files by using the returned objects. The call will be faster and require less bandwidth when this parameter is set to false. The overload methods includeDownloadInfo set to false.

Show: