GraphNodeId Class
A GraphNodeId is a name/value pair, for example "a=b". The left part of this identifier ("a") is represented by a GraphNodeIdName called the "name" and the right hand side, "b" is the "value" part. The value part of a GraphNodeId can be one of the following: * String * Uri * GraphNodeId * GraphNodeIdCollection. Since the Value can be a GraphNodeId or GraphNodeIdCollection, we can use parentheses "()" to specify nesting: e.g., a=(b=c) a=(b=c d=e) (a=b c=d). To construct a nested GraphNodeId list for (a=b c=d), create a GraphNodeIdCollection and assign it to a GraphNodeId:
GraphNodeId.Get(GraphNodeIdName.Nested, new GraphNodeIdCollection( GraphNodeId.Get(MyGraphNodeIdNames.a, "b") GraphNodeId.Get(MyGraphNodeIdNames.c, "d"));
You can also create this GraphNodeId by using the following simple arithmetic:
GraphNodeId ab = GraphNodeId.Get("(a=b)");
GraphNodeId abcd = ab + "(c=d)";
// Yields (a=b c=d)
The result can be converted to a string by using ToString() or an implicit string cast operator and will produce "(a=b c=d)".
Since GraphNodeIds are stored singleton in a HashSet, they can be compared using operator ==.
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Empty | |
![]() | LiteralValue | Gets a literal value for the GraphNodeId. Uses the Name if the GraphNodeIdName is a Literal; otherwise delegates to ToString. |
![]() | Name | The GraphNodeIdName. |
![]() | Value | The value of the GraphNodeId. This can be one of: * String * Uri * GraphNodeId * GraphNodeIdCollection. |
| Name | Description | |
|---|---|---|
![]() | Add(GraphNodeId^) | Adds a GraphNodeId. If this identifier already is an array, the item is added to the array. Otherwise, a new embedded array is returned. |
![]() | AppendToString(StringBuilder^) | Appends the "ToString" of a GraphNodeId to the StringBuilder. This is more efficient than calling ToString, as the GraphNodeId can re-use the StringBuilder. |
![]() | CompareTo(GraphNodeId^) | Compares to another GraphNodeId. |
![]() | CompareTo(Object^) | Compares to another GraphNodeId. |
![]() | Equals(Object^) | See whether this GraphNodeId matches either a GraphNodeId or a GraphNodeIdKey.(Overrides Object::Equals(Object^).) |
![]() | Finalize() | (Inherited from Object.) |
![]() ![]() | GetArray(GraphNodeIdName^, array<GraphNodeId^>^) | Constructs a partial GraphNodeId based on the given array name and identifiers. |
![]() ![]() | GetArray(GraphNodeIdName^, Object^) | Get a GraphNodeId based on the name and value. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around. |
![]() | GetHashCode() | Gets the HashCode. We return the hashcode given to us during construction.(Overrides Object::GetHashCode().) |
![]() ![]() | GetLiteral(String^) | Gets a literal GraphNodeId parsed from the given identifier string. |
![]() ![]() | GetNested(array<GraphNodeId^>^) | Gets a nested GraphNodeId based on the given identifiers. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around. |
![]() ![]() | GetNested(GraphNodeIdName^, Object^) | Gets a GraphNodeId based on the name and value. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around. |
![]() | GetNestedIdByName(GraphNodeIdName^) | Gets a value from the first embedded GraphNodeId that matches the name. |
![]() | GetNestedValueByName<T>(GraphNodeIdName^) | Gets a value from the first embedded GraphNodeId that matches the name. |
![]() ![]() | GetPartial(GraphNodeIdName^, Object^) | Gets a partial GraphNodeId based on the name and value. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around. It is generally not right to get a partial GraphNodeId and use it for a node ID. Always use a full Nested GraphNodeId. |
![]() | GetType() | (Inherited from Object.) |
![]() | GetValue<T>() | The value of the GraphNodeId. This can be one of: * String * Uri * GraphNodeId * GraphNodeIdCollection. |
![]() ![]() | IsNullOrEmpty(GraphNodeId^) | |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() ![]() | Parse(String^) | Parses a string into a GraphNodeId. |
![]() ![]() | Parse(String^, Boolean) | Parses a string into a GraphNodeId. |
![]() ![]() | Parse(String^, Boolean, Func<Int32, GraphNodeId^>^) | Parse a string into a GraphNodeId |
![]() | RemovedNestedNames(array<GraphNodeIdName^>^) | Returns a partial GraphNodeId that contains the given GraphNodeIdName. |
![]() | ToString() | Gets a string for the GraphNodeId.(Overrides Object::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | Addition(GraphNodeId^, GraphNodeId^) | The + operator adds two GraphNodeIds. If either GraphNodeId is already contain an array, the item is added to the array. Otherwise, a new embedded array is returned. |
![]() ![]() | Equality(GraphNodeId^, GraphNodeId^) | The == operator compares two GraphNodeIds and returns whether they are equal. The first GraphNodeId to add. The second GraphNodeId to add. True if the GraphNodeIds are Equal; false otherwise |
![]() ![]() | Inequality(GraphNodeId^, GraphNodeId^) | The != operator compares two GraphNodeIds and returns whether they are equal. The first GraphNodeId to add. The second GraphNodeId to add. False if the GraphNodeId are equal; true otherwise |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.






