GraphNodeCollection.GetByCategory Method

Definition

Overloads

GetByCategory(GraphCategory[])

Returns all nodes in the graph that have at least one of the specified categories or have inherited categories that are in the set. For example, if we have a Class category that inherits from the Type category and we ask for all nodes that have a Type category then it will return nodes that have either Class or Type categories. However, if we ask for "Class" categories it will only return nodes with a Class category, it will not return nodes that only have a "Type" category. In otherwords, it does not expand the search to include BasedOn categories of the given set, to do that you must call HasCategoryInSet with GraphCategoryMatchOption.Inherit.

GetByCategory(String[])

Returns all nodes in the graph that have the specified categories

GetByCategory(GraphCategory[])

Returns all nodes in the graph that have at least one of the specified categories or have inherited categories that are in the set. For example, if we have a Class category that inherits from the Type category and we ask for all nodes that have a Type category then it will return nodes that have either Class or Type categories. However, if we ask for "Class" categories it will only return nodes with a Class category, it will not return nodes that only have a "Type" category. In otherwords, it does not expand the search to include BasedOn categories of the given set, to do that you must call HasCategoryInSet with GraphCategoryMatchOption.Inherit.

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

Parameters

categories
GraphCategory[]

0 or more GraphProperty objects used to filter the result set. If no categories are provided then all nodes are returned.

Returns

Nodes that match the filter set

Attributes

Applies to

GetByCategory(String[])

Returns all nodes in the graph that have the specified categories

public:
 System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::GraphModel::GraphNode ^> ^ GetByCategory(... cli::array <System::String ^> ^ categories);
public System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.GraphModel.GraphNode> GetByCategory (params string[] categories);
member this.GetByCategory : string[] -> seq<Microsoft.VisualStudio.GraphModel.GraphNode>
Public Function GetByCategory (ParamArray categories As String()) As IEnumerable(Of GraphNode)

Parameters

categories
String[]

The list of category ID's

Returns

The Nodes that match the filter set

Applies to