This topic has not yet been rated - Rate this topic

ElementGroupPrototype Class

Contains the information necessary to recreate a set of elements and links. Used to store elements in tools, on the clipboard, and in a drag operation.

Object
  Microsoft.VisualStudio.Modeling.ElementGroupPrototype

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
[SerializableAttribute]
public sealed class ElementGroupPrototype : ISerializable, 
	IDeserializationCallback

The ElementGroupPrototype type exposes the following members.

  NameDescription
Public methodElementGroupPrototype(ElementGroup, IEnumerable<ModelElement>)Constructor
Public methodElementGroupPrototype(Partition, Guid)Constructor for taking a rool domain class Id. This is used to determine whether an element can be merged under an parent element.
Public methodElementGroupPrototype(Partition, ICollection<ModelElement>, ElementGroup)Constructor
Top
  NameDescription
Public propertyProtoElementLinksGets collection of all ProtoElementLinks contained in the ElementGroupPrototype.
Public propertyProtoElementsGets collection of all ProtoElements contained in the ElementGroupPrototype.
Public propertyRootProtoElementsGets collection of all root ProtoElements contained in the ElementGroupPrototype.
Public propertySourceContextReturns this ElementGroupPrototype's source ElementGroupContext object
Public propertySourceRootElementIdsreturns a read-only list of root element ids from the source context
Public propertyTargetContextReturns this ElementGroupPrototype's target ElementGroupContext object
Public propertyTargetRootElementIdsreturns a read-only list of root element ids from the target context
Public propertyTopLevelProtoGroupPrototype for the group this ElementGroupPrototype represents
Public propertyUserDataThe user-defined data object from the outer-most element group
Top
  NameDescription
Public methodCanCreateElementGroup(Partition)Can this prototype element group create a clone of the progenitor element group in the indicated partition?
Public methodCanCreateElementGroup(Store)Can this prototype element group create a clone of the progenitor element group in the indicated store?
Public methodCanCreateElementGroup(Partition, IElementPartitionMapper)Can this prototype element group create a clone of the progenitor element group in the indicated partition?
Public methodCreateElementGroup(Partition)Create a clone of the progenitor element group
Public methodCreateElementGroup(Store)Create a clone of the progenitor element group
Public methodCreateElementGroup(Partition, IElementPartitionMapper)Create a clone of the progenitor element group
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetObjectDataPopulate the serialization info with the data necessary to serialize this object.
Public methodGetProtoElementGet the ProtoElement corresponding to the specified id.
Public methodGetProtoLinkGet the ProtoLink corresponding to the specified id.
Public methodGetProtoLinksReturns an IList of ProtoLink objects that contain the passed ProtoElementBase playing in the passed DomainRoleId.
Public methodStatic memberGetReconstitutedElementReturns the reconstituted ModelElement given the guid of the source ModelElement.
Public methodGetSourceRootElementIdGets the id of the source root ModelElement that corresponds to the specified target root ModelElement id. If it was not found, Guid.Empty is returned.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIsInRoleReturns true if the passed ProtoElementBase plays in the passed role in this ElementGroupPrototype.
Public methodResolveProtoLinksResolves the passed IList of ProtoLinks into the ProtoElements that play in the passed DomainRoleId.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodToString(Partition)Dumps out the names of the Elements and ElementLinks in this ElementGroupPrototype, given the DomainClass definitions in the provided partition.
Top
  NameDescription
Public fieldStatic memberCreatingKeyKey for context info search
Public fieldStatic memberDefaultDataFormatNameThe default data format name for the ElementGroupPrototype.
Public fieldStatic memberElementGroupIdDictionaryKey used in the TargetContext ElementGroupContext for the Element Id dictionary and root element (Id) lists.
Public fieldStatic memberRootElementIdListKey used in the Source and Target Context ElementGroupContext for the RootElement Id list and root element (Id) lists.
Public fieldStatic memberRootElementListKey used in the Source and Target Context ElementGroupContext for the RootElement list and root element lists.
Top
  NameDescription
Explicit interface implemetationPrivate methodIDeserializationCallback.OnDeserializationDeserialize the object when the graph is fully loaded
Top

An ElementGroupPrototype (EGP) contains a pattern of elements and links, which can be used to create a new set of elements and links in a merge operation. During the merge, the EGP is used to create an ElementGroup, which is then linked into the elements in the target model.

EGPs are used for the following purposes:

  • To carry information in a drag operation;

  • To store information on the clipboard;

  • To store a pattern of objects in a toolbox.

For more information, see How to: Program Copy and Paste Behavior - redirect and How to: Add a Drag-and-Drop Handler.

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.