This topic has not yet been rated - Rate this topic

Partition Class

Provides a logical container for elements in a store.

Object
  Microsoft.VisualStudio.Modeling.Partition

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
public sealed class Partition : IDisposable

The Partition type exposes the following members.

  NameDescription
Public methodPartitionConstructor
Top
  NameDescription
Public propertyAlternateIdThe AlternateId is used in the
Public propertyContextsThe Contexts that are referenced by the Partition. The Dictionary keys are the IDs of the Contexts. The Dictionary values are the Context instances.
Public propertyDirtyCountIndicates the number of changes to the Partition.
Public propertyDomainDataDirectoryGets domain information directory of the Store this partition belongs to.
Public propertyElementDirectoryDirectory of elements contained within partition.
Public propertyElementFactoryThe ElementFactory for the model
Public propertyIdThe Id of this Partition.
Public propertyIsDirtyIndicates true when the Partition is in a dirty state.
Public propertyIsReadOnlyGets whether this partition is read-only.
Public propertyStateIdA StateId that defines what state this Partition object is in.
Public propertyStoreThe Store the Partition belongs to.
Top
  NameDescription
Public methodAddContextAdd context to partition
Public methodDeleteElementsDelete the object graphs rooted in the specified collection of elements.
Public methodDisposeDisposes the state of this object.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodStatic memberFindByAlternateIdFind a partition by its AlternateKey
Public methodGetClosureList(ICollection<ModelElement>, ClosureType)Gets a closure list of the given type based on the given root element list
Public methodGetClosureList(ICollection<ModelElement>, ClosureType, Boolean)Gets a closure list of the given type based on the given root element list
Public methodGetClosureList(ICollection<ModelElement>, ClosureType, IEnumerable<DomainRoleInfo>)Gets a closure list of the given type based on the given root element list
Public methodGetClosureList(ICollection<ModelElement>, ClosureType, Boolean, IEnumerable<DomainRoleInfo>)Gets a closure list of the given type based on the given root element list
Public methodGetClosureList(ICollection<ModelElement>, ClosureType, IEnumerable<DomainRoleInfo>, IEnumerable<DomainRoleInfo>)Gets a closure list of the given type based on the given root element list
Public methodGetClosureList(ICollection<ModelElement>, ClosureType, Boolean, IEnumerable<DomainRoleInfo>, IEnumerable<DomainRoleInfo>)Gets a closure list of the given type based on the given root element list
Public methodGetClosurePrototypeGroup(ICollection<ModelElement>, ClosureType)Creates an ElementGroupPrototype of the given closure type based on the given list of root Elements
Public methodGetClosurePrototypeGroup(ICollection<ModelElement>, ClosureType, Boolean)Creates an ElementGroupPrototype of the given closure type based on the given list of root Elements
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodRemoveContextMethod to remove a Context from the Partition
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public eventPartitionDisposingAllows clients to receive PartitionDisposing events
Top
  NameDescription
Public Extension MethodCanDeleteElementsQuery 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. (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodGetLocksGet the lock flags for this Partition instance. This will include any locks enabled on the Store containing the partition. (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodIsLockedTest whether this partition has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.)
Public Extension MethodSetLocksSet the lock flags of the specified Partition instance (Defined by ImmutabilityExtensionMethods.)
Top

A store can have any number of partitions. In most cases, a store only uses one partition, which is called the default partition. If you don't make any changes to the default behavior, all elements are in the default partition.

When you create an element, you can indicate which partition you want it to be created in.

Partitions provide away for you to divide the elements and links of a model into different logical groups. One reason for using multiple partitions is to isolate the undo and redo actions into different queues in the different partitions. Undo and redo actions are applied to a partition.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.