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.
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
'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
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.)
The ItemType.Folder from which you want to get folders, the ItemType.File from which you want to get files, or the ItemType.Any fron which you want to get both.
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.
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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.