Compartilhar via


GraphObject.GetValue Method

Definition

Overloads

GetValue(GraphProperty)

Gets the value of the specified annotation.

GetValue(String)

Gets the value of the specified property.

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

GetValue<T>(GraphProperty, Graph)

Gets the value of the specified property.

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.

GetValue<T>(GraphProperty)

Gets the value of the specified property.

GetValue<T>(String)

Gets the value of the specified property.

GetValue(GraphProperty)

Gets the value of the specified annotation.

public:
 System::Object ^ GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property);
public object GetValue (Microsoft.VisualStudio.GraphModel.GraphProperty property);
member this.GetValue : Microsoft.VisualStudio.GraphModel.GraphProperty -> obj
Public Function GetValue (property As GraphProperty) As Object

Parameters

property
GraphProperty

Annotation key

Returns

Object associated with the annotation, or null

Applies to

GetValue(String)

Gets the value of the specified property.

public:
 System::Object ^ GetValue(System::String ^ propertyId);
public object GetValue (string propertyId);
member this.GetValue : string -> obj
Public Function GetValue (propertyId As String) As Object

Parameters

propertyId
String

Annotation key

Returns

Object associated with the property, or null

Applies to

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

public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, T defaultValueIfNotFound);
public T GetValue<T> (Microsoft.VisualStudio.GraphModel.GraphProperty property, T defaultValueIfNotFound);
member this.GetValue : Microsoft.VisualStudio.GraphModel.GraphProperty * 'T -> 'T
Public Function GetValue(Of T) (property As GraphProperty, defaultValueIfNotFound As T) As T

Type Parameters

T

The type of data to return

Parameters

property
GraphProperty

The property you want to get the value of

defaultValueIfNotFound
T

Value to return is property is not found

Returns

T

Value of the given property

Exceptions

thrown if key is null

thrown if property type doesn't match the given generic type

Applies to

GetValue<T>(GraphProperty, Graph)

Gets the value of the specified property.

public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, Microsoft::VisualStudio::GraphModel::Graph ^ owner);
public T GetValue<T> (Microsoft.VisualStudio.GraphModel.GraphProperty property, Microsoft.VisualStudio.GraphModel.Graph owner);
member this.GetValue : Microsoft.VisualStudio.GraphModel.GraphProperty * Microsoft.VisualStudio.GraphModel.Graph -> 'T
Public Function GetValue(Of T) (property As GraphProperty, owner As Graph) As T

Type Parameters

T

The type of data to return

Parameters

property
GraphProperty

The property you want to get the value of

owner
Graph

The Graph owner from which to retrieve additional metadata about this object

Returns

T

Value of the given property

Exceptions

thrown if key is null

thrown if property type doesn't match the given generic type

Applies to

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.

public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, Microsoft::VisualStudio::GraphModel::Graph ^ owner, [Runtime::InteropServices::Out] Microsoft::VisualStudio::GraphModel::GraphCategory ^ % category);
public T GetValue<T> (Microsoft.VisualStudio.GraphModel.GraphProperty property, Microsoft.VisualStudio.GraphModel.Graph owner, out Microsoft.VisualStudio.GraphModel.GraphCategory category);
member this.GetValue : Microsoft.VisualStudio.GraphModel.GraphProperty * Microsoft.VisualStudio.GraphModel.Graph * GraphCategory -> 'T
Public Function GetValue(Of T) (property As GraphProperty, owner As Graph, ByRef category As GraphCategory) As T

Type Parameters

T

The type of data to return

Parameters

property
GraphProperty

The property you want to get the value of

owner
Graph

The Graph owner from which to retrieve additional metadata about this object

category
GraphCategory

The category that the property value was inherited from or null if it was not inherited

Returns

T

Value of the given property

Exceptions

thrown if key is null

thrown if property type doesn't match the given generic type

Applies to

GetValue<T>(GraphProperty)

Gets the value of the specified property.

public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property);
public T GetValue<T> (Microsoft.VisualStudio.GraphModel.GraphProperty property);
member this.GetValue : Microsoft.VisualStudio.GraphModel.GraphProperty -> 'T
Public Function GetValue(Of T) (property As GraphProperty) As T

Type Parameters

T

The type of data to return

Parameters

property
GraphProperty

The property you want to get the value of

Returns

T

Value of the given property

Exceptions

thrown if key is null

thrown if property type doesn't match the given generic type

Applies to

GetValue<T>(String)

Gets the value of the specified property.

public:
generic <typename T>
 T GetValue(System::String ^ propertyId);
public T GetValue<T> (string propertyId);
member this.GetValue : string -> 'T
Public Function GetValue(Of T) (propertyId As String) As T

Type Parameters

T

The type of data to return

Parameters

propertyId
String

Annotation key

Returns

T

Object associated with the property, or null

Exceptions

thrown if property type doesn't match the given generic type

Applies to