Compartilhar via


ElementOperations.CanDelete Method

Definition

Overloads

CanDelete(ModelElement, 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. 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.

CanDelete(IEnumerable<ModelElement>, Guid[])

Query whether a specified set of elements can be deleted, taking into account any IMS locks applicable to any of the elements in the complete delete closure of the elements. The elements 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.

CanDelete(ModelElement, 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. 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.

public:
 virtual bool CanDelete(Microsoft::VisualStudio::Modeling::ModelElement ^ element, ... cli::array <Guid> ^ domainRolesToNotPropagate);
public virtual bool CanDelete (Microsoft.VisualStudio.Modeling.ModelElement element, params Guid[] domainRolesToNotPropagate);
abstract member CanDelete : Microsoft.VisualStudio.Modeling.ModelElement * Guid[] -> bool
override this.CanDelete : Microsoft.VisualStudio.Modeling.ModelElement * Guid[] -> bool
Public Overridable Function CanDelete (element As ModelElement, ParamArray domainRolesToNotPropagate As Guid()) As Boolean

Parameters

element
ModelElement

Candidate ModelElement for deletion

domainRolesToNotPropagate
Guid[]

A list of domain role ID-s through which delete should not be propagated.

Returns

true if the element can be deleted, false if not

Applies to

CanDelete(IEnumerable<ModelElement>, Guid[])

Query whether a specified set of elements can be deleted, taking into account any IMS locks applicable to any of the elements in the complete delete closure of the elements. The elements 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.

public:
 virtual bool CanDelete(System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Modeling::ModelElement ^> ^ elements, ... cli::array <Guid> ^ domainRolesToNotPropagate);
public virtual bool CanDelete (System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.Modeling.ModelElement> elements, params Guid[] domainRolesToNotPropagate);
abstract member CanDelete : seq<Microsoft.VisualStudio.Modeling.ModelElement> * Guid[] -> bool
override this.CanDelete : seq<Microsoft.VisualStudio.Modeling.ModelElement> * Guid[] -> bool
Public Overridable Function CanDelete (elements As IEnumerable(Of ModelElement), ParamArray domainRolesToNotPropagate As Guid()) As Boolean

Parameters

elements
IEnumerable<ModelElement>

Candidate ModelElements for deletion

domainRolesToNotPropagate
Guid[]

A list of domain role ID-s through which delete should not be propagated.

Returns

true if the all the elements can be deleted, false if any cannot OR the collection is empty

Applies to