Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Query whether the specified role should be considered a candidate for addition through the explorer add menus.
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
'Declaration
Protected Friend Overridable Function IsAddableRoleForElement ( _
element As ModelElement, _
role As DomainRoleInfo _
) As Boolean
protected internal virtual bool IsAddableRoleForElement(
ModelElement element,
DomainRoleInfo role
)
protected public:
virtual bool IsAddableRoleForElement(
ModelElement^ element,
DomainRoleInfo^ role
)
abstract IsAddableRoleForElement :
element:ModelElement *
role:DomainRoleInfo -> bool
override IsAddableRoleForElement :
element:ModelElement *
role:DomainRoleInfo -> bool
function IsAddableRoleForElement(
element : ModelElement,
role : DomainRoleInfo
) : boolean
Parameters
- element
Type: Microsoft.VisualStudio.Modeling.ModelElement
The ModelElement into which a new child element would be merged
- role
Type: Microsoft.VisualStudio.Modeling.DomainRoleInfo
DomainRoleInfo describing the role
Return Value
Type: System.Boolean
True if the role is a candidate for addition, else false
Remarks
By default only non-abstract embedded elements are addable, with the exception of the extensions. Can be overridden, but it is not recommended to include relationships that are not embeddings, as the explorer makes a general assumption that it is only adding through embeddings and its behaviour is undefined if this is not the case
.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.