GraphPropertyCollection::AddNewProperty Method (String^, Type^, Func<GraphMetadata^>^)

 

Registers a new GraphProperty

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

public:
GraphProperty^ AddNewProperty(
	String^ id,
	Type^ dataType,
	Func<GraphMetadata^>^ callback
)

Parameters

id
Type: System::String^

Unique Id of the GraphProperty

dataType
Type: System::Type^

The type for data associated with the GraphProperty

callback
Type: System::Func<GraphMetadata^>^

The callback that can lazily create the metadata for this property

Return Value

Type: Microsoft.VisualStudio.GraphModel::GraphProperty^

The newly registered GraphProperty object

Exception Condition
ArgumentNullException

thrown if id is null

InvalidOperationException

thrown if id is empty string

ArgumentNullException

thrown if dataType is null

Return to top
Show: