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 ==.

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

System::Object
  Microsoft.VisualStudio.GraphModel::GraphNodeId

[SerializableAttribute]
[TypeConverterAttribute((GraphNodeIdConverter^::typeid))]
public ref class GraphNodeId : IEquatable<GraphNodeId^>, IComparable<GraphNodeId^>, 
	IComparable

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticEmpty

System_CAPS_pubpropertyLiteralValue

Gets a literal value for the GraphNodeId. Uses the Name if the GraphNodeIdName is a Literal; otherwise delegates to ToString.

System_CAPS_pubpropertyName

The GraphNodeIdName.

System_CAPS_pubpropertyValue

The value of the GraphNodeId. This can be one of: * String * Uri * GraphNodeId * GraphNodeIdCollection.

NameDescription
System_CAPS_pubmethodAdd(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.

System_CAPS_pubmethodAppendToString(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.

System_CAPS_pubmethodCompareTo(GraphNodeId^)

Compares to another GraphNodeId.

System_CAPS_pubmethodCompareTo(Object^)

Compares to another GraphNodeId.

System_CAPS_pubmethodEquals(Object^)

See whether this GraphNodeId matches either a GraphNodeId or a GraphNodeIdKey.(Overrides Object::Equals(Object^).)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetArray(GraphNodeIdName^, array<GraphNodeId^>^)

Constructs a partial GraphNodeId based on the given array name and identifiers.

System_CAPS_pubmethodSystem_CAPS_staticGetArray(GraphNodeIdName^, Object^)

Get a GraphNodeId based on the name and value. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around.

System_CAPS_pubmethodGetHashCode()

Gets the HashCode. We return the hashcode given to us during construction.(Overrides Object::GetHashCode().)

System_CAPS_pubmethodSystem_CAPS_staticGetLiteral(String^)

Gets a literal GraphNodeId parsed from the given identifier string.

System_CAPS_pubmethodSystem_CAPS_staticGetNested(array<GraphNodeId^>^)

Gets a nested GraphNodeId based on the given identifiers. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around.

System_CAPS_pubmethodSystem_CAPS_staticGetNested(GraphNodeIdName^, Object^)

Gets a GraphNodeId based on the name and value. Does a lookup against a Dictionary to minimize the number of GraphNodeIds around.

System_CAPS_pubmethodGetNestedIdByName(GraphNodeIdName^)

Gets a value from the first embedded GraphNodeId that matches the name.

System_CAPS_pubmethodGetNestedValueByName<T>(GraphNodeIdName^)

Gets a value from the first embedded GraphNodeId that matches the name.

System_CAPS_pubmethodSystem_CAPS_staticGetPartial(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.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetValue<T>()

The value of the GraphNodeId. This can be one of: * String * Uri * GraphNodeId * GraphNodeIdCollection.

System_CAPS_pubmethodSystem_CAPS_staticIsNullOrEmpty(GraphNodeId^)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticParse(String^)

Parses a string into a GraphNodeId.

System_CAPS_pubmethodSystem_CAPS_staticParse(String^, Boolean)

Parses a string into a GraphNodeId.

System_CAPS_pubmethodSystem_CAPS_staticParse(String^, Boolean, Func<Int32, GraphNodeId^>^)

Parse a string into a GraphNodeId

System_CAPS_pubmethodRemovedNestedNames(array<GraphNodeIdName^>^)

Returns a partial GraphNodeId that contains the given GraphNodeIdName.

System_CAPS_pubmethodToString()

Gets a string for the GraphNodeId.(Overrides Object::ToString().)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(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.

System_CAPS_puboperatorSystem_CAPS_staticEquality(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

System_CAPS_puboperatorSystem_CAPS_staticInequality(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.

Return to top
Show: