QueryPendingSets Method (String[], RecursionType, String, String)
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

VersionControlServer.QueryPendingSets Method (String[], RecursionType, String, String)

When a user adds, deletes, edits, branches or merges a file, these changes are made in their workspace only. The changes are pending until the user checks them into Team Foundation Server. This function gets all the pending changes for the passed items, optionally filtered by workspace, but download information is not included. Without download information the function call is faster, but if you want to download files, you should use the overload method that will allow you to get download information with the returned items.This function cannot return pending changes on deleted items. If you want to get pending changes on deleted items, you can use an overload version of the same function.

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

public PendingSet[] QueryPendingSets(
	string[] items,
	RecursionType recursion,
	string queryWorkspaceName,
	string queryUserName


Type: System.String[]

The paths that you want to query for pending changes. Each string may represent a Team Foundation Server path ($/CmdLine/parse.cs) or a local path (C:\Code\CmdLine\parse.cs), in the latter case, the local path is mapped to a server path by way of a workspace. If any string in the list is null, an exception occurs. Wildcards are also supported.

Type: Microsoft.TeamFoundation.VersionControl.Client.RecursionType

The recursion parameter determines what files and folders you want to get. RecursionType.None examines the passed items only: if you passed in $/CmdLine then you will get pending sets for the folder $/CmdLine. RecursionType.OneLevel examines the passed items and, in folders, their children: if you passed in $/CmdLine you will get pending sets for the files and folders directly inside that folder.

RecursionType.Full examines the full tree: if you passed in $/CmdLine/parser.cs you will get all files called parser.cs inside $/CmdLine or any folder under it.

Type: System.String

queryWorkspaceName and queryUserName can be used to filter the results. If both are set to null, all pending sets for the specified items will be returned. If you set a queryWorkspaceName, you must also set a queryUserName.

In this case, the function will return only pending sets for that particular workspace/user.

Type: System.String

The username is associated with the queryWorkspaceName. If queryUserName is null, and queryWorkspaceName is not null, an exception occurs: in other words, you should pass null for both parameters, or neither.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.PendingSet[]
A PendingSet is a group of pending changes associated with a particular user and workspace. If you specified a queryWorkspaceName and queryUserName, you will get at most one pending set for each item you passed; if you left those parameters set to null, you may get many pending sets for the same item, which indicates that that different users have different pending changes in their workspaces. Each pending set may contain many different pending changes.

© 2016 Microsoft