This topic has not yet been rated - Rate this topic

ModelElement.CanMerge Method

Verifies whether a source element can be added to this element.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
protected virtual bool CanMerge(
	ProtoElementBase rootElement,
	ElementGroupPrototype elementGroupPrototype
)

Parameters

rootElement
Type: Microsoft.VisualStudio.Modeling.ProtoElementBase
The root ProtoElement representing a source element. If this is null, the ElementGroupPrototype does not contain any ProtoElements and the code should inspect the ElementGroupPrototype context information.
elementGroupPrototype
Type: Microsoft.VisualStudio.Modeling.ElementGroupPrototype
The ElementGroupPrototype that contains the root ProtoElement.

Return Value

Type: System.Boolean
true if the source element represented by the ProtoElement can be added to this target element; otherwise, false.

Accept merges of extensions, or any supplementary elements that extensions are prepared to merge

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