次の方法で共有


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

Syntax

'宣言
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

  • 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

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

See Also

Reference

ElementOperations Class

CanDelete Overload

Microsoft.VisualStudio.Modeling Namespace