Creates an element link of a specified type.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)
Syntax
'宣言
Public Overridable Function CreateElementLink ( _
partition As Partition, _
elementLinkType As Type, _
roleAssignments As RoleAssignment(), _
propertyAssignments As PropertyAssignment() _
) As ElementLink
'使用
Dim instance As DomainModel
Dim partition As Partition
Dim elementLinkType As Type
Dim roleAssignments As RoleAssignment()
Dim propertyAssignments As PropertyAssignment()
Dim returnValue As ElementLink
returnValue = instance.CreateElementLink(partition, _
elementLinkType, roleAssignments, _
propertyAssignments)
public virtual ElementLink CreateElementLink(
Partition partition,
Type elementLinkType,
RoleAssignment[] roleAssignments,
PropertyAssignment[] propertyAssignments
)
public:
virtual ElementLink^ CreateElementLink(
Partition^ partition,
Type^ elementLinkType,
array<RoleAssignment^>^ roleAssignments,
array<PropertyAssignment^>^ propertyAssignments
)
public function CreateElementLink(
partition : Partition,
elementLinkType : Type,
roleAssignments : RoleAssignment[],
propertyAssignments : PropertyAssignment[]
) : ElementLink
Parameters
partition
Type: Microsoft.VisualStudio.Modeling.PartitionThe partition where the element link is to be created.
elementLinkType
Type: System.TypeElement link type to create, which belongs to this domain model.
roleAssignments
Type: []An array of relationship role assignments for the new element link.
propertyAssignments
Type: []An array of new element link property assignments.
Return Value
Type: Microsoft.VisualStudio.Modeling.ElementLink
The ElementLink created.
Permissions
- 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.
See Also
Concepts
Domain Model in the Generated API