GraphNode Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a node in the directed graph
public ref class GraphNode : Microsoft::VisualStudio::GraphModel::GraphObject
public class GraphNode : Microsoft.VisualStudio.GraphModel.GraphObject
type GraphNode = class
inherit GraphObject
Public Class GraphNode
Inherits GraphObject
- Inheritance
Properties
AllLinks |
Get the list of all links (incoming and outgoing). |
Categories |
Return all categories. Never returns null. (Inherited from GraphObject) |
CategoryCount |
Return number of categories in the object. (Inherited from GraphObject) |
DescriptiveCategoryLabel |
Creates a delimited list of all category labels for this graph object. (Inherited from GraphObject) |
DocumentSchema |
Get the document local schema from the Owner of this graph. (Inherited from GraphObject) |
HasParentGroups |
Return true if this node is contained in one or more GraphGroups. |
Id |
Unique identifier for the node |
IncomingLinkCount |
Returns the count of incoming links |
IncomingLinks |
Enumerable of incoming links. The order of the enumeration is random. |
IsContained |
Returns true if the node is contained by any other node. |
IsContainer |
Returns true if the node is a container of any other node. |
IsGroup |
Get whether this object is is a group. It looks for the GraphCommonSchema.Group property on the object. (Inherited from GraphObject) |
IsPseudo |
Get whether this object is Pseudo. It looks for the GraphProperties.IsPseudo (Inherited from GraphObject) |
Item[GraphProperty] |
Property that gets or sets a property value. (Inherited from GraphObject) |
Label |
Displayable label for the node. If no label is defined, this returns the Id so we always have something to display to the user. |
LinkCount |
Returns the count of outgoing and incoming links |
OutgoingLinkCount |
Returns the count of outgoing links |
OutgoingLinks |
Enumerable of outgoing links. The order of the enumeration is random. |
Owner |
Get the Graph object that this object belongs to. (Inherited from GraphObject) |
ParentGroups |
Return all the GraphGroups that have this node listed in their ChildNodes collection (or ChildGroups collection if this node has IsGroup=true). |
Properties |
Property that returns an enumeration of all annotations. The order of the enumeration is random. (Inherited from GraphObject) |
PropertyCount |
Property that returns an number of of all annotations. (Inherited from GraphObject) |
PropertyKeys |
Property that returns an enumeration of all annotation keys. The order of the enumeration is random. (Inherited from GraphObject) |
PropertyValues |
Property that returns an enumeration of all annotation values. The order of the enumeration is random. (Inherited from GraphObject) |
Visibility |
Helper property to get/set visibility property of a GraphObject (Inherited from GraphObject) |
Methods
AddCategory(GraphCategory) |
Add a category to the object (Inherited from GraphObject) |
AsNode() |
Converts the GraphObject to a GraphNode. If this is a GraphGroup, the inner node is returned. For types other than GraphNode/Group, null is returned. (Inherited from GraphObject) |
ClearCategories() |
Remove all categories from this object. (Inherited from GraphObject) |
ClearValue(GraphProperty) |
Removes the value of the specified property (Inherited from GraphObject) |
ClearValue<T>(GraphProperty) |
Clear the value of the specified property. (Inherited from GraphObject) |
Copy(GraphNodeId) |
Clones a Node, including all properties, and clones new Links from the original Node's Links |
Copy(String) |
Clones a Node, including all properties, and clones new Links from the original Node's Links |
CopyCategories(GraphObject) |
Copy any new categories from the given object, keeping existing categories. (Inherited from GraphObject) |
CopyProperties(GraphObject) |
Copy any new properties from the given object, keeping existing property values unchanged. (Inherited from GraphObject) |
FindAncestorGroups() |
Returns the list of all ancestor groups that contain this node. This is different from FindAncestors in that it only returns nodes that have IsGroup=true. |
FindAncestors() |
Walks recursively up all ancestors of this node and returns the unique set. |
FindDescendants() |
Walk down the containment links of this node and all it's descendants and return the unique set. |
FindFirstRelatedNode(GraphSearchDirection, Predicate<GraphLink>, Predicate<GraphNode>, Predicate<GraphNode>) |
Finds the first node that matches the acceptNode predicate that is also related to this node according to the traverseLink and traverseNode predicates. |
FindRelatedContainmentNodes(GraphSearchDirection, GraphSearchOption, GraphCategory[]) |
Get related nodes that have a containment relationship to this node |
FindRelatedContainmentNodes(GraphSearchDirection) |
Get related nodes that have a containment relationship to this node |
FindRelatedNodes(GraphSearchDirection, Predicate<GraphLink>, Predicate<GraphNode>, Predicate<GraphNode>) |
Finds the dgml nodes that matches the acceptNode predicate and are related in a way that matches the traverseLink and traverseNode predicates. |
GetDerivedCategory(GraphCategory) |
Return first matching leaf category that has the given category in its heirarchy. (Inherited from GraphObject) |
GetDerivedCategory(String) |
Return first matching leaf category that has the given category in its heirarchy. (Inherited from GraphObject) |
GetMetaObject(Expression) | (Inherited from GraphObject) |
GetSchemaValue(GraphProperty) |
Gets the schema specific value of the property if one exists. (Inherited from GraphObject) |
GetSources(GraphCategory[]) |
Gets the sources linked with this node via a link that matches at least 1 of the specified link categories. |
GetTargets(GraphCategory[]) |
Gets the targets linked with this node via a link that matches at least 1 of the specified link categories. |
GetValue(GraphProperty) |
Gets the value of the specified annotation. (Inherited from GraphObject) |
GetValue(String) |
Gets the value of the specified property. (Inherited from GraphObject) |
GetValue<T>(GraphProperty, Graph, GraphCategory) |
Gets the value of the specified property, and also return the category that this property value was inherited from if any. (Inherited from GraphObject) |
GetValue<T>(GraphProperty, Graph) |
Gets the value of the specified property. (Inherited from GraphObject) |
GetValue<T>(GraphProperty, T) |
Gets the value of the specified annotation. if property is not set we reutnr the default value that the caller pass to this method (Inherited from GraphObject) |
GetValue<T>(GraphProperty) |
Gets the value of the specified property. (Inherited from GraphObject) |
GetValue<T>(String) |
Gets the value of the specified property. (Inherited from GraphObject) |
GetValueAsString(GraphProperty, CultureInfo) |
Returns the given property as a string using the given culture. (Inherited from GraphObject) |
HasCategory(GraphCategory) |
Return true if the object has the given category. (Inherited from GraphObject) |
HasCategory(IEnumerable<GraphCategory>) |
Return true if the object has any of the given categories. (Inherited from GraphObject) |
HasCategory(String) |
Return true if the object has the given category. (Inherited from GraphObject) |
HasCategoryInSet(HashSet<GraphCategory>, GraphCategoryMatchOption) |
Determines if the given set of categories applies to this object. (Inherited from GraphObject) |
HasLocalValue(GraphProperty) |
Return true if the specified property exists on this object with no cateogry inheritance check. (Inherited from GraphObject) |
HasParentGroup(GraphGroup) |
For internal book keeping only. |
HasValue(GraphProperty) |
Return true if the specified annotation exists. (Inherited from GraphObject) |
HasValue(String) |
Find out if the object has a value for the specified property. (Inherited from GraphObject) |
IsContainedBy(GraphGroup) |
True if the group is an ancestor of this node. |
OnCategoryChanged(GraphCategory, GraphCategoryChangeType) | (Inherited from GraphObject) |
OnPropertyChanged(GraphProperty) |
Raise a PropertyChangd event for the given GraphProperty (Inherited from GraphObject) |
OnPropertyChanged(String) |
Override that notifies the GraphGroupCollection whenever the IsGroup property has changed on this node. This has to be synchronous so that GraphGroup is immediately available after this operation in the same transaction. |
Remove() |
Remove this node from the graph |
RemoveCategory(GraphCategory) |
Remove the category of this object (Inherited from GraphObject) |
SetValue(String, Object) |
Add an annotation using the given key, type and value (Inherited from GraphObject) |
SetValue<T>(GraphProperty, T) |
Sets the value of the given property. If the proeprty already exists, its value is overwritten unless the annotation flags prevent otherwise. (Inherited from GraphObject) |
ToString() |
A more human friendly default string representation of a Node object |
WrapGraphObject(GraphObject) |
Modifies the current graph object to share the same property and categories as the given graph object. The wrapper and wrappee graph objects will always have identical sets of properties and categories. (Inherited from GraphObject) |
Events
CategoryChanged | (Inherited from GraphObject) |
PropertyChanged | (Inherited from GraphObject) |
Extension Methods
DEBUG_GetLabelOrId(GraphObject) |
Returns the label of an object or the id if the label is null. Should be used for tracing Microsoft.VisualStudio.Diagnostics.PerformanceProvider.DebugTrace.IDebugTracer |