ModelingPartitionMapper Class
Determines the partition for a particular model element or class.
This API is not CLS-compliant.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.Shell.ModelingPartitionMapper
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)
Syntax
声明
<CLSCompliantAttribute(False)> _
Public Class ModelingPartitionMapper _
Implements IElementPartitionMapper, SElementPartitionMapper
[CLSCompliantAttribute(false)]
public class ModelingPartitionMapper : IElementPartitionMapper,
SElementPartitionMapper
[CLSCompliantAttribute(false)]
public ref class ModelingPartitionMapper : IElementPartitionMapper,
SElementPartitionMapper
[<CLSCompliantAttribute(false)>]
type ModelingPartitionMapper =
class
interface IElementPartitionMapper
interface SElementPartitionMapper
end
public class ModelingPartitionMapper implements IElementPartitionMapper, SElementPartitionMapper
The ModelingPartitionMapper type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ModelingPartitionMapper |
Top
Properties
Name | Description | |
---|---|---|
RootElement |
Top
Methods
Name | Description | |
---|---|---|
BeginMapping | ||
DeterminePartitionForElement | Determine the partition to use for a particular ProtoElement. | |
EndMapping | ||
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FindDiagramPartition(Partition) | ||
FindDiagramPartition(ElementGroupPrototype, Partition) | Find the correct diagram partition for a merge of the specified ElementGroupPrototype | |
FindPartitions | Determine the correct model and diagram partitions for a merge of the specified ElementGroupPrototype | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PartitionForClass | ||
PartitionForElement | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
WhichPartitionForClass | Find which of the modeling partitions should be used for creating an instance of the specified domain class. |
Top
Remarks
Default Modeling framework partition mapping service. This mapper is capable of mapping to two partitions, one for the model, and one for the diagram. The model partition is assumed to be fixed as the partition of the model root associated with the docdata. The diagram partition may vary, and the particular diagram to use is dynamically determined by looking for a target diagram id in the ElementGroupPrototype's target context. The standard DesignSurfaceElementOperations puts the target diagram over which a drag-over or drop operation occurs into the EGP target context. If the target diagram id is not present in the EGP target context, then this partition mapper assumes that the relevant diagram is the first diagram associated with the model. A limitation of this mapper is that it can only map any particular domain class to a single partition, based upon the first embedding defined for the class. Designers requiring a more sophisticated partition mapping service are free to subclass this partition mapper (it provides a couple of override points), or completely replace it, e.g. by overriding ModelingDocData.CreatePartitionMapper, or by providing it as an SElementPartitionMapper through the service provider provided to the Store at creation time.
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.