GraphCategoryCollection.AddNewCategory Method (String, Func<GraphMetadata>)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Registers a new GraphCategory
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
'Declaration
Public Function AddNewCategory ( _
id As String, _
callback As Func(Of GraphMetadata) _
) As GraphCategory
public GraphCategory AddNewCategory(
string id,
Func<GraphMetadata> callback
)
public:
GraphCategory^ AddNewCategory(
String^ id,
Func<GraphMetadata^>^ callback
)
member AddNewCategory :
id:string *
callback:Func<GraphMetadata> -> GraphCategory
public function AddNewCategory(
id : String,
callback : Func<GraphMetadata>
) : GraphCategory
id
Type: System.StringUnique Id of the GraphCategory
callback
Type: System.Func<GraphMetadata>The callback that can lazily create metadata for this category
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 |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.