DomainModel.CreateElement Method

Creates an element of a specified type.

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

Syntax

'宣言
Public Overridable Function CreateElement ( _
    partition As Partition, _
    elementType As Type, _
    propertyAssignments As PropertyAssignment() _
) As ModelElement
'使用
Dim instance As DomainModel
Dim partition As Partition
Dim elementType As Type
Dim propertyAssignments As PropertyAssignment()
Dim returnValue As ModelElement

returnValue = instance.CreateElement(partition, _
    elementType, propertyAssignments)
public virtual ModelElement CreateElement(
    Partition partition,
    Type elementType,
    PropertyAssignment[] propertyAssignments
)
public:
virtual ModelElement^ CreateElement(
    Partition^ partition, 
    Type^ elementType, 
    array<PropertyAssignment^>^ propertyAssignments
)
public function CreateElement(
    partition : Partition, 
    elementType : Type, 
    propertyAssignments : PropertyAssignment[]
) : ModelElement

Parameters

  • elementType
    Type: System.Type

    Element type which belongs to this domain model.

  • propertyAssignments
    Type: []

    An array of new element property assignments.

Return Value

Type: Microsoft.VisualStudio.Modeling.ModelElement

The ModelElement created.

Permissions

See Also

Concepts

Domain Model in the Generated API

Reference

DomainModel Class

DomainModel Members

Microsoft.VisualStudio.Modeling Namespace