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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

public:
virtual bool CanDelete(
	ModelElement^ element,
	... array<Guid>^ domainRolesToNotPropagate
)

Parameters

element
Type: Microsoft.VisualStudio.Modeling::ModelElement^

Candidate ModelElement for deletion

domainRolesToNotPropagate
Type: array<System::Guid>^

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

Return Value

Type: System::Boolean

true if the element can be deleted, false if not

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.

Return to top
Show: