次の方法で共有


ExtensionElement.CanMerge(ProtoElementBase, ElementGroupPrototype) Method

Definition

Returns a value indicating whether the source element represented by the specified root ProtoElement can be added to this element.

protected:
 override bool CanMerge(Microsoft::VisualStudio::Modeling::ProtoElementBase ^ rootElement, Microsoft::VisualStudio::Modeling::ElementGroupPrototype ^ elementGroupPrototype);
protected override bool CanMerge (Microsoft.VisualStudio.Modeling.ProtoElementBase rootElement, Microsoft.VisualStudio.Modeling.ElementGroupPrototype elementGroupPrototype);
override this.CanMerge : Microsoft.VisualStudio.Modeling.ProtoElementBase * Microsoft.VisualStudio.Modeling.ElementGroupPrototype -> bool
Protected Overrides Function CanMerge (rootElement As ProtoElementBase, elementGroupPrototype As ElementGroupPrototype) As Boolean

Parameters

rootElement
ProtoElementBase

The root ProtoElement representing a source element. This can be null, in which case the ElementGroupPrototype does not contain an ProtoElements and the code should inspect the ElementGroupPrototype context information.

elementGroupPrototype
ElementGroupPrototype

The ElementGroupPrototype that contains the root ProtoElement.

Returns

true if the source element represented by the ProtoElement can be added to this target element.

Remarks

Override because we must ask the extended MEL whether it will accept the merge of ExtensionElements. This is necessary to allow us to refuse merges of MEXs that would create ambiguous roles or properties.

Applies to