ModelingPartitionMapper Class

 

Determines the partition for a particular model element or class.

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

System::Object
  Microsoft.VisualStudio.Modeling.Shell::ModelingPartitionMapper

[CLSCompliantAttribute(false)]
public ref class ModelingPartitionMapper : IElementPartitionMapper, 
	SElementPartitionMapper

NameDescription
System_CAPS_protmethodModelingPartitionMapper(Func<ModelElement^>^)

Construct a new ModelingPartitionMapper

NameDescription
System_CAPS_protpropertyRootElement

NameDescription
System_CAPS_pubmethodBeginMapping(ElementGroupPrototype^, Partition^)

System_CAPS_protmethodDeterminePartitionForElement(ElementGroupPrototype^, ProtoElement^, ModelingPartitionMapper::PartitionMappings^)

Determine the partition to use for a particular ProtoElement.

System_CAPS_pubmethodEndMapping(ElementGroupPrototype^, Partition^, Object^)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_protmethodFindDiagramPartition(ElementGroupPrototype^, Partition^)

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

System_CAPS_protmethodFindDiagramPartition(Partition^)

System_CAPS_protmethodFindPartitions(ElementGroupPrototype^, Partition^)

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

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodPartitionForClass(Partition^, Guid)

System_CAPS_pubmethodPartitionForElement(ElementGroupPrototype^, Partition^, ProtoElement^, Object^)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_protmethodWhichPartitionForClass(DomainClassInfo^)

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

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.

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

Return to top
Show: