ICatalogService.QueryParents Method
Returns the nodes for the resource provided as well as the parents. The direct nodes and the parent nodes will not be returned if they are filtered out. For the following tree: PG1 / \ PG2 PG3 / \ \ TPC1 TPC2 TPC3 / \ TP1 TP2 Query for TP1's identifier with no filters and recursing to the root would yeild TP1, TPC1, PG2 and PG1.
Namespace: Microsoft.TeamFoundation.Framework.Client
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Function QueryParents ( _
resourceIdentifier As Guid, _
pathFilters As IEnumerable(Of String), _
resourceTypeFilters As IEnumerable(Of Guid), _
recurseToRoot As Boolean, _
queryOptions As CatalogQueryOptions _
) As ReadOnlyCollection(Of CatalogNode)
ReadOnlyCollection<CatalogNode> QueryParents(
Guid resourceIdentifier,
IEnumerable<string> pathFilters,
IEnumerable<Guid> resourceTypeFilters,
bool recurseToRoot,
CatalogQueryOptions queryOptions
)
ReadOnlyCollection<CatalogNode^>^ QueryParents(
Guid resourceIdentifier,
IEnumerable<String^>^ pathFilters,
IEnumerable<Guid>^ resourceTypeFilters,
bool recurseToRoot,
CatalogQueryOptions queryOptions
)
abstract QueryParents :
resourceIdentifier:Guid *
pathFilters:IEnumerable<string> *
resourceTypeFilters:IEnumerable<Guid> *
recurseToRoot:bool *
queryOptions:CatalogQueryOptions -> ReadOnlyCollection<CatalogNode>
function QueryParents(
resourceIdentifier : Guid,
pathFilters : IEnumerable<String>,
resourceTypeFilters : IEnumerable<Guid>,
recurseToRoot : boolean,
queryOptions : CatalogQueryOptions
) : ReadOnlyCollection<CatalogNode>
Parameters
resourceIdentifier
Type: System.GuidThe identifier for the resource who's parents are being queried. The resource and its nodes will only be returned if they are not filtered out
pathFilters
Type: System.Collections.Generic.IEnumerable<String>Nodes will only be returned if they live under one of the paths provided here. If this value is null or empty it will be assumed that parents from all places within the tree are valid.
resourceTypeFilters
Type: System.Collections.Generic.IEnumerable<Guid>The list of types that this query should include. If this is null or empty, all types will be included.
recurseToRoot
Type: System.BooleanIf this is true then parent nodes will be enumerated all the way to the root. If this is false then only the first level of parents will be returned.
queryOptions
Type: Microsoft.TeamFoundation.Framework.Common.CatalogQueryOptionsIf 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 nodes for the resource provided as well as the parents of those nodes that apply to the provided filters.
.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.