Partager via


ICatalogService.QueryUpTree Method

Queries "up" the tree from the provided path looking for the provided types in its parent nodes' children. If the path is "TFSInstance1/PG1/TPC1/TP1" this query will be translated into a series of QueryNodes calls that have the following pathSpecs: "TFSInstance1/*" "TFSInstance1/PG1/*" "TFSInstance1/PG1/TPC1/*" An example of when this could be used is when a ReportingSite is being added to a node and it must find the ReportServer that is a child of one of its parent nodes.

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

Syntax

'Declaration
Function QueryUpTree ( _
    path As String, _
    resourceTypeFilters As IEnumerable(Of Guid), _
    queryOptions As CatalogQueryOptions _
) As ReadOnlyCollection(Of CatalogNode)
ReadOnlyCollection<CatalogNode> QueryUpTree(
    string path,
    IEnumerable<Guid> resourceTypeFilters,
    CatalogQueryOptions queryOptions
)
ReadOnlyCollection<CatalogNode^>^ QueryUpTree(
    String^ path, 
    IEnumerable<Guid>^ resourceTypeFilters, 
    CatalogQueryOptions queryOptions
)
abstract QueryUpTree : 
        path:string * 
        resourceTypeFilters:IEnumerable<Guid> * 
        queryOptions:CatalogQueryOptions -> ReadOnlyCollection<CatalogNode> 
function QueryUpTree(
    path : String, 
    resourceTypeFilters : IEnumerable<Guid>, 
    queryOptions : CatalogQueryOptions
) : ReadOnlyCollection<CatalogNode>

Parameters

  • path
    Type: System.String

    The path of the item from where the "up" query should originate. Wildcards cannot be used in this path.

  • queryOptions
    Type: Microsoft.TeamFoundation.Framework.Common.CatalogQueryOptions

    If ExpandDependencies is specified, the Dependencies property on nodes will contain the nodes they are dependent on. If IncludeParents is specified, the ParentNode property on the CatalogNode will contain the parent node. Leaving a given option will result in the returned catalog nodes to have null for that value. Extra data should only be retrieved if it is needed since computing and sending information can be expensive.

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<CatalogNode>
The catalog nodes that match the specified query.

.NET Framework Security

See Also

Reference

ICatalogService Interface

Microsoft.TeamFoundation.Framework.Client Namespace