Delen via


ImmutabilityExtensionMethods Class

Extension methods to provide a public instance side immutability API without polluting the model APIs unless the user specifically imports the Immutability namespace

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Modeling.Immutability.ImmutabilityExtensionMethods

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

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class ImmutabilityExtensionMethods
public static class ImmutabilityExtensionMethods
[ExtensionAttribute]
public ref class ImmutabilityExtensionMethods abstract sealed
[<AbstractClass>]
[<Sealed>]
type ImmutabilityExtensionMethods =  class end
public final class ImmutabilityExtensionMethods

The ImmutabilityExtensionMethods type exposes the following members.

Methods

  Name Description
Public methodStatic member CanDelete Deletes the element from the model.
Public methodStatic member CanDeleteElements 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 methodStatic member GetLocks(ModelElement) Get the lock flags for this element. This will include any locks enabled on the Partition containing the element.
Public methodStatic member GetLocks(Partition) Get the lock flags for this Partition instance. This will include any locks enabled on the Store containing the partition.
Public methodStatic member GetLocks(Store) Get the lock flags for this Store instance
Public methodStatic member IsLocked(ModelElement, Locks) Test whether this element has any of a specified set of locks
Public methodStatic member IsLocked(Partition, Locks) Test whether this partition has any of a specified set of locks
Public methodStatic member IsLocked(Store, Locks) Test whether this store has any of a specified set of locks
Public methodStatic member SetLocks(ModelElement, Locks) Set the lock flags of this element
Public methodStatic member SetLocks(Partition, Locks) Set the lock flags of the specified Partition instance
Public methodStatic member SetLocks(Store, Locks) Set the lock flags of this Store instance

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Modeling.Immutability Namespace