다음을 통해 공유


ElementOperations.CanDelete Method (IEnumerable<ModelElement>, array<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.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

Syntax

'Declaration
Public Overridable Function CanDelete ( _
    elements As IEnumerable(Of ModelElement), _
    ParamArray domainRolesToNotPropagate As Guid() _
) As Boolean
public virtual bool CanDelete(
    IEnumerable<ModelElement> elements,
    params Guid[] domainRolesToNotPropagate
)
public:
virtual bool CanDelete(
    IEnumerable<ModelElement^>^ elements, 
    ... array<Guid>^ domainRolesToNotPropagate
)
abstract CanDelete : 
        elements:IEnumerable<ModelElement> * 
        domainRolesToNotPropagate:Guid[] -> bool  
override CanDelete : 
        elements:IEnumerable<ModelElement> * 
        domainRolesToNotPropagate:Guid[] -> bool
public function CanDelete(
    elements : IEnumerable<ModelElement>, 
    ... domainRolesToNotPropagate : Guid[]
) : boolean

Parameters

  • 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 all the elements can be deleted, false if any cannot OR the collection is empty

Remarks

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.

.NET Framework Security

See Also

Reference

ElementOperations Class

CanDelete Overload

Microsoft.VisualStudio.Modeling Namespace