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.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Modeling.ElementGroupPrototype
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
'Dichiarazione
<SerializableAttribute> _
Public NotInheritable Class ElementGroupPrototype _
Implements ISerializable, IDeserializationCallback
[SerializableAttribute]
public sealed class ElementGroupPrototype : ISerializable,
IDeserializationCallback
[SerializableAttribute]
public ref class ElementGroupPrototype sealed : ISerializable,
IDeserializationCallback
[<Sealed>]
[<SerializableAttribute>]
type ElementGroupPrototype =
class
interface ISerializable
interface IDeserializationCallback
end
public final class ElementGroupPrototype implements ISerializable, IDeserializationCallback
The ElementGroupPrototype type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ElementGroupPrototype(ElementGroup, IEnumerable<ModelElement>) | Constructor | |
ElementGroupPrototype(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. | |
ElementGroupPrototype(Partition, ICollection<ModelElement>, ElementGroup) | Constructor |
Top
Properties
Name | Description | |
---|---|---|
ProtoElementLinks | Gets collection of all ProtoElementLinks contained in the ElementGroupPrototype. | |
ProtoElements | Gets collection of all ProtoElements contained in the ElementGroupPrototype. | |
RootProtoElements | Gets collection of all root ProtoElements contained in the ElementGroupPrototype. | |
SourceContext | Returns this ElementGroupPrototype's source ElementGroupContext object | |
SourceRootElementIds | returns a read-only list of root element ids from the source context | |
TargetContext | Returns this ElementGroupPrototype's target ElementGroupContext object | |
TargetRootElementIds | returns a read-only list of root element ids from the target context | |
TopLevelProtoGroup | Prototype for the group this ElementGroupPrototype represents | |
UserData | The user-defined data object from the outer-most element group |
Top
Methods
Name | Description | |
---|---|---|
CanCreateElementGroup(Partition) | Can this prototype element group create a clone of the progenitor element group in the indicated partition? | |
CanCreateElementGroup(Store) | Can this prototype element group create a clone of the progenitor element group in the indicated store? | |
CanCreateElementGroup(Partition, IElementPartitionMapper) | Can this prototype element group create a clone of the progenitor element group in the indicated partition? | |
CreateElementGroup(Partition) | Create a clone of the progenitor element group | |
CreateElementGroup(Store) | Create a clone of the progenitor element group | |
CreateElementGroup(Partition, IElementPartitionMapper) | Create a clone of the progenitor element group | |
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.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetObjectData | Populate the serialization info with the data necessary to serialize this object. | |
GetProtoElement | Get the ProtoElement corresponding to the specified id. | |
GetProtoLink | Get the ProtoLink corresponding to the specified id. | |
GetProtoLinks | Returns an IList of ProtoLink objects that contain the passed ProtoElementBase playing in the passed DomainRoleId. | |
GetReconstitutedElement | Returns the reconstituted ModelElement given the guid of the source ModelElement. | |
GetSourceRootElementId | Gets 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. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsInRole | Returns true if the passed ProtoElementBase plays in the passed role in this ElementGroupPrototype. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ResolveProtoLinks | Resolves the passed IList of ProtoLinks into the ProtoElements that play in the passed DomainRoleId. | |
ToString() | Returns a string that represents the current object. (Inherited from Object.) | |
ToString(Partition) | Dumps out the names of the Elements and ElementLinks in this ElementGroupPrototype, given the DomainClass definitions in the provided partition. |
Top
Fields
Name | Description | |
---|---|---|
CreatingKey | Key for context info search | |
DefaultDataFormatName | The default data format name for the ElementGroupPrototype. | |
ElementGroupIdDictionary | Key used in the TargetContext ElementGroupContext for the Element Id dictionary and root element (Id) lists. | |
RootElementIdList | Key used in the Source and Target Context ElementGroupContext for the RootElement Id list and root element (Id) lists. | |
RootElementList | Key used in the Source and Target Context ElementGroupContext for the RootElement list and root element lists. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IDeserializationCallback.OnDeserialization | Deserialize the object when the graph is fully loaded |
Top
Remarks
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.
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
Change History
Date |
History |
Reason |
---|---|---|
June 2010 |
Extended class description. |
Information enhancement. |