GraphObject::GetValue<T> Method (GraphProperty^, T)
Visual Studio 2015
Gets the value of the specified annotation. If property is not set, we return the default value that the caller passed to this method.
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
public: generic<typename T> T GetValue( GraphProperty^ property, T defaultValueIfNotFound )
Parameters
- property
-
Type:
Microsoft.VisualStudio.GraphModel::GraphProperty^
The property you want to get the value of.
- defaultValueIfNotFound
-
Type:
T
The value to return if property is not found.
Return Value
Type: TThe value of the given property.
Type Parameters
- T
The type of data to return.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if key is null. |
| InvalidOperationException | Thrown if property type does not match the given generic type. |
Show: