GraphCategoryCollection.AddNewCategory Method

Definition

Overloads

AddNewCategory(String)

Registers a new GraphCategory with default metadata creator.

AddNewCategory(String, Func<GraphMetadata>)

Registers a new GraphCategory

AddNewCategory(String)

Registers a new GraphCategory with default metadata creator.

public:
 Microsoft::VisualStudio::GraphModel::GraphCategory ^ AddNewCategory(System::String ^ id);
public Microsoft.VisualStudio.GraphModel.GraphCategory AddNewCategory (string id);
member this.AddNewCategory : string -> Microsoft.VisualStudio.GraphModel.GraphCategory
Public Function AddNewCategory (id As String) As GraphCategory

Parameters

id
String

Unique Id of the GraphCategory

Returns

The newly registered GraphCategory object

Exceptions

thrown if id is null

thrown if id is empty string

Applies to

AddNewCategory(String, Func<GraphMetadata>)

Registers a new GraphCategory

public:
 Microsoft::VisualStudio::GraphModel::GraphCategory ^ AddNewCategory(System::String ^ id, Func<Microsoft::VisualStudio::GraphModel::GraphMetadata ^> ^ callback);
public Microsoft.VisualStudio.GraphModel.GraphCategory AddNewCategory (string id, Func<Microsoft.VisualStudio.GraphModel.GraphMetadata> callback);
member this.AddNewCategory : string * Func<Microsoft.VisualStudio.GraphModel.GraphMetadata> -> Microsoft.VisualStudio.GraphModel.GraphCategory
Public Function AddNewCategory (id As String, callback As Func(Of GraphMetadata)) As GraphCategory

Parameters

id
String

Unique Id of the GraphCategory

callback
Func<GraphMetadata>

The callback that can lazily create metadata for this category

Returns

The newly registered GraphCategory object

Exceptions

thrown if id is null

thrown if id is empty string

Applies to