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.

C++
public:
 System::Object ^ GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property);

Parameters

property
GraphProperty

Annotation key

Returns

Object associated with the annotation, or null

Applies to

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

GetValue(String)

Gets the value of the specified property.

C++
public:
 System::Object ^ GetValue(System::String ^ propertyId);

Parameters

propertyId
String

Annotation key

Returns

Object associated with the property, or null

Applies to

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

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

C++
public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, T defaultValueIfNotFound);

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

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

GetValue<T>(GraphProperty, Graph)

Gets the value of the specified property.

C++
public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, Microsoft::VisualStudio::GraphModel::Graph ^ owner);

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

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

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.

C++
public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property, Microsoft::VisualStudio::GraphModel::Graph ^ owner, [Runtime::InteropServices::Out] Microsoft::VisualStudio::GraphModel::GraphCategory ^ % category);

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

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

GetValue<T>(GraphProperty)

Gets the value of the specified property.

C++
public:
generic <typename T>
 T GetValue(Microsoft::VisualStudio::GraphModel::GraphProperty ^ property);

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

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022

GetValue<T>(String)

Gets the value of the specified property.

C++
public:
generic <typename T>
 T GetValue(System::String ^ propertyId);

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

Visual Studio SDK 2022 およびその他のバージョン
製品 バージョン
Visual Studio SDK 2017, 2019, 2022