ExtensionElement.CanMerge(ProtoElementBase, ElementGroupPrototype) 方法

定義

傳回值,這個值表示指定的根 ProtoElement 所代表的來源元素是否可以加入至這個專案。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

參數

rootElement
ProtoElementBase

代表來源元素的根 ProtoElement。The root ProtoElement representing a source element. 這可以是 null,在此情況下,ElementGroupPrototype 不包含 ProtoElements,而且程式碼應該檢查 ElementGroupPrototype 內容資訊。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

包含根 ProtoElement 的 ElementGroupPrototype。The ElementGroupPrototype that contains the root ProtoElement.

傳回

Boolean

如果 ProtoElement 所代表的來源專案可以加入至這個目標元素,則為 true。true if the source element represented by the ProtoElement can be added to this target element.

備註

覆寫,因為我們必須要求擴充的 MEL 是否會接受 ExtensionElements 的合併。Override because we must ask the extended MEL whether it will accept the merge of ExtensionElements. 這是必要的,讓我們拒絕 MEXs 合併,以建立不明確的角色或屬性。This is necessary to allow us to refuse merges of MEXs that would create ambiguous roles or properties.

適用於