Share via


ImmutabilityExtensionMethods.CanDeleteElements Method

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.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function CanDeleteElements ( _
    partition As Partition, _
    rootElements As IEnumerable(Of ModelElement), _
    ParamArray domainRolesToNotPropagate As Guid() _
) As Boolean
public static bool CanDeleteElements(
    this Partition partition,
    IEnumerable<ModelElement> rootElements,
    params Guid[] domainRolesToNotPropagate
)
[ExtensionAttribute]
public:
static bool CanDeleteElements(
    Partition^ partition, 
    IEnumerable<ModelElement^>^ rootElements, 
    ... array<Guid>^ domainRolesToNotPropagate
)
static member CanDeleteElements : 
        partition:Partition * 
        rootElements:IEnumerable<ModelElement> * 
        domainRolesToNotPropagate:Guid[] -> bool
public static function CanDeleteElements(
    partition : Partition, 
    rootElements : IEnumerable<ModelElement>, 
    ... domainRolesToNotPropagate : Guid[]
) : boolean

Parameters

  • rootElements
    Type: IEnumerable<ModelElement>

    Roots of the object graphs to delete

  • domainRolesToNotPropagate
    Type: array<Guid[]

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

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Partition. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

ImmutabilityExtensionMethods Class

Microsoft.VisualStudio.Modeling.Immutability Namespace