Share via


TeamFoundationVersionControlService.QueryBranches Method

Find all of the relatives for each item specification.

e.g.: Craig branches a.cs -> b.cs Justin branches b.cs -> c.cs Amy branches b.cs -> d.cs Then the following data should be returned when QueryBranches is called by using a.cs, b.cs, c.cs, or d.cs: BranchToItem: a.cs, BranchFromItem: NULL BranchToItem: b.cs, BranchFromItem: a.cs BranchToItem: c.cs, BranchFromItem: b.cs BranchToItem: d.cs, BranchFromItem: b.cs that is The branch graph of the item.

An additional complication is that the user asking for this data might not have Read permission on all of the branch relatives. When this occurs, the appropriate Item structure is set to NULL.

The RelativeToItemId, and RelativeFromItemId are assigned based on ServerItem;Changeset so that the caller of this API can always determine the shape of the graph, even if all of the data is not visible to the user.

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

Syntax

'Declaration
Public Function QueryBranches ( _
    requestContext As TeamFoundationRequestContext, _
    workspaceName As String, _
    workspaceOwner As String, _
    items As ItemSpec(), _
    version As VersionSpec _
) As BranchRelative()()
public BranchRelative[][] QueryBranches(
    TeamFoundationRequestContext requestContext,
    string workspaceName,
    string workspaceOwner,
    ItemSpec[] items,
    VersionSpec version
)
public:
array<array<BranchRelative^>^>^ QueryBranches(
    TeamFoundationRequestContext^ requestContext, 
    String^ workspaceName, 
    String^ workspaceOwner, 
    array<ItemSpec^>^ items, 
    VersionSpec^ version
)
member QueryBranches : 
        requestContext:TeamFoundationRequestContext * 
        workspaceName:string * 
        workspaceOwner:string * 
        items:ItemSpec[] * 
        version:VersionSpec -> BranchRelative[][] 
public function QueryBranches(
    requestContext : TeamFoundationRequestContext, 
    workspaceName : String, 
    workspaceOwner : String, 
    items : ItemSpec[], 
    version : VersionSpec
) : BranchRelative[][]

Parameters

  • workspaceName
    Type: System.String

    The workspace to resolve ItemSpecs against.

Return Value

Type: array<array<Microsoft.TeamFoundation.VersionControl.Server.BranchRelative[][]
BranchRelative[][]

.NET Framework Security

See Also

Reference

TeamFoundationVersionControlService Class

Microsoft.TeamFoundation.VersionControl.Server Namespace