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
- element
Type: Microsoft.VisualStudio.Modeling.ModelElement
Element to assign a unique name.
- container
Type: Microsoft.VisualStudio.Modeling.ModelElement
Container embedding the element.
- embeddedDomainRole
Type: Microsoft.VisualStudio.Modeling.DomainRoleInfo
Role played by the element in the embedding relationship.
- 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.