GraphLinkCollection.GetByCategory(GraphCategory[]) 方法

定义

返回关系图中至少具有一个指定类别的所有链接,或具有集中的继承类别的所有链接。 例如,如果类别 "B" 是从 "A" 类别继承的,并且我们请求具有 "a" 类别的所有节点,则它将返回包含 "A" 或 "B" 类别的链接。 但是,如果我们要求类别 "B",它将只返回类别为 "B" 的节点,它不会返回仅具有类别 "A" 的节点。 在 otherwords 中,它不会扩展搜索以包含给定集的 BasedOn 类别,而必须调用 HasCategoryInSet 和 GraphCategoryMatchOption。

public:
 System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::GraphModel::GraphLink ^> ^ GetByCategory(... cli::array <Microsoft::VisualStudio::GraphModel::GraphCategory ^> ^ categories);
[System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.VisualStudio.GraphModel.GraphLinkCollection/<GetByCategory>d__50))]
public System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.GraphModel.GraphLink> GetByCategory (params Microsoft.VisualStudio.GraphModel.GraphCategory[] categories);
[<System.Runtime.CompilerServices.IteratorStateMachine(typeof(Microsoft.VisualStudio.GraphModel.GraphLinkCollection/<GetByCategory>d__50))>]
member this.GetByCategory : Microsoft.VisualStudio.GraphModel.GraphCategory[] -> seq<Microsoft.VisualStudio.GraphModel.GraphLink>
Public Iterator Function GetByCategory (ParamArray categories As GraphCategory()) As IEnumerable(Of GraphLink)

参数

categories
GraphCategory[]

用于筛选结果集的0个或多个 GraphProperty 对象。 如果未提供任何类别,则返回所有链接。

返回

IEnumerable<GraphLink>

与类别匹配的链接

属性

适用于