Freigeben über


GraphCategoryCollection.AddNewCategory-Methode (String)

Registriert eine neue GraphCategory mit Standardmetadatenersteller.

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

Syntax

'Declaration
Public Function AddNewCategory ( _
    id As String _
) As GraphCategory
public GraphCategory AddNewCategory(
    string id
)
public:
GraphCategory^ AddNewCategory(
    String^ id
)
member AddNewCategory : 
        id:string -> GraphCategory
public function AddNewCategory(
    id : String
) : GraphCategory

Parameter

  • id
    Typ: String

    Eindeutige ID des GraphCategory.

Rückgabewert

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

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Wird ausgelöst, wenn ID ungültig ist.

InvalidOperationException

Wird ausgelöst, wenn ID leere Zeichenfolge ist.

.NET Framework-Sicherheit

Siehe auch

Referenz

GraphCategoryCollection Klasse

AddNewCategory-Überladung

Microsoft.VisualStudio.GraphModel-Namespace