VersionControlServer.GetItems Method (array<ItemSpec[], VersionSpec, DeletedState, ItemType, Boolean)

Gets a list of all items in the repository that matches the specified paths and version. The retrieval process is done in one pass to and from the server, therefore, it is faster to call this function once with five ItemSpec objects than to make five separate function calls.

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

Syntax

'Declaration
Public Function GetItems ( _
    itemSpecs As ItemSpec(), _
    version As VersionSpec, _
    deletedState As DeletedState, _
    itemType As ItemType, _
    includeDownloadInfo As Boolean _
) As ItemSet()
'Usage
Dim instance As VersionControlServer 
Dim itemSpecs As ItemSpec()
Dim version As VersionSpec 
Dim deletedState As DeletedState 
Dim itemType As ItemType 
Dim includeDownloadInfo As Boolean 
Dim returnValue As ItemSet()

returnValue = instance.GetItems(itemSpecs, _
    version, deletedState, itemType, _
    includeDownloadInfo)
public ItemSet[] GetItems(
    ItemSpec[] itemSpecs,
    VersionSpec version,
    DeletedState deletedState,
    ItemType itemType,
    bool includeDownloadInfo
)
public:
array<ItemSet^>^ GetItems(
    array<ItemSpec^>^ itemSpecs, 
    VersionSpec^ version, 
    DeletedState deletedState, 
    ItemType itemType, 
    bool includeDownloadInfo
)
public function GetItems(
    itemSpecs : ItemSpec[], 
    version : VersionSpec, 
    deletedState : DeletedState, 
    itemType : ItemType, 
    includeDownloadInfo : boolean
) : ItemSet[]

Parameters

  • deletedState
    Type: Microsoft.TeamFoundation.VersionControl.Client.DeletedState

    The DeletedState.NonDeleted from which you want to get non-deleted items, the DeletedState.Deleted from which you want to get deleted items, or the DeletedState.Any from which you want to get both.

    Note that the deletion ID in the ItemSpec refers to the object you are passing in; the DeletedState refers to the objects being returned. (You could, for instance, ask for deleted files inside a non-deleted folder.)

  • includeDownloadInfo
    Type: System.Boolean

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

Return Value

Type: array<Microsoft.TeamFoundation.VersionControl.Client.ItemSet[]
The returned ItemSet objects match the passed ItemSpecs one-for-one, so the third item in the returned array corresponds to the third item in the itemSpecs array, and continues in this pattern. Each ItemSet contains a QueryPath (which is null if the searched path was not valid), the matched pattern, and an array of Item objects for all the items that were getd.

Remarks

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 overloaded methods set includeDownloadInfo to false.

.NET Framework Security

See Also

Reference

VersionControlServer Class

VersionControlServer Members

GetItems Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace