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

Sets a unique name on an element.

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

Syntax

'宣言
Public Overridable Sub SetUniqueName ( _
    element As ModelElement, _
    container As ModelElement, _
    embeddedDomainRole As DomainRoleInfo, _
    baseName As String _
)
'使用
Dim instance As ElementNameProvider
Dim element As ModelElement
Dim container As ModelElement
Dim embeddedDomainRole As DomainRoleInfo
Dim baseName As String

instance.SetUniqueName(element, container, _
    embeddedDomainRole, baseName)
public virtual void SetUniqueName(
    ModelElement element,
    ModelElement container,
    DomainRoleInfo embeddedDomainRole,
    string baseName
)
public:
virtual void SetUniqueName(
    ModelElement^ element, 
    ModelElement^ container, 
    DomainRoleInfo^ embeddedDomainRole, 
    String^ baseName
)
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 a 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.

Permissions

See Also

Reference

ElementNameProvider Class

ElementNameProvider Members

SetUniqueName Overload

Microsoft.VisualStudio.Modeling Namespace