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

Gets a list of all items in the repository that matches the specified paths and the 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. Download information is not included. Without download information the function call is faster, 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 GetItems ( _
    itemSpecs As ItemSpec(), _
    version As VersionSpec, _
    deletedState As DeletedState, _
    itemType As ItemType _
) As ItemSet()
'Usage
Dim instance As VersionControlServer 
Dim itemSpecs As ItemSpec()
Dim version As VersionSpec 
Dim deletedState As DeletedState 
Dim itemType As ItemType 
Dim returnValue As ItemSet()

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

Parameters

  • version
    Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpec

    The version of the passed items. Since this one version applies to all the items, it would be unusual to use a version number ("give me version 6 of all these things"); it would be much more common to use a date, a label, or VersionSpec.Latest which gets the current version of all items.

  • 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 that 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.)

Return Value

Type: array<Microsoft.TeamFoundation.VersionControl.Client.ItemSet[]
The returned ItemSet objects that match the passed ItemSpecs one-for-one, so that 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.

.NET Framework Security

See Also

Reference

VersionControlServer Class

VersionControlServer Members

GetItems Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace