Udostępnij za pośrednictwem


Metoda ElementNameProvider.SetUniqueName — (ModelElement, ModelElement, DomainRoleInfo, String)

Określa unikatową nazwę elementu.

Przestrzeń nazw:  Microsoft.VisualStudio.Modeling
Zestaw:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (w Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

Składnia

'Deklaracja
Public Overridable Sub SetUniqueName ( _
    element As ModelElement, _
    container As ModelElement, _
    embeddedDomainRole As DomainRoleInfo, _
    baseName As String _
)
public virtual void SetUniqueName(
    ModelElement element,
    ModelElement container,
    DomainRoleInfo embeddedDomainRole,
    string baseName
)

Parametry

  • baseName
    Typ: System.String
    Ciąg znaków, z którego powinna pochodzić nazwa wygenerowana.

Wyjątki

Wyjątek Warunek
ArgumentNullException

The element, container or embeddedDomainRole is a nullodwołanie o wartości null (Nothing w języku Visual Basic) reference.

InvalidOperationException

Gdy wywołana spoza kontekstu transakcji, właściwość name jest obliczany lub innych ograniczeń modelowania nie są spełnione.

NotSupportedException

Istnieje więcej niż maksymalną elementy dozwolone w kontenerze.

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

ElementNameProvider Klasa

Przeciążenie SetUniqueName

Przestrzeń nazw Microsoft.VisualStudio.Modeling