Compartilhar via


ElementNameProvider.SetUniqueName Method (ModelElement, ModelElement, DomainRoleInfo, String)

Sets a unique name on an element.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Declaração
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
)
public:
virtual void SetUniqueName(
    ModelElement^ element, 
    ModelElement^ container, 
    DomainRoleInfo^ embeddedDomainRole, 
    String^ baseName
)
abstract SetUniqueName : 
        element:ModelElement * 
        container:ModelElement * 
        embeddedDomainRole:DomainRoleInfo * 
        baseName:string -> unit 
override SetUniqueName : 
        element:ModelElement * 
        container:ModelElement * 
        embeddedDomainRole:DomainRoleInfo * 
        baseName:string -> unit 
public function SetUniqueName(
    element : ModelElement, 
    container : ModelElement, 
    embeddedDomainRole : DomainRoleInfo, 
    baseName : String
)

Parameters

  • baseName
    Type: System.String
    String from which the generated name should be derived.

Exceptions

Exception Condition
ArgumentNullException

The element, container or embeddedDomainRole is a nulla null reference (Nothing in Visual Basic) reference.

InvalidOperationException

When called outside of a transaction context, the name property is calculated, or other modeling constraints are not satisfied.

NotSupportedException

There are more than the maximum elements allowed in the container.

.NET Framework Security

See Also

Reference

ElementNameProvider Class

SetUniqueName Overload

Microsoft.VisualStudio.Modeling Namespace