GraphNode Class

Represents a node in the directed graph

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class GraphNode _
    Inherits GraphObject
public class GraphNode : GraphObject
public ref class GraphNode : public GraphObject
type GraphNode =  
    class
        inherit GraphObject
    end
public class GraphNode extends GraphObject

The GraphNode type exposes the following members.

Constructors

  Name Description
Public method GraphNode(String) Constucts a node
Public method GraphNode(Graph, GraphNodeId)
Public method GraphNode(Graph, GraphNodeId, String, GraphCategory)
Public method GraphNode(Graph, String, String, GraphCategory) Constucts a node

Top

Properties

  Name Description
Public property AllLinks Get the list of all links (incoming and outgoing).
Public property Caption Displayable label for the node. If no label is defined, this returns the Id so we always have something to display to the user.
Public property Categories Return all categories. Never returns null. (Inherited from GraphObject.)
Public property CategoryCount Return number of categories in the object. (Inherited from GraphObject.)
Public property DescriptiveCategoryCaption (Inherited from GraphObject.)
Public property Id Unique identifier for the node
Public property IncomingLinkCount Returns the count of incoming links
Public property IncomingLinks Enumerable of incoming links. The order of the enumeration is random.
Public property IsCollapsed Get whether this node is collapsed. (Inherited from GraphObject.)
Public property IsContained Returns true if the node is contained by any other node.
Public property IsContainer Returns true if the node is a container of any other node.
Public property IsExpanded Get whether this node is expanded. (Inherited from GraphObject.)
Public property IsGroup Get whether this object is IsGroup. It looks for the GraphProperties.StyleForGroup (Inherited from GraphObject.)
Public property IsPseudo Get whether this object is Pseudo. It looks for the GraphProperties.IsPseudo (Inherited from GraphObject.)
Public property Item Property that gets or sets a property value. (Inherited from GraphObject.)
Public property LinkCount Returns the count of outgoing and incoming links
Public property OutgoingLinkCount Returns the count of outgoing links
Public property OutgoingLinks Enumerable of outgoing links. The order of the enumeration is random.
Public property Owner Get the Graph object that this object belongs to. (Inherited from GraphObject.)
Public property Properties Property that returns an enumeration of all annotations. The order of the enumeration is random. (Inherited from GraphObject.)
Public property PropertyCount Property that returns an number of of all annotations. (Inherited from GraphObject.)
Public property PropertyKeys Property that returns an enumeration of all annotation keys. The order of the enumeration is random. (Inherited from GraphObject.)
Public property PropertyValues Property that returns an enumeration of all annotation values. The order of the enumeration is random. (Inherited from GraphObject.)
Public property Visibility Helper property to get/set visibility property of a GraphObject (Inherited from GraphObject.)

Top

Methods

  Name Description
Public method AddCategory Add a category to the object (Inherited from GraphObject.)
Public method ClearCategories Remove all categories from this object. (Inherited from GraphObject.)
Public method ClearValue(GraphProperty) Removes the value of the specified property (Inherited from GraphObject.)
Public method Copy(String) Clones a Node, including all properties, and clones new Links from the original Node's Links
Public method Copy(GraphNodeId)
Public method CopyCategories Copy any new categories from the given object, keeping existing categories. (Inherited from GraphObject.)
Public method CopyProperties Copy any new properties from the given object, keeping existing property values unchanged. (Inherited from GraphObject.)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method FindAncestors
Public method FindDescendants
Public method FindRelatedContainmentNodes(GraphSearchDirection)
Public method FindRelatedContainmentNodes(GraphSearchDirection, GraphSearchOption, array<GraphCategory[])
Public method FindRelatedNode
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetSources Gets the sources linked with this node via a link that matches at least 1 of the specified link categories.
Public method GetTargets Gets the targets linked with this node via a link that matches at least 1 of the specified link categories.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValue(GraphProperty) Gets the value of the specified annotation. (Inherited from GraphObject.)
Public method GetValue<T>(GraphProperty, Graph) Gets the value of the specified property. (Inherited from GraphObject.)
Public method 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.)
Public method 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.)
Public method GetValueAsString Returns the given property as a string using the given culture. (Inherited from GraphObject.)
Public method HasCategory(String) Return true if the object has the given category. (Inherited from GraphObject.)
Public method HasCategory(GraphCategory) Return true if the object has the given category. (Inherited from GraphObject.)
Public method HasCategory(IEnumerable<GraphCategory>) Return true if the object has any of the given categories. (Inherited from GraphObject.)
Public method HasCategoryInSet Determines if the given set of categories applies to this object. (Inherited from GraphObject.)
Public method HasValue Return true if the specified annotation exists. (Inherited from GraphObject.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method RemoveCategory Remove the category of this object (Inherited from GraphObject.)
Public method SetValue<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.)
Public method ToString A more human friendly default string representation of a Node object (Overrides Object.ToString().)

Top

Thread Safety

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

See Also

Reference

Microsoft.VisualStudio.GraphModel Namespace