ExtensionElement.CanMerge Method

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

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

Syntax

'Declaration
Protected Overrides Function CanMerge ( _
    rootElement As ProtoElementBase, _
    elementGroupPrototype As ElementGroupPrototype _
) As Boolean
protected override bool CanMerge(
    ProtoElementBase rootElement,
    ElementGroupPrototype elementGroupPrototype
)
protected:
virtual bool CanMerge(
    ProtoElementBase^ rootElement, 
    ElementGroupPrototype^ elementGroupPrototype
) override
abstract CanMerge : 
        rootElement:ProtoElementBase * 
        elementGroupPrototype:ElementGroupPrototype -> bool  
override CanMerge : 
        rootElement:ProtoElementBase * 
        elementGroupPrototype:ElementGroupPrototype -> bool
protected override function CanMerge(
    rootElement : ProtoElementBase, 
    elementGroupPrototype : ElementGroupPrototype
) : boolean

Parameters

  • rootElement
    Type: Microsoft.VisualStudio.Modeling.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.

Return Value

Type: System.Boolean
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.

.NET Framework Security

See Also

Reference

ExtensionElement Class

Microsoft.VisualStudio.Modeling Namespace