ElementOperations.CanDelete Method (ModelElement, array<Guid )
Query whether a specified element can be deleted, taking into account any IMS locks applicable to any of the elements in the delete closure of the element.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
Syntax
'Declaration
Public Overridable Function CanDelete ( _
element As ModelElement, _
ParamArray domainRolesToNotPropagate As Guid() _
) As Boolean
public virtual bool CanDelete(
ModelElement element,
params Guid[] domainRolesToNotPropagate
)
public:
virtual bool CanDelete(
ModelElement^ element,
... array<Guid>^ domainRolesToNotPropagate
)
abstract CanDelete :
element:ModelElement *
domainRolesToNotPropagate:Guid[] -> bool
override CanDelete :
element:ModelElement *
domainRolesToNotPropagate:Guid[] -> bool
public function CanDelete(
element : ModelElement,
... domainRolesToNotPropagate : Guid[]
) : boolean
Parameters
element
Type: Microsoft.VisualStudio.Modeling.ModelElementCandidate ModelElement for deletion
domainRolesToNotPropagate
Type: array<Guid[]A list of domain role ID-s through which delete should not be propagated.
Return Value
Type: Boolean
true if the element can be deleted, false if not
Remarks
An element cannot be deleted if any element in the closure is Delete locked, or if any element is the target of a link sourced on an element with the RolePlayer lock AND that element is outside the closure.
.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.