GraphCategoryCollection::AddNewCategory Method (String^, Func<GraphMetadata^>^)

 

Registers a new GraphCategory

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

public:
GraphCategory^ AddNewCategory(
	String^ id,
	Func<GraphMetadata^>^ callback
)

Parameters

id
Type: System::String^

Unique Id of the GraphCategory

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

The callback that can lazily create metadata for this category

Return Value

Type: Microsoft.VisualStudio.GraphModel::GraphCategory^

The newly registered GraphCategory object

Exception Condition
ArgumentNullException

thrown if id is null

InvalidOperationException

thrown if id is empty string

Return to top
Show: