Partition Class
Provides a logical container for elements in a store.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.Modeling.Partition
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
Syntax
'Declaration
Public NotInheritable Class Partition _
Implements IDisposable
public sealed class Partition : IDisposable
public ref class Partition sealed : IDisposable
[<Sealed>]
type Partition =
class
interface IDisposable
end
public final class Partition implements IDisposable
The Partition type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Partition | Constructor |
Top
Properties
Name | Description | |
---|---|---|
AlternateId | The AlternateId is used in the | |
Contexts | The Contexts that are referenced by the Partition. The Dictionary keys are the IDs of the Contexts. The Dictionary values are the Context instances. | |
DirtyCount | Indicates the number of changes to the Partition. | |
DomainDataDirectory | Gets domain information directory of the Store this partition belongs to. | |
ElementDirectory | Directory of elements contained within partition. | |
ElementFactory | The ElementFactory for the model | |
Id | The Id of this Partition. | |
IsDirty | Indicates true when the Partition is in a dirty state. | |
IsReadOnly | Gets whether this partition is read-only. | |
StateId | A StateId that defines what state this Partition object is in. | |
Store | The Store the Partition belongs to. |
Top
Methods
Name | Description | |
---|---|---|
AddContext | Add context to partition | |
DeleteElements | Delete the object graphs rooted in the specified collection of elements. | |
Dispose | Disposes the state of this object. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
FindByAlternateId | Find a partition by its AlternateKey | |
GetClosureList(ICollection<ModelElement>, ClosureType) | Gets a closure list of the given type based on the given root element list | |
GetClosureList(ICollection<ModelElement>, ClosureType, Boolean) | Gets a closure list of the given type based on the given root element list | |
GetClosureList(ICollection<ModelElement>, ClosureType, IEnumerable<DomainRoleInfo>) | Gets a closure list of the given type based on the given root element list | |
GetClosureList(ICollection<ModelElement>, ClosureType, Boolean, IEnumerable<DomainRoleInfo>) | Gets a closure list of the given type based on the given root element list | |
GetClosureList(ICollection<ModelElement>, ClosureType, IEnumerable<DomainRoleInfo>, IEnumerable<DomainRoleInfo>) | Gets a closure list of the given type based on the given root element list | |
GetClosureList(ICollection<ModelElement>, ClosureType, Boolean, IEnumerable<DomainRoleInfo>, IEnumerable<DomainRoleInfo>) | Gets a closure list of the given type based on the given root element list | |
GetClosurePrototypeGroup(ICollection<ModelElement>, ClosureType) | Creates an ElementGroupPrototype of the given closure type based on the given list of root Elements | |
GetClosurePrototypeGroup(ICollection<ModelElement>, ClosureType, Boolean) | Creates an ElementGroupPrototype of the given closure type based on the given list of root Elements | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
RemoveContext | Method to remove a Context from the Partition | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
PartitionDisposing | Allows clients to receive PartitionDisposing events |
Top
Extension Methods
Name | Description | |
---|---|---|
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. (Defined by ImmutabilityExtensionMethods.) | |
GetLocks | Get the lock flags for this Partition instance. This will include any locks enabled on the Store containing the partition. (Defined by ImmutabilityExtensionMethods.) | |
IsLocked | Test whether this partition has any of a specified set of locks (Defined by ImmutabilityExtensionMethods.) | |
SetLocks | Set the lock flags of the specified Partition instance (Defined by ImmutabilityExtensionMethods.) |
Top
Remarks
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.
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 Namespace