Condividi tramite


GraphObject.SetValue Method

Definition

Overloads

SetValue(String, Object)

Add an annotation using the given key, type and value

SetValue<T>(GraphProperty, T)

Sets the value of the given property. If the proeprty already exists, its value is overwritten unless the annotation flags prevent otherwise.

SetValue(String, Object)

Add an annotation using the given key, type and value

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

Parameters

propertyId
String

The property to set

value
Object

The value to set

Returns

Applies to

SetValue<T>(GraphProperty, T)

Sets the value of the given property. If the proeprty already exists, its value is overwritten unless the annotation flags prevent otherwise.

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

Type Parameters

T

The type of data being added

Parameters

property
GraphProperty

The property you want to set

value
T

Value of the property

Returns

T

The value

Exceptions

thrown if key is null

throws if trying to write to a "write once" annotation multiple times

Applies to