ElementOperations.MergeElementGroup Method
Merges the source ElementGroup with the specified target ModelElement.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'Déclaration
Public Overridable Sub MergeElementGroup ( _
targetElement As ModelElement, _
elementGroup As ElementGroup _
)
public virtual void MergeElementGroup(
ModelElement targetElement,
ElementGroup elementGroup
)
public:
virtual void MergeElementGroup(
ModelElement^ targetElement,
ElementGroup^ elementGroup
)
abstract MergeElementGroup :
targetElement:ModelElement *
elementGroup:ElementGroup -> unit
override MergeElementGroup :
targetElement:ModelElement *
elementGroup:ElementGroup -> unit
public function MergeElementGroup(
targetElement : ModelElement,
elementGroup : ElementGroup
)
Parameters
- targetElement
Type: Microsoft.VisualStudio.Modeling.ModelElement
The target element which will serve as the parent of the reconstituted elements.
- elementGroup
Type: Microsoft.VisualStudio.Modeling.ElementGroup
The source ElementGroup.
Remarks
Merges the source ElementGroup with the specified target ModelElement. This method is intended for use when an ElementGroupPrototype is not available, that is, when a collection of actual ModelElements should be merged. If an ElementGroupPrototype is available (e.g., clipboard scenarios), call MergeElementGroupProtoype instead. This method performs the following: (1) calls the target element's MergeRelate virtual method for each root element in the group to provide the target with the opportunity to connect a root element to itself, (2) calls the virtual method MergeConfigure on the root element immediately after calling MergeRelate to provide the root element with an opportunity to configure itself, and (3) calls OnMerged to provide any ElementOperations-derived class the opportunity to plug in custom processing.
.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.