Freigeben über


GraphCategoryCollection.AddNewCategory-Methode (String, Func<GraphMetadata>)

Registriert ein neues GraphCategory

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

Syntax

'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

Parameter

  • id
    Typ: String

    Eindeutige ID der GraphCategory

  • callback
    Typ: Func<GraphMetadata>

    Der Rückruf, der Metadaten für diese Kategorie verzögert erstellen kann

Rückgabewert

Typ: Microsoft.VisualStudio.GraphModel.GraphCategory
Das neu registrierte GraphCategory-Objekt

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

wird ausgelöst, wenn id NULL ist.

InvalidOperationException

ausgelöst, wenn die ID eine leere Zeichenfolge ist.

.NET Framework-Sicherheit

Siehe auch

Referenz

GraphCategoryCollection Klasse

AddNewCategory-Überladung

Microsoft.VisualStudio.GraphModel-Namespace