Share via


ClosureFindOrCreateElementOperation.FindOrCreateElement Method

Used to find an element in the target store or create it if it doesn't exist

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

Syntax

'Declaration
Public Overridable Function FindOrCreateElement ( _
    sourceElementId As Guid, _
    domainClassId As Guid, _
    targetPartition As Partition, _
    elementGroup As ElementGroup _
) As ModelElement
public virtual ModelElement FindOrCreateElement(
    Guid sourceElementId,
    Guid domainClassId,
    Partition targetPartition,
    ElementGroup elementGroup
)
public:
virtual ModelElement^ FindOrCreateElement(
    Guid sourceElementId, 
    Guid domainClassId, 
    Partition^ targetPartition, 
    ElementGroup^ elementGroup
)
abstract FindOrCreateElement : 
        sourceElementId:Guid * 
        domainClassId:Guid * 
        targetPartition:Partition * 
        elementGroup:ElementGroup -> ModelElement  
override FindOrCreateElement : 
        sourceElementId:Guid * 
        domainClassId:Guid * 
        targetPartition:Partition * 
        elementGroup:ElementGroup -> ModelElement
public function FindOrCreateElement(
    sourceElementId : Guid, 
    domainClassId : Guid, 
    targetPartition : Partition, 
    elementGroup : ElementGroup
) : ModelElement

Parameters

  • sourceElementId
    Type: Guid

    Id of the source element to find or create

  • domainClassId
    Type: Guid

    Id of the domain class for the element

Return Value

Type: Microsoft.VisualStudio.Modeling.ModelElement
the existing ModelElement or the newly created one if no existing match was found

Remarks

Used to find an element in the target store or create an element if it does not exist

.NET Framework Security

See Also

Reference

ClosureFindOrCreateElementOperation Class

Microsoft.VisualStudio.Modeling Namespace