This documentation is archived and is not being maintained.

GraphNode Class

Represents a node in the directed graph

Object
  Microsoft.VisualStudio.GraphModel.GraphObject
    Microsoft.VisualStudio.GraphModel.GraphNode

Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

public class GraphNode : GraphObject

The GraphNode type exposes the following members.

  NameDescription
Public propertyAllLinksGet the list of all links (incoming and outgoing).
Public propertyCategoriesReturns all categories. Never returns null. (Inherited from GraphObject.)
Public propertyCategoryCountReturns the number of categories in the object. (Inherited from GraphObject.)
Public propertyDescriptiveCategoryLabelCreates a delimited list of all category labels for this graph object. (Inherited from GraphObject.)
Public propertyDocumentSchemaGets the document-local schema from the owner of this graph. (Inherited from GraphObject.)
Public propertyHasParentGroupsReturn true if this node is contained in one or more GraphGroups.
Public propertyIdUnique identifier for the node
Public propertyIncomingLinkCountReturns the count of incoming links
Public propertyIncomingLinksEnumerable of incoming links. The order of the enumeration is random.
Public propertyIsContainedReturns true if the node is contained by any other node.
Public propertyIsContainerReturns true if the node is a container of any other node.
Public propertyIsGroupGets whether this object is IsGroup. It looks for the GraphProperties.StyleForGroup. (Inherited from GraphObject.)
Public propertyIsPseudoGets whether this object is Pseudo. It looks for the GraphProperties.IsPseudo. (Inherited from GraphObject.)
Public propertyItemProperty that gets or sets a property value. (Inherited from GraphObject.)
Public propertyLabelDisplayable label for the node. If no label is defined, this returns the Id so we always have something to display to the user.
Public propertyLinkCountReturns the count of outgoing and incoming links
Public propertyOutgoingLinkCountReturns the count of outgoing links
Public propertyOutgoingLinksEnumerable of outgoing links. The order of the enumeration is random.
Public propertyOwnerGets the Graph object that this object belongs to. (Inherited from GraphObject.)
Public propertyParentGroupsReturn all the GraphGroups that have this node listed in their ChildNodes collection (or ChildGroups collection if this node has IsGroup=true).
Public propertyPropertiesProperty that returns an enumeration of all annotations. The order of the enumeration is random. (Inherited from GraphObject.)
Public propertyPropertyCountProperty that returns a number of all annotations. (Inherited from GraphObject.)
Public propertyPropertyKeysProperty that returns an enumeration of all annotation keys. The order of the enumeration is random. (Inherited from GraphObject.)
Public propertyPropertyValuesProperty that returns an enumeration of all annotation values. The order of the enumeration is random. (Inherited from GraphObject.)
Public propertyVisibilityHelper property to get/set visibility property of a GraphObject. (Inherited from GraphObject.)
Top

  NameDescription
