CatalogWebService.QueryParents 方法
會傳回資源的節點提供父,除了之外。
如果兩個篩選,直接節點和父節點不會傳回。 對於下列樹狀結構:PG1/\ PG2 PG3/\ \ TPC1 TPC2 TPC3/\ TP1 TP2 Query for TP1's identifier without filters and recursing to the root would yield TP1, TPC1, PG2 and PG 1。
命名空間: Microsoft.TeamFoundation.Framework.Server.WebServices
組件: Microsoft.TeamFoundation.Framework.Server (在 Microsoft.TeamFoundation.Framework.Server.dll 中)
語法
'宣告
<WebMethodAttribute> _
Public Function QueryParents ( _
resourceIdentifier As Guid, _
pathFilters As String(), _
resourceTypeFilters As Guid(), _
recurseToRoot As Boolean, _
queryOptions As Integer _
) As CatalogData
[WebMethodAttribute]
public CatalogData QueryParents(
Guid resourceIdentifier,
string[] pathFilters,
Guid[] resourceTypeFilters,
bool recurseToRoot,
int queryOptions
)
參數
- resourceIdentifier
型別:System.Guid
父查詢資源的識別項。如果沒有篩選,資源和其節點只會傳回
- pathFilters
型別:array<System.String[]
如果它們位於提供的其中一個路徑下這裡,節點只會傳回。如果這個值為 null 或空白的假設,從任何位置的父樹狀目錄的有效。
- resourceTypeFilters
型別:array<System.Guid[]
這個查詢應該包含型別的清單。如果這是 null 或空白,所有型別參考。
- recurseToRoot
型別:System.Boolean
如果這是 true 因此父節點會永遠會列舉型別將是。如果為 false 則只會為第一層級的父代將傳回。
- queryOptions
型別:System.Int32
如果 ExpandDependencies 指定,在節點的相依性屬性會包含所依賴的節點。如果 IncludeParents 指定,在 CatalogNode ParentNode 的屬性將包含父節點。將所指定的選項會使傳回的目錄節點具有該值的 null。應該只擷取額外資料,如果有需要,,因為計算並傳送資訊可能會耗用相當多的資源。
傳回值
型別:Microsoft.TeamFoundation.Framework.Server.CatalogData
資源的節點提供除了適用於所提供的篩選這些節點的父之外。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。