Udostępnij za pośrednictwem


ClosureFindOrCreateElementOperation.FindOrCreateElement Method

Definition

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

public:
 virtual Microsoft::VisualStudio::Modeling::ModelElement ^ FindOrCreateElement(Guid sourceElementId, Guid domainClassId, Microsoft::VisualStudio::Modeling::Partition ^ targetPartition, Microsoft::VisualStudio::Modeling::ElementGroup ^ elementGroup);
public virtual Microsoft.VisualStudio.Modeling.ModelElement FindOrCreateElement (Guid sourceElementId, Guid domainClassId, Microsoft.VisualStudio.Modeling.Partition targetPartition, Microsoft.VisualStudio.Modeling.ElementGroup elementGroup);
abstract member FindOrCreateElement : Guid * Guid * Microsoft.VisualStudio.Modeling.Partition * Microsoft.VisualStudio.Modeling.ElementGroup -> Microsoft.VisualStudio.Modeling.ModelElement
override this.FindOrCreateElement : Guid * Guid * Microsoft.VisualStudio.Modeling.Partition * Microsoft.VisualStudio.Modeling.ElementGroup -> Microsoft.VisualStudio.Modeling.ModelElement
Public Overridable Function FindOrCreateElement (sourceElementId As Guid, domainClassId As Guid, targetPartition As Partition, elementGroup As ElementGroup) As ModelElement

Parameters

sourceElementId
Guid

Id of the source element to find or create

domainClassId
Guid

Id of the domain class for the element

targetPartition
Partition

the parttion to search or create the new element

elementGroup
ElementGroup

Element group

Returns

the existing ModelElement or the newly created one if no existing match was found

Applies to