Public methodAddCategoryAdds a category to the object. (Inherited from GraphObject.)
Public methodAsNodeConverts 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.)
Public methodClearCategoriesRemove all categories from this object. (Inherited from GraphObject.)
Public methodClearValue(GraphProperty)Removes the value of the specified property. (Inherited from GraphObject.)
Public methodCopy(String)Clones a Node, including all properties, and clones new Links from the original Node's Links
Public methodCopy(GraphNodeId)Clones a Node, including all properties, and clones new Links from the original Node's Links
Public methodCopyCategoriesCopies any new categories from the given object, keeping existing categories. (Inherited from GraphObject.)
Public methodCopyPropertiesCopies any new properties from the given object, keeping existing property values unchanged. (Inherited from GraphObject.)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFindAncestorGroupsReturns the list of all ancestor groups that contain this node. This differs from FindAncestors because it only returns nodes that have IsGroup=true.
Public methodFindAncestorsWalks recursively up all ancestors of this node and returns the unique set.
Public methodFindDescendantsWalk down the containment links of this node and all its descendants and return the unique set.
Public methodFindFirstRelatedNodeFinds the first node that matches the acceptNode predicate that is also related to this node according to the traverseLink and traverseNode predicates. It is found by doing a breadth first search along links matching the traverseLink predicate, in the To or From direction designated by the searchDirection parameter. Returns null if it does not exist.
Public methodFindRelatedContainmentNodes(GraphSearchDirection)Get related nodes that have a containment relationship to this node
Public methodFindRelatedContainmentNodes(GraphSearchDirection, GraphSearchOption, GraphCategory[])Get related nodes that have a containment relationship to this node
Public methodFindRelatedNodesFinds the dgml nodes that matches the acceptNode predicate and are related in a way that matches the traverseLink and traverseNode predicates. They are found by doing a breadth first search along links matching the traverseLink predicate, in the Source or Target direction designated by the searchDirection parameter. Then if the node matches the traverseNode predicate it keeps searching recurrsively through that node in the same direction and returns all nodes that match the acceptNode predicate. The search can handle circularity in the graph.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetMetaObject (Inherited from GraphObject.)
Protected methodGetSchemaValueGets the schema-specific value of the property, if one exists. (Inherited from GraphObject.)
Public methodGetSourcesGets the sources linked with this node via a link that matches at least 1 of the specified link categories.
Public methodGetTargetsGets the targets linked with this node via a link that matches at least 1 of the specified link categories.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValue(String)Gets the value of the specified property. (Inherited from GraphObject.)
Public methodGetValue(GraphProperty)Gets the value of the specified annotation. (Inherited from GraphObject.)
Public methodGetValue<T>(GraphProperty, Graph)Gets the value of the specified property. (Inherited from GraphObject.)
Public methodGetValue<T>(GraphProperty, T)Gets the value of the specified annotation. If property is not set, we return the default value that the caller passed to this method. (Inherited from GraphObject.)
Public methodGetValue<T>(GraphProperty, Graph, GraphCategory)Gets the value of the specified property, and also returns the category that this property value was inherited from, if any. (Inherited from GraphObject.)
Public methodGetValueAsStringReturns the given property as a string that uses the given culture. (Inherited from GraphObject.)
Public methodHasCategory(String)Returns true if the object has the given category. (Inherited from GraphObject.)
Public methodHasCategory(GraphCategory)Returns true if the object has the given category. (Inherited from GraphObject.)
Public methodHasCategory(IEnumerable<GraphCategory>)Returns true if the object has any of the given categories. (Inherited from GraphObject.)
Public methodHasCategoryInSetDetermines whether the given set of categories applies to this object. (Inherited from GraphObject.)
Public methodHasLocalValueReturns true if the specified property exists on this object with no category inheritance check. (Inherited from GraphObject.)
Public methodHasParentGroupFor internal book keeping only.
Public methodHasValue(String)Find out whether the object has a value for the specified property. (Inherited from GraphObject.)
Public methodHasValue(GraphProperty)Returns true if the specified annotation exists. (Inherited from GraphObject.)
Public methodIsContainedByTrue if the group is an ancestor of this node.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnCategoryChanged (Inherited from GraphObject.)
Public methodOnPropertyChanged(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. (Overrides GraphObject.OnPropertyChanged(String).)
Public methodOnPropertyChanged(GraphProperty)Raises a PropertyChangd event for the given GraphProperty. (Inherited from GraphObject.)
Public methodRemoveRemove this node from the graph
Public methodRemoveCategoryRemoves the category of this object. (Inherited from GraphObject.)
Public methodSetValue(String, Object)Adds an annotation, using the given key, type, and value. (Inherited from GraphObject.)
Public methodSetValue<T>(GraphProperty, T)Sets the value of the given property. If the property already exists, its value is overwritten unless the annotation flags prevent otherwise. (Inherited from GraphObject.)
Public methodToStringA more human friendly default string representation of a Node object (Overrides Object.ToString.)
Protected methodWrapGraphObjectModifies 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.)
Top

  NameDescription
Public eventCategoryChanged (Inherited from GraphObject.)
Public eventPropertyChanged (Inherited from GraphObject.)
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: