Compartilhar via


ModelingPartitionMapper Class

Definition

Important

This API is not CLS-compliant.

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.

public ref class ModelingPartitionMapper : Microsoft::VisualStudio::Modeling::IElementPartitionMapper, Microsoft::VisualStudio::Modeling::SElementPartitionMapper
[System.CLSCompliant(false)]
public class ModelingPartitionMapper : Microsoft.VisualStudio.Modeling.IElementPartitionMapper, Microsoft.VisualStudio.Modeling.SElementPartitionMapper
public class ModelingPartitionMapper : Microsoft.VisualStudio.Modeling.IElementPartitionMapper, Microsoft.VisualStudio.Modeling.SElementPartitionMapper
[<System.CLSCompliant(false)>]
type ModelingPartitionMapper = class
    interface IElementPartitionMapper
    interface SElementPartitionMapper
type ModelingPartitionMapper = class
    interface IElementPartitionMapper
    interface SElementPartitionMapper
Public Class ModelingPartitionMapper
Implements IElementPartitionMapper, SElementPartitionMapper
Inheritance
ModelingPartitionMapper
Attributes
Implements

Constructors

ModelingPartitionMapper(Func<ModelElement>)

Construct a new ModelingPartitionMapper

Properties

RootElement

The root ModelElement of the modeling document with which this partition mapper is associated.

Methods

BeginMapping(ElementGroupPrototype, Partition)
DeterminePartitionForElement(ElementGroupPrototype, ProtoElement, ModelingPartitionMapper+PartitionMappings)

Determine the partition to use for a particular ProtoElement.

EndMapping(ElementGroupPrototype, Partition, Object)
FindDiagramPartition(ElementGroupPrototype, Partition)

Find the correct diagram partition for a merge of the specified ElementGroupPrototype

FindDiagramPartition(Partition)
FindPartitions(ElementGroupPrototype, Partition)

Determine the correct model and diagram partitions for a merge of the specified ElementGroupPrototype

PartitionForClass(Partition, Guid)
PartitionForElement(ElementGroupPrototype, Partition, ProtoElement, Object)
WhichPartitionForClass(DomainClassInfo)

Find which of the modeling partitions should be used for creating an instance of the specified domain class.

Applies to